X11OpenGLWindow: create stencil buffer for shadows in OpenGL2 mode (OpenGL3 uses shadow maps)
Add 'createCollisionObjectGraphicsObject' API for CommonPhysicsSetup Add 'pthread' dependency as workaround for NVIDIA graphics driver issue (see //See https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers-319/+bug/1248642 )
This commit is contained in:
@@ -4,8 +4,8 @@ Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
|
||||
|
||||
This software is provided 'as-is', without any express or implied warranty.
|
||||
In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it freely,
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it freely,
|
||||
subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
|
||||
@@ -17,6 +17,11 @@ subject to the following restrictions:
|
||||
|
||||
#include "DemoApplication.h"
|
||||
|
||||
#if !defined(_WIN32) && !defined(__APPLE__)
|
||||
//assume linux workaround
|
||||
#include <pthread.h>
|
||||
#endif
|
||||
|
||||
//glut is C code, this global gDemoApplication links glut to the C++ demo
|
||||
static DemoApplication* gDemoApplication = 0;
|
||||
|
||||
@@ -74,9 +79,17 @@ static void glutDisplayCallback(void)
|
||||
//#include <GL/glut.h>
|
||||
|
||||
int glutmain(int argc, char **argv,int width,int height,const char* title,DemoApplication* demoApp) {
|
||||
|
||||
|
||||
gDemoApplication = demoApp;
|
||||
|
||||
#if !defined(_WIN32) && !defined(__APPLE__)
|
||||
//Access pthreads as a workaround for a bug in Linux/Ubuntu
|
||||
//See https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers-319/+bug/1248642
|
||||
|
||||
int i=pthread_getconcurrency();
|
||||
printf("pthread_getconcurrency()=%d\n",i);
|
||||
#endif
|
||||
|
||||
glutInit(&argc, argv);
|
||||
glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGBA | GLUT_DEPTH | GLUT_STENCIL);
|
||||
glutInitWindowPosition(width/2, height/2);
|
||||
@@ -112,7 +125,7 @@ CGLSetParameter(cgl_context, kCGLCPSwapInterval, &swap_interval);
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
glutMainLoop();
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user