VertexBuffer_DrawingTriangle.md - z22756392z/wp109b GitHub Wiki
Modern OpenGL vs Legacy OpenGL
The Modern OpenGL is very powerful. And there're lots of things we could do.
As a result, there's quite a lot setup we actually need to do, before we can see a triangle on the screen.
Unlike glfw( Graphics Library Framework) which is just a legacy OpenGL , we just use glBegin() and glEnd() to draw a triangle on the screen.
Because that is just five line in the code and we're done. It is easy to do and require no setup.
However, to draw a triangle using modern OpenGL a few thing need to happen.
-
Vertex Buffer -> it is just a buffer. It is an array of bytes or memory. The difference is it is in our GPU in our VR(video RAM).
-
Shader -> A code run on GPU. Tell GPU how to draw.