Skip to main content
GameDev.net gamedev.net
🔒 Locked

Simple Question I think

Started by scarypajamas Oct 19, 2008 at 3:45 PM 0 replies 450+ views
Original Post
scarypajamas
scarypajamas
How can I get the number of polygons opengl is drawing? Not just in the current view, but totally drawing off camera as well. I want to know this for optimization reasons. Is this a command or do I have to do some math?
swiftcoder
swiftcoder
Quote:
Original post by scarypajamas
How can I get the number of polygons opengl is drawing? Not just in the current view, but totally drawing off camera as well.

I want to know this for optimization reasons.

Is this a command or do I have to do some math?
Keep a counter, and update it every time you draw a polygon (i.e. every time you call glDrawElements/glDrawArrays). Remember to clear it again before each frame.
Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.