From 569f2636bddfa113f794df27c5ddfc3504ea7325 Mon Sep 17 00:00:00 2001 From: Jean-Marie Verdun Date: Fri, 3 Mar 2017 22:37:23 +0100 Subject: [PATCH] Move glortho2d to GLKMatrix4MakeOrtho as to avoid Deprecated Warning on Mac OS --- src/Mod/Image/Gui/GLImageBox.cpp | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/Mod/Image/Gui/GLImageBox.cpp b/src/Mod/Image/Gui/GLImageBox.cpp index b8d0b1879..d7e00cc91 100644 --- a/src/Mod/Image/Gui/GLImageBox.cpp +++ b/src/Mod/Image/Gui/GLImageBox.cpp @@ -26,15 +26,16 @@ # include # include #elif defined (FC_OS_MACOSX) -# include -# include +# include +# include +# include #elif defined (FC_OS_WIN32) # include -# include -# include +# include +# include #else -# include -# include +# include +# include #endif #include "GLImageBox.h" @@ -99,7 +100,12 @@ void GLImageBox::resizeGL( int w, int h ) glViewport( 0, 0, (GLint)w, (GLint)h ); glMatrixMode( GL_PROJECTION ); glLoadIdentity(); +#if defined (FC_OS_MACOSX) + GLKMatrix4 orthoMat = GLKMatrix4MakeOrtho(0, width() - 1, height() - 1, 0, -1, 1); + glLoadMatrixf(orthoMat.m); +#else gluOrtho2D(0, width() - 1, height() - 1, 0); +#endif glMatrixMode(GL_MODELVIEW); }