Hello, I have started learning box2d physics engine which i will use for a 2D game which uses OpenGL as graphics API. The question is, since i can’t use static vbos for very very dynamic objects, should I upload the coordinates on a shader or just use immediate mode for 2D graphics ? Will I get a performance hit if i don’t use shaders to draw 2d objects ?
since i can’t use static vbos
Buffer objects are only static if you want them to be. Dynamic buffer objects are an entirely legitimate use of them.
You shouldn’t use immediate mode for anything. Even client-side vertex arrays will be faster.
However, if you think that you might want to port the game to OpenGL ES at some point, then bear in mind that ES only supports VBOs, not client-side vertex arrays or immediate mode.
That’s incorrect. Client arrays are fine in GLES. Only desktop core ditched them.
It’s slow (except in some cases in combination with display lists), outdated and far from being future proof. Don’t waste your time with the immediate mode, learn modern OpenGL instead.
so i should use VBOs with dynamic mode. i heard it was a slow thing but i will try.
You’re right of course
And WebGL (which is probably the source of my confusion).