remove all warnings on Mac OSX Snow Leopard

This commit is contained in:
erwin.coumans
2010-01-30 22:31:56 +00:00
parent 77b773f470
commit 788f48643b
40 changed files with 136 additions and 244 deletions

View File

@@ -65,23 +65,24 @@ m_ele(20.f),
m_azi(0.f),
m_cameraPosition(0.f,0.f,0.f),
m_cameraTargetPosition(0.f,0.f,0.f),
m_mouseOldX(0),
m_mouseOldY(0),
m_mouseButtons(0),
m_modifierKeys(0),
m_scaleBottom(0.5f),
m_scaleFactor(2.f),
m_cameraUp(0,1,0),
m_forwardAxis(2),
m_glutScreenWidth(0),
m_glutScreenHeight(0),
m_ortho(0),
m_ShootBoxInitialSpeed(40.f),
m_stepping(true),
m_singleStep(false),
m_idle(false),
m_enableshadows(false),
m_sundirection(btVector3(1,-2,1)*1000),
m_ortho(0),
m_mouseOldX(0),
m_mouseOldY(0),
m_mouseButtons(0),
m_modifierKeys(0)
m_sundirection(btVector3(1,-2,1)*1000)
{
#ifndef BT_NO_PROFILE
m_profileIterator = CProfileManager::Get_Iterator();

View File

@@ -48,6 +48,8 @@ subject to the following restrictions:
#include <string.h> //for memset
extern unsigned char sFontData[];
static bool sTexturesInitialized = false;
static GLuint sTexture = -1;
static int sScreenWidth = -1;
static int sScreenHeight = -1;
@@ -62,8 +64,9 @@ void GLDebugResetFont(int screenWidth,int screenHeight)
sScreenWidth = screenWidth;
sScreenHeight = screenHeight;
if (sTexture==-1)
if (!sTexturesInitialized)
{
sTexturesInitialized = true;
glGenTextures(1, &sTexture);
glBindTexture(GL_TEXTURE_2D, sTexture);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);
@@ -71,8 +74,6 @@ void GLDebugResetFont(int screenWidth,int screenHeight)
glTexImage2D(GL_TEXTURE_2D, 0, 3, 256 , 256 , 0, GL_RGB, GL_UNSIGNED_BYTE, &sFontData[0]);
}
int windowWidth=screenWidth;
int windowHeight = screenHeight;
printf("generating font at resolution %d,%d\n",screenWidth,screenHeight);
}
@@ -82,9 +83,7 @@ void GLDebugResetFont(int screenWidth,int screenHeight)
void GLDebugDrawStringInternal(int x,int y,const char* string, const btVector3& rgb)
{
const char* string2 = "test";
if (sTexture==-1)
if (!sTexturesInitialized)
{
GLDebugResetFont(sScreenWidth,sScreenHeight);
}

View File

@@ -249,12 +249,13 @@ GL_SliderControl* GL_DialogDynamicsWorld::createSlider(GL_DialogWindow* dialog,
btTransform frameInB;
frameInB.setIdentity();
//frameInB.setOrigin(-offset/2);
bool useFrameA = false;
btScalar lowerLimit = 80.f;
btScalar upperLimit = 170.f;
#if 0
bool useFrameA = false;
btGeneric6DofConstraint* constraint = new btGeneric6DofConstraint(*dialogBody,*body,frameInA,frameInB,useFrameA);
m_dynamicsWorld->addConstraint(constraint,true);
constraint->setLimit(0,lowerLimit,upperLimit);
@@ -339,7 +340,7 @@ void GL_DialogDynamicsWorld::draw(btScalar timeStep)
static btRigidBody* pickedBody = 0;//for deactivation state
static btScalar mousePickClamping = 111130.f;
static int gPickingConstraintId = 0;
//static int gPickingConstraintId = 0;
static btVector3 gOldPickingPos;
static btVector3 gHitPos(-1,-1,-1);

View File

@@ -30,9 +30,10 @@ m_dialogWidth(dialogWidth),
m_dialogHeight(dialogHeight),
m_screenWidth(0),
m_screenHeight(0),
m_dialogTitle(dialogTitle),
m_MaxClipPlanes(-1),
m_collisionObject(collisionObject),
m_dialogTitle(dialogTitle)
m_collisionObject(collisionObject)
{
}
@@ -291,7 +292,7 @@ void GL_ToggleControl::draw(int& parentHorPos2,int& parentVertPos2,btScalar delt
if (m_active)
{
//unsigned int red = 0xff8f0000;
unsigned int white = 0xff8f0000;
// unsigned int white = 0xff8f0000;
unsigned int black = 0xff1f1f1f;
borderSize = 4;
drawRect(parentHorPos+borderSize, parentVertPos+borderSize, parentHorPos+16-borderSize, parentVertPos+16-borderSize, black,black,black,black);

View File

@@ -130,10 +130,10 @@ public:
GL_SliderControl(const char* sliderText,btCollisionObject* sliderBody, GL_DialogWindow* parentWindow, btScalar lowerLimit,btScalar upperLimit,btTypedConstraint* constaint)
:m_sliderBody(sliderBody),
m_parentWindow(parentWindow),
m_sliderText(sliderText),
m_lowerLimit(lowerLimit),
m_upperLimit(upperLimit),
m_constraint(constaint)
m_constraint(constaint),
m_sliderText(sliderText)
{
m_type = GL_SLIDER_CONTROL;
}

View File

@@ -532,7 +532,7 @@ void GL_ShapeDrawer::drawOpenGL(btScalar* m, const btCollisionShape* shape, cons
static const GLfloat planex[]={1,0,0,0};
static const GLfloat planey[]={0,1,0,0};
// static const GLfloat planey[]={0,1,0,0};
static const GLfloat planez[]={0,0,1,0};
glTexGenfv(GL_S,GL_OBJECT_PLANE,planex);
glTexGenfv(GL_T,GL_OBJECT_PLANE,planez);
@@ -839,10 +839,10 @@ void GL_ShapeDrawer::drawOpenGL(btScalar* m, const btCollisionShape* shape, cons
btVector3 normal;
btVector3 vtx;
polyshape->getPlane(normal,vtx,i);
btScalar d = vtx.dot(normal);
//btScalar d = vtx.dot(normal);
char buf[12];
sprintf(buf," plane %d",i);
//char buf[12];
//sprintf(buf," plane %d",i);
//btDrawString(BMF_GetFont(BMF_kHelvetica10),buf);
}
@@ -921,7 +921,7 @@ void GL_ShapeDrawer::drawShadow(btScalar* m,const btVector3& extrusion,const bt
}
else
{
bool useWireframeFallback = true;
// bool useWireframeFallback = true;
if (shape->isConvex())
{
ShapeCache* sc=cache((btConvexShape*)shape);