run the PhysicsServerExample 'stepSimulation' smoother
fix a warning in ThirdParty/stb_image fix an single/double precision issue in btPolyhedralContactClipping.cpp
This commit is contained in:
@@ -169,8 +169,12 @@ bool PhysicsServerExample::wantsTermination()
|
|||||||
|
|
||||||
void PhysicsServerExample::stepSimulation(float deltaTime)
|
void PhysicsServerExample::stepSimulation(float deltaTime)
|
||||||
{
|
{
|
||||||
|
btClock rtc;
|
||||||
|
btScalar endTime = rtc.getTimeMilliseconds() + deltaTime*btScalar(800);
|
||||||
|
while (rtc.getTimeMilliseconds()<endTime)
|
||||||
|
{
|
||||||
m_physicsServer.processClientCommands();
|
m_physicsServer.processClientCommands();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void PhysicsServerExample::renderScene()
|
void PhysicsServerExample::renderScene()
|
||||||
|
|||||||
@@ -2619,7 +2619,7 @@ static int shiftsigned(int v, int shift, int bits)
|
|||||||
static stbi_uc *bmp_load(stbi *s, int *x, int *y, int *comp, int req_comp)
|
static stbi_uc *bmp_load(stbi *s, int *x, int *y, int *comp, int req_comp)
|
||||||
{
|
{
|
||||||
uint8 *out;
|
uint8 *out;
|
||||||
unsigned int mr=0,mg=0,mb=0,ma=0, fake_a=0;
|
unsigned int mr=0,mg=0,mb=0,ma=0;//, fake_a=0;
|
||||||
stbi_uc pal[256][4];
|
stbi_uc pal[256][4];
|
||||||
int psize=0,i,j,compress=0,width;
|
int psize=0,i,j,compress=0,width;
|
||||||
int bpp, flip_vertically, pad, target, offset, hsz;
|
int bpp, flip_vertically, pad, target, offset, hsz;
|
||||||
@@ -2668,7 +2668,7 @@ static stbi_uc *bmp_load(stbi *s, int *x, int *y, int *comp, int req_comp)
|
|||||||
mg = 0xffu << 8;
|
mg = 0xffu << 8;
|
||||||
mb = 0xffu << 0;
|
mb = 0xffu << 0;
|
||||||
ma = 0xffu << 24;
|
ma = 0xffu << 24;
|
||||||
fake_a = 1; // @TODO: check for cases like alpha value is all 0 and switch it to 255
|
//fake_a = 1; // @TODO: check for cases like alpha value is all 0 and switch it to 255
|
||||||
} else {
|
} else {
|
||||||
mr = 31u << 10;
|
mr = 31u << 10;
|
||||||
mg = 31u << 5;
|
mg = 31u << 5;
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ static int gActualSATPairTests=0;
|
|||||||
|
|
||||||
inline bool IsAlmostZero(const btVector3& v)
|
inline bool IsAlmostZero(const btVector3& v)
|
||||||
{
|
{
|
||||||
if(fabsf(v.x())>1e-6 || fabsf(v.y())>1e-6 || fabsf(v.z())>1e-6) return false;
|
if(btFabs(v.x())>1e-6 || btFabs(v.y())>1e-6 || btFabs(v.z())>1e-6) return false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user