Wednesday, July 13, 2016

c++ - OpenGL Performance Questions


This subject, as with any optimisation problem, gets hit on a lot, but I just couldn't find what I (think) I want.


A lot of tutorials, and even SO questions have similar tips; generally covering:



  • Use GL face culling (the OpenGL function, not the scene logic)

  • Precalculate anything you can

  • Use interleaved Vertices


  • Minimize as many GL calls as possible, batch where appropriate


And possibly a few/many others. I am (for curiosity reasons) rendering 28 million triangles in my application using several vertex buffers. I have tried all the above techniques (to the best of my knowledge), and received almost no performance change.


Whilst I am receiving around 40FPS in my implementation, which is by no means problematic, I am still curious as to where these optimisation 'tips' actually come into use?


My CPU is idling around 20-50% during rendering, therefore I assume I am GPU bound for increasing performance.


Note: I am looking into gDEBugger at the moment


Cross posted at StackOverflow



Answer



as far as I know those are good optimization techniques but since new GPUs are beasts in matrix vector operations, maybe in your case you need to use more effective optimization techniques for example you may use frustum culling , dynamic level of detail ,occlusion culling, try to minimize state changes by sorting (you can also sort based on shaders ), minimize copying from/to GPU memory.


No comments:

Post a Comment

Simple past, Present perfect Past perfect

Can you tell me which form of the following sentences is the correct one please? Imagine two friends discussing the gym... I was in a good s...