Batching in OpenGL

  Рет қаралды 17,759

Saurav Sikarwar

Saurav Sikarwar

Күн бұрын

This video is about a graphics programming optimization technique called Batching. It helps us render different meshes with less number of draw calls and get much better performance.
Source code:
github.com/Saurav280191/TS_EN...
♫ Music credits ♫
My Achy Heart - Audio Hertz

Пікірлер: 25
@mikewaters2126
@mikewaters2126 Жыл бұрын
Thank you for this. I really appreciate how tightly organized the video is. Starting with the instancing comparison is great, and the video's very information dense. Doesn't waste time at all.
@dustinsmith842
@dustinsmith842 Жыл бұрын
i also believe this is the best way to draw non-specialized geometry requiring simple model structure!
@Overwatch86
@Overwatch86 9 ай бұрын
Excellent explanation. Not short like you got a bus to catch, and not long and rambling like ur haven't talked to a human in 20 years. This puts other creators to shame. Keep it up
@sauravsikarwar
@sauravsikarwar 8 ай бұрын
Glad it was helpful!
@matthewexline6589
@matthewexline6589 6 ай бұрын
Cool explanation, thanks. I think this might somewhat explain what "spritebatch" is in the Monogame Framework. I always wondered why they called it that.
@olbluelips
@olbluelips 8 ай бұрын
Nice! I’ll need to implement batching
@obinator9065
@obinator9065 4 ай бұрын
3:05 You should avoid copying a vector; pass it by reference. Heap allocation is very slow.
@fangzhoulu4333
@fangzhoulu4333 Жыл бұрын
Nice content, keep up 👍. I am just wondering if you do the world space transformation on CPU side and transfer mesh data to GPU every frame, is it actually an ideal practice? But certainly, it is better than doing drawcall for every single object each frame. I think in vulkan the MVP can also be easily batched, but not sure about openGL.
@sauravsikarwar
@sauravsikarwar Жыл бұрын
Thanks for liking the video @fangzhou4333. Transformation on CPU is not an ideal practice but in the batching case since all the meshes are combined in one we don't have any other option apart from getting the vertex transformation done on CPU side. In the example I have shown in this video all the models are repositioned once at the start only so I have used GL_STATIC_DRAW but in cases where we need to keep transforming the mesh vertices(eg: batching animated models) on runtime GL_DYNAMIC_DRAW is recommended.
@AlbertRyanstein
@AlbertRyanstein 10 ай бұрын
Great stuff thank you for this is there more details somewhere?
@sauravsikarwar
@sauravsikarwar 8 ай бұрын
Thanks. Sorry for replying late. Here is the source code for this demo: github.com/Saurav280191/TS_ENGINE_BatchingDemo
@sshevtsov
@sshevtsov Жыл бұрын
Thanks. This is very cool video. I wish you to increase amount of views, as very useful content...
@ch3dsmaxuser
@ch3dsmaxuser Жыл бұрын
Great! Would be great to have a look at the source code for your examples, thanks!
@sauravsikarwar
@sauravsikarwar 8 ай бұрын
Sorry about the replying so late. I somehow missed your comment. Here it is: github.com/Saurav280191/TS_ENGINE_BatchingDemo
@marclurr
@marclurr Ай бұрын
Are you rebuilding the batch mesh data each frame, or just once and reusing it?
@10bokaj
@10bokaj 6 ай бұрын
Batching this way only really works for static objects.
@mariocamspam72
@mariocamspam72 Жыл бұрын
The best IT-related videos on KZbin are made by Indians
@korigamik
@korigamik Жыл бұрын
Great video but, where can I see the source code for this?
@sauravsikarwar
@sauravsikarwar Жыл бұрын
I haven't uploaded it yet. Will be uploading it on GIT soon and will share the link in description. For reference I've shown some code snippet in the video. Maybe that will help.
@korigamik
@korigamik Жыл бұрын
@@sauravsikarwar that's cool. I'll be waiting for it 👍
@sauravsikarwar
@sauravsikarwar Жыл бұрын
Hi @@korigamik. I've uploaded a new video. That has framework source code mentioned in the description as well. Check it out🙂
@ItIsYouAreNotYour
@ItIsYouAreNotYour Жыл бұрын
@@sauravsikarwar Where? I don't see source code.?
@sauravsikarwar
@sauravsikarwar Жыл бұрын
@@ItIsYouAreNotYour github.com/Saurav280191/TS_ENGINE_BatchingDemo
@NagiTangCheong
@NagiTangCheong Жыл бұрын
Is this the same idea as Unity's batch processing?
@sauravsikarwar
@sauravsikarwar Жыл бұрын
Yes. It is same. On the front end it differs a bit but unity also internally might be processing it in the same way based on which graphics api it is using.
Framebuffers in OpenGL | Coding a 2D Game Engine in Java #27
24:20
GamesWithGabe
Рет қаралды 7 М.
From CPU to GPU: Understanding Data Transfer with Buffers in OpenGL
15:41
Luke's Dev Tutorials
Рет қаралды 2,9 М.
The delivery rescued them
00:52
Mamasoboliha
Рет қаралды 6 МЛН
ДЕНЬ РОЖДЕНИЯ БАБУШКИ #shorts
00:19
Паша Осадчий
Рет қаралды 6 МЛН
Learning VULKAN by Rendering a GALAXY
6:10
frozein
Рет қаралды 26 М.
Heightmaps // Terrain Rendering episode #1
20:20
OGLDEV
Рет қаралды 12 М.
You don't need libraries to write a game engine in C++ | OpenGL | Devlog
2:50
UNLIMITED textures in your Shaders! (OpenGL tutorial)
4:03
Low Level Game Dev
Рет қаралды 7 М.
Modern OpenGL Tutorial: Rendering a Colored Cube
11:47
Luke's Dev Tutorials
Рет қаралды 3,6 М.
I Optimised My Game Engine Up To 12000 FPS
11:58
Vercidium
Рет қаралды 501 М.
I spent 1 YEAR making a graphics engine(Without OpenGL)
5:35
Introduction to shaders: Learn the basics!
34:50
Barney Codes
Рет қаралды 277 М.
How To Render 2 Million Objects At 120 FPS
14:57
Tarodev
Рет қаралды 135 М.
Escape Nextbots Rosalia And Obunga Police #gmod
0:36
BizarroTube GMod
Рет қаралды 19 МЛН
DOG vs CAT - POPPY PLAYTIME CHAPTER 3 | GH'S ANIMATION
0:13
Открываю Minecraft box
0:27
Mikha Zen
Рет қаралды 2,9 МЛН