-
AlphoenixLikes 0Problem Description
I’m watching the tutorials on modern opengl in c++ and i’ve some trouble to understand the following line of code:
glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 8 * sizeof(GLfloat), (GLvoid *)0);
why the ‘8 * sizeof(GLfloat)’ and why ‘(GLvoid* )0’ and not just 0 ?
-
Sonar Systems adminLikes 0
Which lesson are you on?
-
AlphoenixLikes 0
Im at the beginning of the fourth tutorial.
-
Sonar Systems adminLikes 0
What platform are you watching the lessons on?
-
AlphoenixLikes 0
on windows10 with vs2017 as IDE
-
Sonar Systems adminLikes 0
I mean what website sorry?
-
AlphoenixLikes 0
im watching on youtube the opengl tutorials
-
Sonar Systems adminLikes 0
Is it the transformations video?
-
AlphoenixLikes 0
yes it is !
-
Sonar Systems adminLikes 0
8 vertices
Also OpenGL has it’s own variables so always best to use them or cast to them.
Login to reply