PDA

View Full Version : CPU Utilization - OpenGL Task use is excessive



coolguyclay
07-03-2008, 11:50 AM
Has anyone ever looked at the tasks running in their program and noticed the OpenGL thread using an uncanny amount of CPU? I know I have! : )

I am displaying a grid of textures and simply render them each display cycle, sometimes adding more textures if my larger image moves a given distance. Looking at graph of the CPU usage, the OpenGL task is very cyclic, going from below 10% to up over 70% every few seconds. What's odd though is that while using 10% or 70%, there are hundreds of cycles of my "Display()" loop (solid frame rate), whether I am panning my larger image or simply sitting still.

This behavior does not seem to be related to what occurs inside the display cycle, nor does it spike with the display cycle . . . it is completely on its own. Is there any OpenGL background behavior that occurs every so often? Cleanup or rearranging of memory? Or perhaps not making a certain method call requires more action during other calls and I'm forgetting about (read: don't know) about this added overhead?

Any thoughts would be great, I can try and provide more information if you ask what would be helpful : )

Thanks,
Clay

dletozeun
07-04-2008, 12:13 AM
How could you estimate the opengl only cpu usage?
If you measure the cpu usage of your application and this one have a while display loop, high cpu usage is pretty logic.