Changed the patch to support full resolution on Retina screens to be more bulletproof.
This commit is contained in:
parent
84ba36fa72
commit
420c1d1bcd
|
@ -70,7 +70,7 @@ OPENGL_GAL::OPENGL_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener,
|
||||||
isGrouping = false;
|
isGrouping = false;
|
||||||
groupCounter = 0;
|
groupCounter = 0;
|
||||||
|
|
||||||
#ifdef __APPLE__
|
#if RETINA_OPENGL_PATCH
|
||||||
SetViewWantsBestResolution( true );
|
SetViewWantsBestResolution( true );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -126,7 +126,7 @@ void OPENGL_GAL::BeginDrawing()
|
||||||
SetCurrent( *glContext );
|
SetCurrent( *glContext );
|
||||||
clientDC = new wxClientDC( this );
|
clientDC = new wxClientDC( this );
|
||||||
|
|
||||||
#ifdef __APPLE__
|
#ifdef RETINA_OPENGL_PATCH
|
||||||
const float scaleFactor = GetBackingScaleFactor();
|
const float scaleFactor = GetBackingScaleFactor();
|
||||||
#else
|
#else
|
||||||
const float scaleFactor = 1.0f;
|
const float scaleFactor = 1.0f;
|
||||||
|
@ -538,7 +538,7 @@ void OPENGL_GAL::ResizeScreen( int aWidth, int aHeight )
|
||||||
{
|
{
|
||||||
screenSize = VECTOR2I( aWidth, aHeight );
|
screenSize = VECTOR2I( aWidth, aHeight );
|
||||||
|
|
||||||
#ifdef __APPLE__
|
#ifdef RETINA_OPENGL_PATCH
|
||||||
const float scaleFactor = GetBackingScaleFactor();
|
const float scaleFactor = GetBackingScaleFactor();
|
||||||
#else
|
#else
|
||||||
const float scaleFactor = 1.0f;
|
const float scaleFactor = 1.0f;
|
||||||
|
|
|
@ -1,5 +1,18 @@
|
||||||
--- include/wx/osx/glcanvas.h 2015-05-16 15:40:21.000000000 +0200
|
diff -rupN include/wx/glcanvas.h include/wx/glcanvas.h
|
||||||
+++ include/wx/osx/glcanvas.h 2015-05-16 16:44:53.000000000 +0200
|
--- include/wx/glcanvas.h 2015-05-21 00:36:27.406145182 +0200
|
||||||
|
+++ include/wx/glcanvas.h 2015-05-21 00:37:59.169474782 +0200
|
||||||
|
@@ -19,6 +19,8 @@
|
||||||
|
#include "wx/palette.h"
|
||||||
|
#include "wx/window.h"
|
||||||
|
|
||||||
|
+#define RETINA_OPENGL_PATCH
|
||||||
|
+
|
||||||
|
class WXDLLIMPEXP_FWD_GL wxGLCanvas;
|
||||||
|
class WXDLLIMPEXP_FWD_GL wxGLContext;
|
||||||
|
|
||||||
|
diff -rupN include/wx/osx/glcanvas.h include/wx/osx/glcanvas.h
|
||||||
|
--- include/wx/osx/glcanvas.h 2015-05-21 00:36:27.419478515 +0200
|
||||||
|
+++ include/wx/osx/glcanvas.h 2015-05-21 00:36:37.319478112 +0200
|
||||||
@@ -88,6 +88,9 @@ public:
|
@@ -88,6 +88,9 @@ public:
|
||||||
// update the view port of the current context to match this window
|
// update the view port of the current context to match this window
|
||||||
void SetViewport();
|
void SetViewport();
|
||||||
|
@ -10,8 +23,9 @@
|
||||||
|
|
||||||
// deprecated methods
|
// deprecated methods
|
||||||
// ------------------
|
// ------------------
|
||||||
--- src/osx/cocoa/glcanvas.mm 2015-05-16 15:40:24.000000000 +0200
|
diff -rupN src/osx/cocoa/glcanvas.mm src/osx/cocoa/glcanvas.mm
|
||||||
+++ src/osx/cocoa/glcanvas.mm 2015-05-16 17:10:50.000000000 +0200
|
--- src/osx/cocoa/glcanvas.mm 2015-05-21 00:36:27.542811843 +0200
|
||||||
|
+++ src/osx/cocoa/glcanvas.mm 2015-05-21 00:36:37.322811445 +0200
|
||||||
@@ -313,6 +313,22 @@ bool wxGLCanvas::SwapBuffers()
|
@@ -313,6 +313,22 @@ bool wxGLCanvas::SwapBuffers()
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue