summaryrefslogtreecommitdiffhomepage
path: root/src/rlgl.h
diff options
context:
space:
mode:
authorKim Kulling <[email protected]>2018-08-05 00:34:35 +0200
committerKim Kulling <[email protected]>2018-08-05 00:34:35 +0200
commitb2cac82fa0190952d59227442e56dbadfe789e51 (patch)
tree164738422e7607dce0d62e67bd079b470c9e4c5b /src/rlgl.h
parentecf8bff4aa8b13357398e42243d1b00fd114c579 (diff)
downloadraylib-b2cac82fa0190952d59227442e56dbadfe789e51.tar.gz
raylib-b2cac82fa0190952d59227442e56dbadfe789e51.zip
Fix compiler warings in texture.c and more.
Diffstat (limited to 'src/rlgl.h')
-rw-r--r--src/rlgl.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/rlgl.h b/src/rlgl.h
index d3b916ea..d2a7375a 100644
--- a/src/rlgl.h
+++ b/src/rlgl.h
@@ -3306,8 +3306,8 @@ Texture2D GenTexturePrefilter(Shader shader, Texture2D cubemap, int size)
for (unsigned int mip = 0; mip < MAX_MIPMAP_LEVELS; mip++)
{
// Resize framebuffer according to mip-level size.
- unsigned int mipWidth = size*powf(0.5f, mip);
- unsigned int mipHeight = size*powf(0.5f, mip);
+ unsigned int mipWidth = size*(int) powf(0.5f, mip);
+ unsigned int mipHeight = size* (int) powf(0.5f, mip);
glBindRenderbuffer(GL_RENDERBUFFER, rbo);
glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_COMPONENT24, mipWidth, mipHeight);
@@ -3633,15 +3633,15 @@ void EndVrDrawing(void)
// Bottom-right corner for texture and quad
rlTexCoord2f(0.0f, 0.0f);
- rlVertex2f(0.0f, vrConfig.stereoFbo.texture.height);
+ rlVertex2f(0.0f, (float)vrConfig.stereoFbo.texture.height);
// Top-right corner for texture and quad
rlTexCoord2f(1.0f, 0.0f);
- rlVertex2f(vrConfig.stereoFbo.texture.width, vrConfig.stereoFbo.texture.height);
+ rlVertex2f( (float)vrConfig.stereoFbo.texture.width, (float)vrConfig.stereoFbo.texture.height);
// Top-left corner for texture and quad
rlTexCoord2f(1.0f, 1.0f);
- rlVertex2f(vrConfig.stereoFbo.texture.width, 0.0f);
+ rlVertex2f( (float)vrConfig.stereoFbo.texture.width, 0.0f);
rlEnd();
rlPopMatrix();
@@ -4502,7 +4502,7 @@ static void SetStereoConfig(VrDeviceInfo hmd)
// Compute distortion scale parameters
// NOTE: To get lens max radius, lensShift must be normalized to [-1..1]
- float lensRadius = fabs(-1.0f - 4.0f*lensShift);
+ float lensRadius = (float)fabs(-1.0f - 4.0f*lensShift);
float lensRadiusSq = lensRadius*lensRadius;
float distortionScale = hmd.lensDistortionValues[0] +
hmd.lensDistortionValues[1]*lensRadiusSq +
@@ -4553,8 +4553,8 @@ static void SetStereoConfig(VrDeviceInfo hmd)
vrConfig.eyesViewOffset[1] = MatrixTranslate(hmd.interpupillaryDistance*0.5f, 0.075f, 0.045f);
// Compute eyes Viewports
- vrConfig.eyesViewport[0] = (Rectangle){ 0, 0, hmd.hResolution/2, hmd.vResolution };
- vrConfig.eyesViewport[1] = (Rectangle){ hmd.hResolution/2, 0, hmd.hResolution/2, hmd.vResolution };
+ vrConfig.eyesViewport[0] = (Rectangle){ 0.0f, 0.0f, (float)hmd.hResolution/2, (float)hmd.vResolution };
+ vrConfig.eyesViewport[1] = (Rectangle){ hmd.hResolution/2.0f, 0.0f, (float)hmd.hResolution/2, (float) hmd.vResolution };
}
// Set internal projection and modelview matrix depending on eyes tracking data