EGL OpenGL window.
This commit is contained in:
@@ -12,7 +12,11 @@
|
||||
#include "Win32OpenGLWindow.h"
|
||||
#else
|
||||
//let's cross the fingers it is Linux/X11
|
||||
#ifdef BT_USE_EGL
|
||||
#include "EGLOpenGLWindow.h"
|
||||
#else
|
||||
#include "X11OpenGLWindow.h"
|
||||
#endif //BT_USE_EGL
|
||||
#endif //_WIN32
|
||||
#endif//__APPLE__
|
||||
#include <stdio.h>
|
||||
@@ -151,19 +155,21 @@ SimpleOpenGL3App::SimpleOpenGL3App( const char* title, int width,int height, boo
|
||||
|
||||
b3Assert(glGetError() ==GL_NO_ERROR);
|
||||
|
||||
#ifndef NO_GLEW
|
||||
#ifndef __APPLE__
|
||||
#ifndef _WIN32
|
||||
//some Linux implementations need the 'glewExperimental' to be true
|
||||
//some Linux implementations need the 'glewExperimental' to be true
|
||||
glewExperimental = GL_TRUE;
|
||||
#endif
|
||||
|
||||
|
||||
#endif //_WIN32
|
||||
|
||||
|
||||
if (glewInit() != GLEW_OK)
|
||||
exit(1); // or handle the error in a nicer way
|
||||
if (!GLEW_VERSION_2_1) // check that the machine supports the 2.1 API.
|
||||
exit(1); // or handle the error in a nicer way
|
||||
|
||||
#endif
|
||||
|
||||
#endif //__APPLE__
|
||||
#endif //NO_GLEW
|
||||
glGetError();//don't remove this call, it is needed for Ubuntu
|
||||
|
||||
b3Assert(glGetError() ==GL_NO_ERROR);
|
||||
|
||||
Reference in New Issue
Block a user