Cleanup some #defines in parallel collision detector, add conditional freeglut support to return from glutMainLoop.
This commit is contained in:
@@ -225,7 +225,7 @@ void MouseMotion(int x, int y)
|
||||
demo->mouseMotionFunc(x,y);
|
||||
}
|
||||
|
||||
#if (defined (WIN32) && defined (_MSC_VER))
|
||||
#ifdef BT_USE_FREEGLUT
|
||||
#include "GL/freeglut_ext.h"
|
||||
#endif
|
||||
|
||||
@@ -241,7 +241,7 @@ int main(int argc, char** argv)
|
||||
glutInitDisplayMode(GLUT_RGBA | GLUT_DOUBLE |GLUT_DEPTH);
|
||||
glutInitWindowSize(width, height);
|
||||
mainWindow = glutCreateWindow("http://bulletphysics.com");
|
||||
#if (defined (WIN32) && defined (_MSC_VER))
|
||||
#ifdef BT_USE_FREEGLUT
|
||||
glutSetOption (GLUT_ACTION_ON_WINDOW_CLOSE, GLUT_ACTION_GLUTMAINLOOP_RETURNS);
|
||||
#endif
|
||||
entry = g_demoEntries + testIndex;
|
||||
|
||||
@@ -256,7 +256,7 @@ void DemoApplication::keyboardCallback(unsigned char key, int x, int y)
|
||||
switch (key)
|
||||
{
|
||||
case 'q' :
|
||||
#if (defined (WIN32) && defined (_MSC_VER))
|
||||
#ifdef BT_USE_FREEGLUT
|
||||
//return from glutMainLoop(), detect memory leaks etc.
|
||||
glutLeaveMainLoop();
|
||||
#else
|
||||
|
||||
@@ -75,7 +75,7 @@ int glutmain(int argc, char **argv,int width,int height,const char* title,DemoAp
|
||||
glutInitWindowPosition(0, 0);
|
||||
glutInitWindowSize(width, height);
|
||||
glutCreateWindow(title);
|
||||
#if (defined (WIN32) && defined (_MSC_VER))
|
||||
#ifdef BT_USE_FREEGLUT
|
||||
glutSetOption (GLUT_ACTION_ON_WINDOW_CLOSE, GLUT_ACTION_GLUTMAINLOOP_RETURNS);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ subject to the following restrictions:
|
||||
#include <GL/glut.h>
|
||||
#endif
|
||||
|
||||
#if (defined (WIN32) && defined (_MSC_VER))
|
||||
#if BT_USE_FREEGLUT
|
||||
#include "GL/freeglut_ext.h" //to be able to return from glutMainLoop()
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user