diff --git a/btgui/OpenGLTrueTypeFont/fontstash.cpp b/btgui/OpenGLTrueTypeFont/fontstash.cpp index a43b7ff5f..803e155e1 100644 --- a/btgui/OpenGLTrueTypeFont/fontstash.cpp +++ b/btgui/OpenGLTrueTypeFont/fontstash.cpp @@ -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; } diff --git a/btgui/OpenGLWindow/GLInstancingRenderer.cpp b/btgui/OpenGLWindow/GLInstancingRenderer.cpp index b5e96ab3c..e214c3220 100644 --- a/btgui/OpenGLWindow/GLInstancingRenderer.cpp +++ b/btgui/OpenGLWindow/GLInstancingRenderer.cpp @@ -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; diff --git a/src/Bullet3Collision/NarrowPhaseCollision/shared/b3ContactConvexConvexSAT.h b/src/Bullet3Collision/NarrowPhaseCollision/shared/b3ContactConvexConvexSAT.h index b3d0c8031..65b333902 100644 --- a/src/Bullet3Collision/NarrowPhaseCollision/shared/b3ContactConvexConvexSAT.h +++ b/src/Bullet3Collision/NarrowPhaseCollision/shared/b3ContactConvexConvexSAT.h @@ -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; diff --git a/src/Bullet3Collision/NarrowPhaseCollision/shared/b3FindSeparatingAxis.h b/src/Bullet3Collision/NarrowPhaseCollision/shared/b3FindSeparatingAxis.h index 039130016..d7fde0501 100644 --- a/src/Bullet3Collision/NarrowPhaseCollision/shared/b3FindSeparatingAxis.h +++ b/src/Bullet3Collision/NarrowPhaseCollision/shared/b3FindSeparatingAxis.h @@ -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