opengl optimization

ello to all the community

I’m creating a game with 3D characters with more than 10 000 points.
Ultimately, the game reaches over 100 000 points and again it’s not all over.

The game is slow because I use glVertex among others.

What is the best way to optimize display vbo, vba or something else?

Knowing that the characters are animated and static as the other trees.

Could you give me also all but really anyone can make me win one frame per second?

Thank you and goodbye,

Define “best” :wink:

The currently recommended approach is to use VBOs. Basically, put all your vertices in lists and give them to the driver. Then when you’re ready, issue a “draw call” (such as glDrawElements, glDrawArrays, etc.) to tell the GPU to render them all at once in one “batch”.

In practice you can get even higher performance from VBOs by additionally using bindless (on NVidia), or VAOs (on NVidia/AMD). But plain VBOs are likely to be so much faster than your immediate mode code that you probably won’t even care.

Of course, if you don’t care about long-term portability, you can try using a display list. Particularly on NVidia, the performance of this can rival VBOs+bindless, and they are very easy to try. Note: display lists were deprecated in OpenGL 3.

Well VBOs are not dispatched using glVertex, the most important thing is to use glDrawElements or one of the variations on it.

Use a cache coherent tri strip (nvtristrip will build one for you)

Once you do this you can then use VBOs for the attribute buffer.

It will fly compared to your current application.