OpenGL Demo uses full CPU on Windows

opengl

#1

I’m running the OpenGL JUCE Demo (and my own app) and I notice on Windows that it uses a full CPU core. OSX and Linux don’t have this issue. I’m not sure if this is just my system or what, but I profiled it and it looks like it’s spending all it’s time on “RtlUserThreadStart”.

I was reading OpenGL and high CPU usage which sounded similar but I’m only using one context. Has anyone seen this issue? Is the solution to not attach the openGL Context to my component like Jules said in the other thread?


#2

I also noticed some strange behavior. I was playing around with my own app in debug mode and was doing some intensive CPU drawing. After a few seconds of this, the high OpenGL usage stopped and didn’t go up again and everything was running fine. I know this is super ‘hand wavey’ but I thought it was worth mentioning because now I know it’s possible to get the CPU usage down to that level.


#3

Am I alone on this? Does the OpenGL Demo use a full core on Windows for anyone else?


#4

Could anyone be so kind as to throw me a bone?


#5

Can’t seem to reproduce this. Which GPU and drivers are you using?


#6

Ah so maybe it’s just me.
I’ve got a GTX 970 and I’m on Nvidia’s driver version 382.33


#7

Any chance you can re-test this on a different machine?


#8

Just tried it on a Thinkpad x201 with integrated graphics and I’m still seeing really high CPU usage.
This happens both with the OpenGLAppDemo and in the OpenGL teapot section of the JuceDemo.

I’m testing this on the develop branch.


#9

Perhaps by changing how often it draws the window again? (don’t know how this is done with JUCE)


#10

Default is 60Hz and I double checked that was the case. :confused: