AEJuice Free Plugins [ Ссылка ]
AEJuice I Want It All Bundle [ Ссылка ]
AEJuice YouTube Channel [ Ссылка ]
In this video we study how to use index buffers in OpenGL in order to save vertex buffer space. We will also expand the current sample code by adding the color attribute to the vertex buffer.
Make sure to watch all the previous tutorials in the "OpenGL For Beginners" playlist at [ Ссылка ]
Please visit [ Ссылка ] to see more of my tutorials on modern OpenGL.
Link to source: [ Ссылка ]
If you want to get the same version that was used in the video checkout the tag TUT_10_INDEXED_DRAWS.
OpenGL 4.6 specification: [ Ссылка ]
🔥 I'm using the following books as background information for my tutorials and I highly recommend them for learning more about OpenGL and Vulkan.
These are affiliate links so if you use them to buy the books the price is the same for you and I will get a small commision (thank-you!).
📖 OpenGL 4 Shading Language Cookbook - Third Edition: Build high-quality, real-time 3D graphics with OpenGL 4.6, GLSL 4.6 and C++17 3rd ed. Edition: [ Ссылка ]
📖 3D Graphics Rendering Cookbook: A comprehensive guide to exploring rendering algorithms in modern OpenGL and Vulkan: [ Ссылка ]
(Watch my short video review on this book: [ Ссылка ])
📖 Vulkan Programming Guide: The Official Guide to Learning Vulkan: [ Ссылка ]
(Watch my short video review on this book: [ Ссылка ])
Time codes:
0:00 Intro
0:30 Vertex sharing example in Blender
3:22 How the index buffer works
4:32 Calculating the vertex buffer space that we saved
6:41 Start of code review
9:49 Initializing the vertices
11:10 Creating the vertex buffer
11:54 Initializing the indices
13:40 Creating the index buffer
14:58 Chages to the render callback
17:43 Using glDrawElements
19:17 The vertex shader
20:27 Build and run
21:28 Conclusion
Feel free to comment below.
Email: ogldev1@gmail.com
Facebook: [ Ссылка ]
Github: [ Ссылка ]
Twitter: @ogldev
One time donations (Paypal): [ Ссылка ]
Patreon: [ Ссылка ]
Special guest appearance: Duke Nukem
Enjoy,
Etay Meiri
#opengl #ogldev #opengtutorials
Ещё видео!