fix mac osx build
This commit is contained in:
@@ -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")
|
||||
|
||||
@@ -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?
|
||||
|
||||
@@ -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 <Cocoa/Cocoa.h>
|
||||
|
||||
|
||||
|
||||
#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 )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user