diff --git a/examples/ExampleBrowser/CMakeLists.txt b/examples/ExampleBrowser/CMakeLists.txt index 81d489d04..cd50c7cf2 100644 --- a/examples/ExampleBrowser/CMakeLists.txt +++ b/examples/ExampleBrowser/CMakeLists.txt @@ -101,6 +101,7 @@ ELSE(WIN32) find_library(COCOA NAMES Cocoa) MESSAGE(${COCOA}) link_libraries(${COCOA} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY}) + INCLUDE_DIRECTORIES( ${BULLET_PHYSICS_SOURCE_DIR}/examples/ThirdPartyLibs/glad ) ELSE(APPLE) ADD_DEFINITIONS("-DGLEW_INIT_OPENGL11_FUNCTIONS=1") ADD_DEFINITIONS("-DGLEW_STATIC") diff --git a/examples/OpenGLWindow/CMakeLists.txt b/examples/OpenGLWindow/CMakeLists.txt index 6fedf7148..643f367a8 100644 --- a/examples/OpenGLWindow/CMakeLists.txt +++ b/examples/OpenGLWindow/CMakeLists.txt @@ -3,6 +3,7 @@ INCLUDE_DIRECTORIES( .. ../ThirdPartyLibs ../../src + ../ThirdPartyLibs/glad ) FILE(GLOB OpenGLWindow_HDRS "*.h" ) @@ -30,7 +31,7 @@ IF (WIN32) ENDIF(WIN32) IF (APPLE) - SET(OpenGLWindow_SRCS ${OpenGLWindowMac_CPP} ${OpenGLWindowMacObjC_CPP} ${OpenGLWindowCommon_CPP} ) + SET(OpenGLWindow_SRCS ${OpenGLWindowMac_CPP} ${BULLET_PHYSICS_SOURCE_DIR}/examples/ThirdPartyLibs/glad/glad.c ${OpenGLWindowMacObjC_CPP} ${OpenGLWindowCommon_CPP} ) ENDIF(APPLE) #no Linux detection? diff --git a/examples/StandaloneMain/hellovr_opengl_main.cpp b/examples/StandaloneMain/hellovr_opengl_main.cpp index 76517c2e6..a16aa9270 100644 --- a/examples/StandaloneMain/hellovr_opengl_main.cpp +++ b/examples/StandaloneMain/hellovr_opengl_main.cpp @@ -2,6 +2,7 @@ #ifdef BT_USE_CUSTOM_PROFILER #endif + //========= Copyright Valve Corporation ============// #include "../OpenGLWindow/SimpleOpenGL3App.h" @@ -19,6 +20,12 @@ #include "BulletCollision/CollisionShapes/btCollisionShape.h" #include "BulletDynamics/Dynamics/btDiscreteDynamicsWorld.h" + +#define GL_DO_NOT_WARN_IF_MULTI_GL_VERSION_HEADERS_INCLUDED +#import + + + #include "LinearMath/btIDebugDraw.h" int gSharedMemoryKey = -1; int gDebugDrawFlags = 0; @@ -525,14 +532,6 @@ bool CMainApplication::BInit() } - glewExperimental = GL_TRUE; - GLenum nGlewError = glewInit(); - if (nGlewError != GLEW_OK) - { - printf( "%s - Error initializing GLEW! %s\n", __FUNCTION__, glewGetErrorString( nGlewError ) ); - return false; - } - glGetError(); // to clear the error caused deep in GLEW if ( SDL_GL_SetSwapInterval( m_bVblank ? 1 : 0 ) < 0 ) {