Move glortho2d to GLKMatrix4MakeOrtho as to avoid Deprecated Warning on Mac OS
This commit is contained in:
parent
adca327b34
commit
569f2636bd
|
@ -26,15 +26,16 @@
|
|||
# include <GL/gl.h>
|
||||
# include <GL/glext.h>
|
||||
#elif defined (FC_OS_MACOSX)
|
||||
# include <OpenGL/gl.h>
|
||||
# include <OpenGL/glu.h>
|
||||
# include <OpenGL/gl.h>
|
||||
# include <OpenGL/glu.h>
|
||||
# include <GLKit/GLKMatrix4.h>
|
||||
#elif defined (FC_OS_WIN32)
|
||||
# include <Windows.h>
|
||||
# include <GL/gl.h>
|
||||
# include <GL/glu.h>
|
||||
# include <GL/gl.h>
|
||||
# include <GL/glu.h>
|
||||
#else
|
||||
# include <GL/gl.h>
|
||||
# include <GL/glu.h>
|
||||
# include <GL/gl.h>
|
||||
# include <GL/glu.h>
|
||||
#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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user