fix some linux issues (cmake doesn't need to link against OpenGL, X11, Xext since we dynamically load those
move some structures to global namespace
This commit is contained in:
@@ -60,7 +60,7 @@ SET(AppBasicExampleGui_SRCS
|
|||||||
ADD_DEFINITIONS(-DB3_USE_STANDALONE_EXAMPLE)
|
ADD_DEFINITIONS(-DB3_USE_STANDALONE_EXAMPLE)
|
||||||
|
|
||||||
LINK_LIBRARIES(
|
LINK_LIBRARIES(
|
||||||
BulletDynamics BulletCollision LinearMath OpenGLWindow Bullet3Common ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY}
|
BulletDynamics BulletCollision LinearMath OpenGLWindow Bullet3Common
|
||||||
)
|
)
|
||||||
|
|
||||||
#some code to support OpenGL and Glew cross platform
|
#some code to support OpenGL and Glew cross platform
|
||||||
@@ -83,7 +83,7 @@ ELSE(WIN32)
|
|||||||
ADD_DEFINITIONS("-DGLEW_STATIC")
|
ADD_DEFINITIONS("-DGLEW_STATIC")
|
||||||
ADD_DEFINITIONS("-DGLEW_DYNAMIC_LOAD_ALL_GLX_FUNCTIONS=1")
|
ADD_DEFINITIONS("-DGLEW_DYNAMIC_LOAD_ALL_GLX_FUNCTIONS=1")
|
||||||
|
|
||||||
LINK_LIBRARIES( X11 pthread dl Xext)
|
LINK_LIBRARIES( pthread dl )
|
||||||
ENDIF(APPLE)
|
ENDIF(APPLE)
|
||||||
ENDIF(WIN32)
|
ENDIF(WIN32)
|
||||||
|
|
||||||
|
|||||||
@@ -1431,22 +1431,6 @@ extern double gSubStep;
|
|||||||
extern int gHuskyId;
|
extern int gHuskyId;
|
||||||
extern btTransform huskyTr;
|
extern btTransform huskyTr;
|
||||||
|
|
||||||
|
|
||||||
void PhysicsServerExample::drawUserDebugLines()
|
|
||||||
{
|
|
||||||
static char line0[1024];
|
|
||||||
static char line1[1024];
|
|
||||||
|
|
||||||
//draw all user-debug-lines
|
|
||||||
|
|
||||||
//add array of lines
|
|
||||||
|
|
||||||
//draw all user- 'text3d' messages
|
|
||||||
if (m_multiThreadedHelper)
|
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
//if gBatchUserDebugLines is true, batch lines based on color+width, to reduce line draw calls
|
|
||||||
struct LineSegment
|
struct LineSegment
|
||||||
{
|
{
|
||||||
btVector3 m_from;
|
btVector3 m_from;
|
||||||
@@ -1474,6 +1458,22 @@ void PhysicsServerExample::drawUserDebugLines()
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
void PhysicsServerExample::drawUserDebugLines()
|
||||||
|
{
|
||||||
|
static char line0[1024];
|
||||||
|
static char line1[1024];
|
||||||
|
|
||||||
|
//draw all user-debug-lines
|
||||||
|
|
||||||
|
//add array of lines
|
||||||
|
|
||||||
|
//draw all user- 'text3d' messages
|
||||||
|
if (m_multiThreadedHelper)
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
//if gBatchUserDebugLines is true, batch lines based on color+width, to reduce line draw calls
|
||||||
|
|
||||||
btAlignedObjectArray< btAlignedObjectArray<unsigned int> > sortedIndices;
|
btAlignedObjectArray< btAlignedObjectArray<unsigned int> > sortedIndices;
|
||||||
btAlignedObjectArray< btAlignedObjectArray<btVector3FloatData> > sortedLines;
|
btAlignedObjectArray< btAlignedObjectArray<btVector3FloatData> > sortedLines;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user