Performance advise for OpenGL 4+ ?
I'm about to refactor my 3d demo project. It was born about the time OpenGL 1.5 was considered modern. Since then some modern functionality has been added (VBO, floating point textures, FBO and so on, but only punctually).
I know that the answer to performance questions is always "it depends". So I'm trying to narrow the scope of my question. If you were to target OpenGL 4+ compatible nvidia graphic cards in the scenario I'll describe below, what would you recommend?
Here's the context of my demo: A scenegraph holds some objects which are composed of multiple (say 100) meshes (which may have varying matrices, textues and materials). During rendering the meshes are sorted by state. All meshes are stored in one large VBO (interleaved) which is bound once per frame. For each mesh the the vertex attributes are set up (glVertexAttribPointer), shader uniforms are set (glUniform) and textures might be bound (glBindTexture) before the mesh is rendered (glDrawRangeElements).
What are your performance observations with UBO vs. glUniform calls, explicit vs. automatic attribute locations in GLSL, one VAO per scene with one VBO per scene or one VBO per object vs. one VAO per object? What about bindless or direct state access?
Last edited by stefan; 05-19-2012 at 01:13 AM.