[Episode 14] Drawing a colored triangle (using single vertex buffer object) - Modern OpenGL

preview_player
Показать описание

►Lesson Description: In this lesson we'll revisit our previous lesson, but this time we will only use one vertex buffer object in order to add color into our scenes. Their are some pros and cons that would have to be empirically measured with having multiple buffers (anecdotally one buffer may perform better), so it is good to know both strategies, and understand also how our attribute pointers work in this lesson.

►Please like and subscribe to help the channel!
Рекомендации по теме
Комментарии
Автор

why does the API require a GLvoid* instead just a GLsizei for the offset like stride does?

dennistu
Автор

One of the best openGL tutorial series yet. Gonna be big one day if you keep this up

dankmemer
Автор

😁 Mike is so fast, rapid progress, thank you !

joshbrice
Автор

What is the difference between GL_FLOAT and GLfloat, I realize GLfloat is a type but I don't fully understand the difference and why would they use something so close to the same. Thanks for the videos.

Zimbob
Автор

Sorry if this is a stupid question, but in the case where we're doing one solid VBO like this, then whenever we pass in the stride in glVertexAttribPointer(), the stride will always be the same for each attribute in our vertexArray, right? Seems to me like that must be the case.

matthewexline
Автор

Such a great video, thank you! I finally got it all working, but I am curious about disabling the vertex attribute arrays. I notice that we unbind our vertex array, then unbind disable the attributes, and then bind the vertexArray again. Or at least that's how it ended up in my code lol. What would be the purpose in doing this? I've gone ahead and commented out the unbind, disableAttribArray, re-bind code for now, and it seems to run fine. Not sure if it's like a memory issue or something?

matthewexline
Автор

very nice you tech
glEnableVertexAttribArray(1);
glVertexAttribPointer(1, 3, GL_FLOAT, GL_FALSE, sizeof(GL_FLOAT) * 6,
important line to do thanks

TechStore
visit shbcf.ru