Browse Source

Fix for GL in OSX retina displays

tags/2021-05-28
jules 12 years ago
parent
commit
0b32caaaf0
1 changed files with 4 additions and 2 deletions
  1. +4
    -2
      modules/juce_opengl/opengl/juce_OpenGLContext.cpp

+ 4
- 2
modules/juce_opengl/opengl/juce_OpenGLContext.cpp View File

@@ -189,11 +189,13 @@ public:
{
if (ComponentPeer* peer = component.getPeer())
{
Rectangle<int> newArea (peer->getAreaCoveredBy (component).withPosition (0, 0));
const double newScale = Desktop::getInstance().getDisplays()
.getDisplayContaining (component.getScreenBounds().getCentre()).scale;
Rectangle<int> newArea (peer->getComponent().getLocalArea (&component, component.getLocalBounds())
.withPosition (0, 0)
* newScale);
if (scale != newScale || viewportArea != newArea)
{
scale = newScale;


Loading…
Cancel
Save