#StackBounty: #opengl #rendering #shapes Drawing basic shapes in mordern opengl, which approach is better?

Bounty: 50

  1. Preallocating a vertex buffer in the GPU and then filling it vertex data and then drawing them to replicate legacy opengl functions like glVertex2f, glNormal2f etc and drawing shapes with them.

  2. Sending the vertex data of all the primitive shapes to the GPU at once at the start of the program then drawing the appropriate part of it in the vertex shader when drawing the shape.

These are all the ways I could think of but I’m not sure how optimal either of these approaches are.
Do games and game engines use a similar approach? or is there an even better approach to this?

Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.