OpenGL Vertice Count

Previous topic - Next topic

Slydog

Is there a way to display the current vertice (or poly) count from OpenGL (or from GLBasic if it has that info)?

I'm adjusting the FAR CLIP limit of the camera in hopes of saving some polys on an iPhone.
But I don't know how to figure out the benefits if I don't know how many polys I'm saving.

Or it would also be handy for dynamic worlds.
You could limit how much detail to draw up until you reach your vertice limit for that device.

Simply counting the number of vertices/poly's in all my models doesn't help since I don't know what models will be clipped from view.
My current project (WIP) :: TwistedMaze <<  [Updated: 2015-11-25]

Hemlos

I assume you could make a counter.
Include all the polys within objects, which are a certain range(current far clip value) from the cameras origin.
If you download my 3d object viewer from the download section of GLBasic, you can see how to get information from objects, source is included.


Bing ChatGpt is pretty smart :O

Slydog

Thanks, that's kinda what I was thinking might be my 'worst case scenario', but should work.

Does anyone know if objects behind (or out of view of) the camera are drawn by GLBasic? (frustum culling)
My current project (WIP) :: TwistedMaze <<  [Updated: 2015-11-25]

Kitty Hello

GLBasic does a frustum culling against the bounding sphere of objects.