Published : 004 – OpenGL Primitives and how to draw from Arrays

I just published a new Episode in my OpenGL & Vulkan Podcast:

004 – OpenGL Primitives and how to draw from Arrays.
In This Episode we introduce the OpenGL Primitives and how you structure your Arrays to draw from them.

OpenGL Primitives :



Simple drawing:


glVertex3f(100.0f, 100.0f, 0.0f);
glVertex3f(150.0f, 100.0f, 0.0f);
glVertex3f(125.0f, 50.0f, 0.0f);


glVertex3f(100.0f, 100.0f, 0.0f); // origin of the FIRST line
glVertex3f(200.0f, 140.0f, 5.0f); // ending point of the FIRST line
glVertex3f(120.0f, 170.0f, 10.0f); // origin of the SECOND line
glVertex3f(240.0f, 120.0f, 5.0f); // ending point of the SECOND line

glEnd( );


Drawing from a Array:

GLfloat vertices[] = {…}; // 36 of vertex coords

glEnableClientState( GL_VERTEX_ARRAY );
glVertexPointer( 3, GL_FLOAT, 0, vertices );

glDrawArrays( GL_TRIANGLES , 0 , 3 );

glDisableClientState( GL_VERTEX_ARRAY );

Find it on iTunes:

Use RSS Podcast link: