Cleanup compilation warnings.
This commit is contained in:
@@ -385,7 +385,7 @@ static GLfloat floorShadow[4][4];
|
||||
static void
|
||||
redraw(void)
|
||||
{
|
||||
int start, end;
|
||||
int start = 0, end = 0 ;
|
||||
|
||||
if (reportSpeed) {
|
||||
start = glutGet(GLUT_ELAPSED_TIME);
|
||||
|
||||
@@ -138,7 +138,7 @@ void ConvexDecompositionDemo::initPhysics(const char* filename)
|
||||
std::vector<btVector3> vertices;
|
||||
if ( 1 )
|
||||
{
|
||||
const unsigned int *src = result.mHullIndices;
|
||||
//const unsigned int *src = result.mHullIndices;
|
||||
for (unsigned int i=0; i<result.mHullVcount; i++)
|
||||
{
|
||||
btVector3 vertex(result.mHullVertices[i*3],result.mHullVertices[i*3+1],result.mHullVertices[i*3+2]);
|
||||
@@ -152,7 +152,7 @@ void ConvexDecompositionDemo::initPhysics(const char* filename)
|
||||
|
||||
if ( 1 )
|
||||
{
|
||||
const unsigned int *src = result.mHullIndices;
|
||||
//const unsigned int *src = result.mHullIndices;
|
||||
for (unsigned int i=0; i<result.mHullVcount; i++)
|
||||
{
|
||||
btVector3 vertex(result.mHullVertices[i*3],result.mHullVertices[i*3+1],result.mHullVertices[i*3+2]);
|
||||
@@ -197,7 +197,7 @@ void ConvexDecompositionDemo::initPhysics(const char* filename)
|
||||
}
|
||||
|
||||
float mass = 1.f;
|
||||
float collisionMargin = 0.01f;
|
||||
//float collisionMargin = 0.01f;
|
||||
|
||||
//this is a tools issue: due to collision margin, convex objects overlap, compensate for it here:
|
||||
//#define SHRINK_OBJECT_INWARDS 1
|
||||
|
||||
@@ -300,7 +300,7 @@ static bool TestEPA(const MyConvex& hull0, const MyConvex& hull1)
|
||||
#endif
|
||||
|
||||
|
||||
btConvexPenetrationDepthSolver* Solver;
|
||||
btConvexPenetrationDepthSolver* Solver = NULL ;
|
||||
if(gMethod==0)
|
||||
Solver = &Solver0;
|
||||
else if(gMethod==1)
|
||||
|
||||
@@ -431,7 +431,6 @@ void DemoApplication::shootBox(const btVector3& destination)
|
||||
|
||||
if (m_dynamicsWorld)
|
||||
{
|
||||
bool isDynamic = true;
|
||||
float mass = 1.f;
|
||||
btTransform startTransform;
|
||||
startTransform.setIdentity();
|
||||
@@ -851,14 +850,11 @@ void DemoApplication::renderme()
|
||||
|
||||
|
||||
//bool useBulletLCP = !(getDebugMode() & btIDebugDraw::DBG_DisableBulletLCP);
|
||||
|
||||
bool useCCD = (getDebugMode() & btIDebugDraw::DBG_EnableCCD);
|
||||
|
||||
/* glRasterPos3f(xOffset,yStart,0);
|
||||
sprintf(buf,"1 CCD mode (adhoc) = %i",useCCD);
|
||||
BMF_DrawString(BMF_GetFont(BMF_kHelvetica10),buf);
|
||||
yStart += yIncr;
|
||||
*/
|
||||
//bool useCCD = (getDebugMode() & btIDebugDraw::DBG_EnableCCD);
|
||||
//glRasterPos3f(xOffset,yStart,0);
|
||||
//sprintf(buf,"1 CCD mode (adhoc) = %i",useCCD);
|
||||
//BMF_DrawString(BMF_GetFont(BMF_kHelvetica10),buf);
|
||||
//yStart += yIncr;
|
||||
|
||||
|
||||
glRasterPos3f(xOffset,yStart,0);
|
||||
|
||||
@@ -93,4 +93,5 @@ void GLDebugDrawer::drawAabb(const btVector3& from,const btVector3& to,const btV
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1389,7 +1389,7 @@ Last column is added as the position
|
||||
*/
|
||||
#define ADJOINT_4X4(a,m) \
|
||||
{ \
|
||||
char _i_,_j_; \
|
||||
int _i_,_j_; \
|
||||
\
|
||||
for (_i_=0; _i_<4; _i_++) { \
|
||||
for (_j_=0; _j_<4; _j_++) { \
|
||||
|
||||
@@ -74,6 +74,7 @@ void btGIMPACTMeshData::addMeshPart(btStridingMeshInterface* meshInterface, int
|
||||
int_type = G_STYPE_INT;
|
||||
break;
|
||||
case PHY_SHORT:
|
||||
default :
|
||||
int_type = G_STYPE_SHORT;
|
||||
break;
|
||||
}
|
||||
@@ -85,6 +86,7 @@ void btGIMPACTMeshData::addMeshPart(btStridingMeshInterface* meshInterface, int
|
||||
vert_type = G_STYPE_REAL;
|
||||
break;
|
||||
case PHY_DOUBLE:
|
||||
default :
|
||||
vert_type = G_STYPE_REAL2;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -170,25 +170,35 @@ FrameBufferObject::FrameBufferObject ( int _width ,
|
||||
break ;
|
||||
}
|
||||
|
||||
fprintf(stderr,"@a\n" ) ;
|
||||
glGenTextures ( 1, & textureHandle ) ;
|
||||
fprintf(stderr,"@b\n" ) ;
|
||||
glBindTexture ( GL_TEXTURE_2D, textureHandle ) ;
|
||||
fprintf(stderr,"@c\n" ) ;
|
||||
glTexParameterf ( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST ) ;
|
||||
fprintf(stderr,"@d\n" ) ;
|
||||
glTexParameterf ( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST ) ;
|
||||
fprintf(stderr,"@e\n" ) ;
|
||||
//glTexParameteri ( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE ) ;
|
||||
//glTexParameteri ( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE ) ;
|
||||
fillTexture ( (void *) NULL ) ;
|
||||
fprintf(stderr,"@f\n" ) ;
|
||||
|
||||
glGenFramebuffersEXT ( 1, & fboHandle ) ;
|
||||
fprintf(stderr,"@g\n" ) ;
|
||||
glBindFramebufferEXT ( GL_FRAMEBUFFER_EXT, fboHandle ) ;
|
||||
fprintf(stderr,"@h\n" ) ;
|
||||
|
||||
glFramebufferTexture2DEXT ( GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT,
|
||||
GL_TEXTURE_2D, textureHandle, 0 ) ;
|
||||
fprintf(stderr,"@i\n" ) ;
|
||||
|
||||
#ifdef NEED_DEPTH_BUFFER
|
||||
static GLuint depth_rb = 0 ;
|
||||
|
||||
if ( depth_rb == 0 )
|
||||
{
|
||||
fprintf(stderr,"@j\n" ) ;
|
||||
glGenRenderbuffersEXT ( 1, & depth_rb ) ;
|
||||
glBindRenderbufferEXT ( GL_RENDERBUFFER_EXT, depth_rb ) ;
|
||||
glRenderbufferStorageEXT ( GL_RENDERBUFFER_EXT, GL_DEPTH_COMPONENT24,
|
||||
@@ -197,13 +207,19 @@ FrameBufferObject::FrameBufferObject ( int _width ,
|
||||
GL_RENDERBUFFER_EXT, depth_rb ) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf(stderr,"@k\n" ) ;
|
||||
glFramebufferRenderbufferEXT ( GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT,
|
||||
GL_RENDERBUFFER_EXT, depth_rb ) ;
|
||||
}
|
||||
#else
|
||||
fprintf(stderr,"@l\n" ) ;
|
||||
glDisable ( GL_DEPTH_TEST ) ;
|
||||
glDepthMask ( 0 ) ;
|
||||
fprintf(stderr,"@m\n" ) ;
|
||||
glFramebufferRenderbufferEXT ( GL_FRAMEBUFFER_EXT , GL_DEPTH_ATTACHMENT_EXT,
|
||||
GL_RENDERBUFFER_EXT, 0 ) ;
|
||||
fprintf(stderr,"@n\n" ) ;
|
||||
#endif
|
||||
|
||||
#ifdef NEED_STENCIL_BUFFER
|
||||
@@ -211,6 +227,7 @@ FrameBufferObject::FrameBufferObject ( int _width ,
|
||||
|
||||
if ( stencil_rb == 0 )
|
||||
{
|
||||
fprintf(stderr,"@o\n" ) ;
|
||||
glGenRenderbuffersEXT ( 1, & stencil_rb ) ;
|
||||
glBindRenderbufferEXT ( GL_RENDERBUFFER_EXT, stencil_rb ) ;
|
||||
glRenderbufferStorageEXT ( GL_RENDERBUFFER_EXT, GL_STENCIL_INDEX,
|
||||
@@ -222,16 +239,21 @@ FrameBufferObject::FrameBufferObject ( int _width ,
|
||||
glFramebufferRenderbufferEXT ( GL_FRAMEBUFFER_EXT , GL_STENCIL_ATTACHMENT_EXT,
|
||||
GL_RENDERBUFFER_EXT, stencil_rb ) ;
|
||||
#else
|
||||
fprintf(stderr,"@p\n" ) ;
|
||||
glDisable ( GL_STENCIL_TEST ) ;
|
||||
glStencilMask ( 0 ) ;
|
||||
fprintf(stderr,"@q\n" ) ;
|
||||
glFramebufferRenderbufferEXT ( GL_FRAMEBUFFER_EXT , GL_STENCIL_ATTACHMENT_EXT,
|
||||
GL_RENDERBUFFER_EXT, 0 ) ;
|
||||
fprintf(stderr,"@r\n" ) ;
|
||||
#endif
|
||||
|
||||
// Check framebuffer completeness at the end of initialization.
|
||||
|
||||
checkFrameBufferStatus () ;
|
||||
fprintf(stderr,"@s\n" ) ;
|
||||
restoreFrameBuffer () ;
|
||||
fprintf(stderr,"@t\n" ) ;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -45,4 +45,5 @@ private:
|
||||
|
||||
|
||||
};
|
||||
#endif //SPHERE_TRIANGLE_DETECTOR_H
|
||||
#endif //SPHERE_TRIANGLE_DETECTOR_H
|
||||
|
||||
|
||||
@@ -282,4 +282,5 @@ float btConvexConvexAlgorithm::calculateTimeOfImpact(btCollisionObject* col0,btC
|
||||
|
||||
return resultFraction;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -39,3 +39,4 @@ void btTriangleBuffer::processTriangle(btVector3* triangle,int partId,int trian
|
||||
|
||||
m_triangleBuffer.push_back(tri);
|
||||
}
|
||||
|
||||
|
||||
@@ -57,4 +57,5 @@ public:
|
||||
};
|
||||
|
||||
|
||||
#endif //BT_TRIANGLE_BUFFER_H
|
||||
#endif //BT_TRIANGLE_BUFFER_H
|
||||
|
||||
|
||||
@@ -104,7 +104,7 @@ float resolveSingleCollision(
|
||||
|
||||
btScalar Kfps = 1.f / solverInfo.m_timeStep ;
|
||||
|
||||
float damping = solverInfo.m_damping ;
|
||||
// float damping = solverInfo.m_damping ;
|
||||
float Kerp = solverInfo.m_erp;
|
||||
float Kcor = Kerp *Kfps;
|
||||
|
||||
@@ -136,7 +136,7 @@ float resolveSingleCollision(
|
||||
{
|
||||
body2.internalApplyImpulse(contactPoint.m_normalWorldOnB*body2.getInvMass(),cpd->m_angularComponentB,-normalImpulse);
|
||||
}
|
||||
#else USE_INTERNAL_APPLY_IMPULSE
|
||||
#else //USE_INTERNAL_APPLY_IMPULSE
|
||||
body1.applyImpulse(normal*(normalImpulse), rel_pos1);
|
||||
body2.applyImpulse(-normal*(normalImpulse), rel_pos2);
|
||||
#endif //USE_INTERNAL_APPLY_IMPULSE
|
||||
@@ -215,7 +215,7 @@ float resolveSingleFriction(
|
||||
body2.internalApplyImpulse(cpd->m_frictionWorldTangential0*body2.getInvMass(),cpd->m_frictionAngularComponent0B,-j1);
|
||||
body2.internalApplyImpulse(cpd->m_frictionWorldTangential1*body2.getInvMass(),cpd->m_frictionAngularComponent1B,-j2);
|
||||
}
|
||||
#else USE_INTERNAL_APPLY_IMPULSE
|
||||
#else //USE_INTERNAL_APPLY_IMPULSE
|
||||
body1.applyImpulse((j1 * cpd->m_frictionWorldTangential0)+(j2 * cpd->m_frictionWorldTangential1), rel_pos1);
|
||||
body2.applyImpulse((j1 * -cpd->m_frictionWorldTangential0)+(j2 * -cpd->m_frictionWorldTangential1), rel_pos2);
|
||||
#endif //USE_INTERNAL_APPLY_IMPULSE
|
||||
@@ -317,7 +317,7 @@ float resolveSingleCollisionCombined(
|
||||
|
||||
btScalar Kfps = 1.f / solverInfo.m_timeStep ;
|
||||
|
||||
float damping = solverInfo.m_damping ;
|
||||
//float damping = solverInfo.m_damping ;
|
||||
float Kerp = solverInfo.m_erp;
|
||||
float Kcor = Kerp *Kfps;
|
||||
|
||||
@@ -350,7 +350,7 @@ float resolveSingleCollisionCombined(
|
||||
{
|
||||
body2.internalApplyImpulse(contactPoint.m_normalWorldOnB*body2.getInvMass(),cpd->m_angularComponentB,-normalImpulse);
|
||||
}
|
||||
#else USE_INTERNAL_APPLY_IMPULSE
|
||||
#else //USE_INTERNAL_APPLY_IMPULSE
|
||||
body1.applyImpulse(normal*(normalImpulse), rel_pos1);
|
||||
body2.applyImpulse(-normal*(normalImpulse), rel_pos2);
|
||||
#endif //USE_INTERNAL_APPLY_IMPULSE
|
||||
|
||||
@@ -165,4 +165,5 @@ void btGeometryUtil::getVerticesFromPlaneEquations(const std::vector<btVector3>&
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -36,4 +36,5 @@ class btGeometryUtil
|
||||
};
|
||||
|
||||
|
||||
#endif //BT_GEOMETRY_UTIL_H
|
||||
#endif //BT_GEOMETRY_UTIL_H
|
||||
|
||||
|
||||
Reference in New Issue
Block a user