# OpenGL performances issues

**URL:** <https://forum.juce.com/t/opengl-performances-issues/37168>\
**Category:** General JUCE discussion\
**Created:** [January 17, 2020, 1:16pm UTC](https://forum.juce.com/t/opengl-performances-issues/37168 "2020-01-17T13:16:52Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Blueteal](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/blueteal/32/5324_2.png) [@Blueteal](https://forum.juce.com/u/Blueteal)\
**Post date:** [January 17, 2020, 1:16pm UTC](https://forum.juce.com/t/opengl-performances-issues/37168/1 "2020-01-17T13:16:52Z")

</div>

Hello,

Testing the DemoRunner.exe (last version of juce, and even 5.3.1), if you switch to the openGL renderer there are huge peaks of CPU (like 10-15%) while moving sliders (for example DSP/GainDemo).  
This does not happen with the software renderer. (maximum 2% or 3%)

We have the same issues using it on our project.  
Do you have any idea why this is the case ?

---

<div class="post-metadata">

**Author:** ![DaveH](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/daveh/32/4924_2.png) [@DaveH](https://forum.juce.com/u/DaveH)\
**Post date:** [January 17, 2020, 3:17pm UTC](https://forum.juce.com/t/opengl-performances-issues/37168/2 "2020-01-17T15:17:20Z")

</div>

Windows or Mac OSX?  
What’s your target OS?  
If you get the latest Develop branch, and compile to target 10.8 at the lowest, you’ll see an OpenGL speed up.

---

<div class="post-metadata">

**Author:** ![Blueteal](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/blueteal/32/5324_2.png) [@Blueteal](https://forum.juce.com/u/Blueteal)\
**Post date:** [January 17, 2020, 3:31pm UTC](https://forum.juce.com/t/opengl-performances-issues/37168/3 "2020-01-17T15:31:27Z")

</div>

We tested OpenGL in the DemoRunner.exe with Windows 10.

The target 10.8 is for mac no ?

EDIT : I retreived the last juce\_OpenGLContext.cpp from the developper branch, and compiled the DemoRunner.exe again, but no improvements

---

<div class="post-metadata">

**Author:** ![DaveH](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/daveh/32/4924_2.png) [@DaveH](https://forum.juce.com/u/DaveH)\
**Post date:** [January 17, 2020, 3:58pm UTC](https://forum.juce.com/t/opengl-performances-issues/37168/4 "2020-01-17T15:58:40Z")

</div>

Ok, then what’s your GFX card? And are you up to date with the drivers. Most people aren’t. There really should be a list of tick boxes when people ask questions like this.  
We can’t guess what the problem is.

---

<div class="post-metadata">

**Author:** ![Blueteal](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/blueteal/32/5324_2.png) [@Blueteal](https://forum.juce.com/u/Blueteal)\
**Post date:** [January 17, 2020, 4:38pm UTC](https://forum.juce.com/t/opengl-performances-issues/37168/5 "2020-01-17T16:38:56Z")

</div>

Thank you for yours answers. 🙂

Is it really relevant ? I mean, we can’t verify if our customers have their drivers up to date.  
We tested these issue on two different computers though. Maybe a better question could be : did these issue happens on all windows ?

EDIT : yes drivers are up to date

---

<div class="post-metadata">

**Author:** ![PluginPenguin](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/pluginpenguin/32/10203_2.png) [@PluginPenguin](https://forum.juce.com/u/PluginPenguin)\
**Post date:** [January 17, 2020, 5:25pm UTC](https://forum.juce.com/t/opengl-performances-issues/37168/6 "2020-01-17T17:25:52Z")

</div>

Maybe you could run it with the profiler to get an idea where in the code the CPU consumption happens

---

<div class="post-metadata">

**Author:** ![DaveH](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/daveh/32/4924_2.png) [@DaveH](https://forum.juce.com/u/DaveH)\
**Post date:** [January 17, 2020, 6:33pm UTC](https://forum.juce.com/t/opengl-performances-issues/37168/7 "2020-01-17T18:33:59Z")

</div>

PP is right, and you should be able to render an entire polygon filled plug-in many hundreds of times a second, possibly thousands, as these cards are effing fast!  
So you’ll be better off running the VS profiler, to see what causing the wait. 🙂  
The reason I asked about the drivers is that the demos run fine for me, so I was thinking maybe it’s a hardware thing.

---

<div class="post-metadata">

**Author:** ![tytel](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/tytel/32/655_2.png) [@tytel](https://forum.juce.com/u/tytel)\
**Post date:** [January 17, 2020, 9:00pm UTC](https://forum.juce.com/t/opengl-performances-issues/37168/8 "2020-01-17T21:00:16Z")

</div>

EDIT: ah my mistake, I misread and thought you were running on mac.

I posted this another thread but reposting here because this annoyed the hell out of me.  
Since Apple shipped their 10.14 SDK, in Release build there are some GPU debugging tools still enabled that slow down OpenGL a _lot_. Disabling these seems to bring me back to good performance.

Edit Schemes -\> Run -\> Options -\> GPU Frame Capture

Side note: If you archive your build it won’t enable this
