Vertex Array Objects // OpenGL Tutorial #17

  Рет қаралды 13,418

OGLDEV

OGLDEV

Күн бұрын

In this video I will show you how to use Vertex Array Objects (VAO) in OpenGL in order to make it simpler to switch between groups of vertices that are characterized by different source buffers and different vertex layouts. I will also describe the compatibility and core profiles, show how to enable the core profile using FreeGLUT and describe how they affect the VAO. Finally, I'll review some changes that I've made in order to move most of the application code into a class.
Make sure to watch all the previous tutorials in the "OpenGL For Beginners" playlist at • OpenGL for Beginners
Please visit ogldev.org to see more of my tutorials on modern OpenGL.
Link to source: github.com/emeiri/ogldev/blob...
If you want to get the same version that was used in the video checkout the tag TUT_17_VAO.
OpenGL 4.6 specification: www.khronos.org/registry/Open...
Timecodes:
0:00 Intro
0:14 Background
0:57 Multiple meshes
1:23 Vertex Array Objects
2:10 Compatibility and core profiles
2:58 VAOs and the profiles
3:19 How the enable the core profile in FreeGLUT
4:06 Start of code review
4:30 The Tutorial17 class
5:02 FreeGLUT callbacks
6:03 Using the VAO
8:10 Rest of the Init method
8:41 The render loop
9:03 Getting the current VAO from the OpenGL runtime
9:22 The keyboard callback function
9:43 Object cleanup
10:41 Changes to the main function
10:56 Run the demo
11:14 Conclusion
Feel free to comment below.
Contact:
Email: etay.meiri@gmail.com
Facebook: / ogldev-188319114585587
GIthub: github.com/emeiri/ogldev.git
Twitter: @ogldev
One time donations (Paypal): ogldev.org/donate.html
Patreon: / ogldev
My gear (Amazon affiliate links):
Camera - Canon EOS M50: amzn.to/3duVIOh
Camera mic - Rode Videomic: amzn.to/3dsGVDs
Desktop mic - Rode NT-USB-Mini: amzn.to/3giMoif
Enjoy,
Etay Meiri
#opengl #ogldev #opengtutorials

Пікірлер: 22
@riccardomassa7006
@riccardomassa7006 7 ай бұрын
i have watched several other OpenGL tutorials but i could not quite understand how it worked, thanks to your videos i now understand it, thank you so much for doing this.
@OGLDEV
@OGLDEV 7 ай бұрын
Glad it helped!
@dimension-ji7xk
@dimension-ji7xk 2 жыл бұрын
Just what I've been waiting for. Thank you
@OGLDEV
@OGLDEV 2 жыл бұрын
You're welcome!
@gamereplayhq
@gamereplayhq Жыл бұрын
Thanks for that illustration @1:56, helps create the mental model to understand vao concept more clearly.
@OGLDEV
@OGLDEV Жыл бұрын
Thanks!
@matthewexline6589
@matthewexline6589 5 ай бұрын
I love this video, thank you so much for making it. I was able to figure out what I was doing wrong assigning UVs to my vertex buffer by watching this.
@OGLDEV
@OGLDEV 5 ай бұрын
Glad it helped!
@linearz
@linearz 29 күн бұрын
I'm following your tutorial with GLFW and with different programming language. Now, I understand why I have to use VAO from the start, the other tutorial I followed to get me started is using Core Profile.
@OGLDEV
@OGLDEV 29 күн бұрын
Thanks, so everything is ok?
@linearz
@linearz 29 күн бұрын
@@OGLDEV yup, everything is working well. Thanks again!
@OGLDEV
@OGLDEV 29 күн бұрын
You're welcome :-)
@hunterize1516
@hunterize1516 2 жыл бұрын
super nice, deserved more subscribers!
@OGLDEV
@OGLDEV 2 жыл бұрын
Thanks! Hope there will be...
@tuduscz6836
@tuduscz6836 2 жыл бұрын
Thx. It helped me a lot.
@OGLDEV
@OGLDEV 2 жыл бұрын
Glad to hear :-)
@brunofelix5434
@brunofelix5434 2 жыл бұрын
+1 subscriber #Brazil
@OGLDEV
@OGLDEV 2 жыл бұрын
Nice!
@matthewexline6589
@matthewexline6589 5 ай бұрын
Sorry for the stupid question. I'm trying to use opengl on an android app, C#/xamarin. I use SetEGLContextClientVersion(int version). @3:32, you use a function called InitContextVersion(int main, int sub). Do I need to find a function that is equivalent to InitContextVersion within Android.Opengl, or is SetEGLContextClientVersion just all there is and that's it?
@OGLDEV
@OGLDEV 5 ай бұрын
Not a stupid question at all. Mobile development is more challenging due to the lack of GLUT/GLFW. I think SetEGLContextClientVersion is the equivalent of glutInitContextVersion.
@nunumaster4083
@nunumaster4083 Жыл бұрын
Ok lol
@OGLDEV
@OGLDEV Жыл бұрын
:-)
Loading Models Using Assimp // OpenGL Tutorial #18
26:37
OGLDEV
Рет қаралды 38 М.
UFC 302 : Махачев VS Порье
02:54
Setanta Sports UFC
Рет қаралды 1,4 МЛН
100❤️
00:20
Nonomen ノノメン
Рет қаралды 64 МЛН
ПООСТЕРЕГИСЬ🙊🙊🙊
00:39
Chapitosiki
Рет қаралды 60 МЛН
Vertex Buffer Objects and Vertex Array Objects
8:35
GetIntoGameDev
Рет қаралды 23 М.
From CPU to GPU: Understanding Data Transfer with Buffers in OpenGL
15:41
Luke's Dev Tutorials
Рет қаралды 3 М.
GRASS RENDERING in OpenGL // Code Review
47:23
The Cherno
Рет қаралды 113 М.
WebGL 2: Vertex Array Objects (VAOs)
11:52
Andrew Adamson
Рет қаралды 2,9 М.
Perspective Projection - Part 1 // OpenGL Tutorial #11
24:13
I Made a Graphics Engine (again)
8:27
Zyger
Рет қаралды 157 М.
Buffers in OpenGL | How to Code Minecraft Ep. 2
26:56
GamesWithGabe
Рет қаралды 86 М.