How do modern OpenGL 3.x and higher use primitives?

I have to make a lot of primitives with OpenGL (3.3, 4.2), I knew with glutSolidTeapot (); I can draw a teapot primitive in abundance.

But it looks like there won't be an array of vertices from this command, and I don't know if these commands are outdated or not.

And I noticed that many modern OpenGL tutorials just load their own primitives and avoid just using excess, they even load simple geometry from a 3D mesh format file.

My goal is to simply draw these primitives as quickly as possible. And use the new OpenGL as much as possible.

So, how to draw primitives in modern OpenGL?

+5
source share
2

GLUT ( OpenGL - ) , glBegin/glEnd , , , .

(, glVertex, glNormal,...) ( , ), glBegin/glEnd , , VBOs, glDrawArrays/glDrawElements .

, , , , Wavefront OBJ format - Mesh ASCII, , .

+8

( ) OpenGL .

Shader .

, , , .., , .

+2

All Articles