Opengl frustum culling without glGet calls *

Various frustum view calculation examples use glGetFloatv () to get the current projection and modeling matrices (GL_PROJECTION_MATRIX, GL_MODELVIEW_MATRIX), and you can make a truncated selection based on this.

I read that glGet * is what you don't want in your main render loop;

"Using the Get or Is functions slows down. These commands force the graphics system to execute all OpenGL queues in the queue; it can respond with a Get or Is request."

So my question. How to create a solid Frustum rejection algorithm in my code, and where can I do this to ensure that this stall never happens?

+4
source share
2 answers

You can always store the current matrices in your application, so that when you want it, you do not need to make a glGet call, you can just capture them ...

+6
source

All Articles