remove a few unused variable, and add casts to avoid warnings

This commit is contained in:
erwin coumans 2014-05-16 08:59:34 -07:00
parent a22e129f8b
commit 01ce7a0288
4 changed files with 24 additions and 24 deletions

View File

@ -494,10 +494,10 @@ static int get_quad(struct sth_stash* stash, struct sth_font* fnt, struct sth_gl
ry = (*y + scale * float(glyph->yoff));
q->x0 = rx;
q->y0 = ry + 1.5*0.5f*float(isize)/10.f;
q->y0 = ry + 1.5f*0.5f*float(isize)/10.f;
q->x1 = rx + scale * float(glyph->x1 - glyph->x0_);
q->y1 = ry + scale * float(glyph->y1 - glyph->y0)+ 1.5*0.5f*float(isize)/10.f;
q->y1 = ry + scale * float(glyph->y1 - glyph->y0)+ 1.5f*0.5f*float(isize)/10.f;
q->s0 = float(glyph->x0_) * stash->itw;
q->t0 = float(glyph->y0) * stash->ith;
@ -637,13 +637,13 @@ void sth_draw_texture(struct sth_stash* stash,
q.x1 = q.x0+width;
q.y1 = q.y0+height;
v = setv(v, q.x0, q.y0, 0,0,screenwidth,screenheight);
v = setv(v, q.x1, q.y0, 1,0,screenwidth,screenheight);
v = setv(v, q.x1, q.y1, 1,1,screenwidth,screenheight);
v = setv(v, q.x0, q.y0, 0,0,(float)screenwidth,(float)screenheight);
v = setv(v, q.x1, q.y0, 1,0,(float)screenwidth,(float)screenheight);
v = setv(v, q.x1, q.y1, 1,1,(float)screenwidth,(float)screenheight);
v = setv(v, q.x0, q.y0, 0,0,screenwidth,screenheight);
v = setv(v, q.x1, q.y1, 1,1,screenwidth,screenheight);
v = setv(v, q.x0, q.y1, 0,1,screenwidth,screenheight);
v = setv(v, q.x0, q.y0, 0,0,(float)screenwidth,(float)screenheight);
v = setv(v, q.x1, q.y1, 1,1,(float)screenwidth,(float)screenheight);
v = setv(v, q.x0, q.y1, 0,1,(float)screenwidth,(float)screenheight);
texture->nverts += 6;
}
@ -703,13 +703,13 @@ void sth_draw_text(struct sth_stash* stash,
{
v = &texture->newverts[texture->nverts];
v = setv(v, q.x0, q.y0, q.s0, q.t0,screenwidth,screenheight);
v = setv(v, q.x1, q.y0, q.s1, q.t0,screenwidth,screenheight);
v = setv(v, q.x1, q.y1, q.s1, q.t1,screenwidth,screenheight);
v = setv(v, q.x0, q.y0, q.s0, q.t0,(float)screenwidth,(float)screenheight);
v = setv(v, q.x1, q.y0, q.s1, q.t0,(float)screenwidth,(float)screenheight);
v = setv(v, q.x1, q.y1, q.s1, q.t1,(float)screenwidth,(float)screenheight);
v = setv(v, q.x0, q.y0, q.s0, q.t0,screenwidth,screenheight);
v = setv(v, q.x1, q.y1, q.s1, q.t1,screenwidth,screenheight);
v = setv(v, q.x0, q.y1, q.s0, q.t1,screenwidth,screenheight);
v = setv(v, q.x0, q.y0, q.s0, q.t0,(float)screenwidth,(float)screenheight);
v = setv(v, q.x1, q.y1, q.s1, q.t1,(float)screenwidth,(float)screenheight);
v = setv(v, q.x0, q.y1, q.s0, q.t1,(float)screenwidth,(float)screenheight);
texture->nverts += 6;
}

View File

@ -178,7 +178,7 @@ struct InternalDataRenderer : public GLInstanceRendererInternalData
if (deltay<0 || m_cameraDistance>1)
{
m_cameraDistance -= deltay*0.1;
m_cameraDistance -= deltay*0.1f;
if (m_cameraDistance<1)
m_cameraDistance=1;
} else
@ -234,8 +234,8 @@ struct InternalDataRenderer : public GLInstanceRendererInternalData
}
if (m_rightMouseButton)
{
m_cameraDistance -= xDelta*0.01;
m_cameraDistance -= yDelta*0.01;
m_cameraDistance -= xDelta*0.01f;
m_cameraDistance -= yDelta*0.01f;
if (m_cameraDistance<1)
m_cameraDistance=1;
if (m_cameraDistance>1000)
@ -1205,7 +1205,7 @@ void GLInstancingRenderer::getMouseDirection(float* dir, int x, int y)
float farPlane = 10000.f;
rayForward*= farPlane;
b3Vector3 rightOffset;
// b3Vector3 rightOffset;
b3Vector3 vertical = m_data->m_cameraUp;
b3Vector3 hor;
@ -1270,9 +1270,9 @@ void writeTextureToPng(int textureWidth, int textureHeight, const char* fileName
{
//printf("val[%d,%d]=%f\n", i,j,val);
}
pixels[(j*textureWidth+i)*numComponents]=orgPixels[(j*textureWidth+i)]*255.f;
pixels[(j*textureWidth+i)*numComponents+1]=0.f;//255.f;
pixels[(j*textureWidth+i)*numComponents+2]=0.f;//255.f;
pixels[(j*textureWidth+i)*numComponents]=char(orgPixels[(j*textureWidth+i)]*255.f);
pixels[(j*textureWidth+i)*numComponents+1]=0;//255.f;
pixels[(j*textureWidth+i)*numComponents+2]=0;//255.f;
pixels[(j*textureWidth+i)*numComponents+3]=255;

View File

@ -370,7 +370,7 @@ inline int b3ClipHullHullSingle(
B3_PROFILE("overlap");
b3Float4 normalOnSurfaceB = (b3Float4&)hostNormal;
b3Float4 centerOut;
// b3Float4 centerOut;
b3Int4 contactIdx;
contactIdx.x = 0;
@ -461,7 +461,7 @@ inline int b3ContactConvexConvexSAT(
//printf("numvertsB = %d\n",hullB.m_numVertices);
b3Float4 contactsOut[B3_MAX_VERTS];
// b3Float4 contactsOut[B3_MAX_VERTS];
int contactCapacity = B3_MAX_VERTS;
int numContactsOut=0;

View File

@ -149,7 +149,7 @@ inline bool b3FindSeparatingAxis( const b3ConvexPolyhedronData& hullA, const b3C
}
}
b3Vector3 edgeAstart,edgeAend,edgeBstart,edgeBend;
// b3Vector3 edgeAstart,edgeAend,edgeBstart,edgeBend;
int curEdgeEdge = 0;
// Test edges