Fix some warnings in examples.

This commit is contained in:
Jeffery Myers 2021-03-22 12:17:55 -07:00
commit d0b693c931
4 changed files with 105 additions and 104 deletions

View file

@ -146,7 +146,7 @@ int main(void)
BeginShaderMode(shaders[currentShader]);
// NOTE: Render texture must be y-flipped due to default OpenGL coordinates (left-bottom)
DrawTextureRec(target.texture, (Rectangle){ 0, 0, target.texture.width, -target.texture.height }, (Vector2){ 0, 0 }, WHITE);
DrawTextureRec(target.texture, (Rectangle){ 0, 0, (float)target.texture.width, (float)-target.texture.height }, (Vector2){ 0, 0 }, WHITE);
EndShaderMode();

View file

@ -56,14 +56,14 @@ int main(void)
// Scatter random cubes around
for (int i = 0; i < count; i++)
{
float x = GetRandomValue(-50, 50);
float y = GetRandomValue(-50, 50);
float z = GetRandomValue(-50, 50);
float x = (float)GetRandomValue(-50, 50);
float y = (float)GetRandomValue(-50, 50);
float z = (float)GetRandomValue(-50, 50);
translations[i] = MatrixTranslate(x, y, z);
x = GetRandomValue(0, 360);
y = GetRandomValue(0, 360);
z = GetRandomValue(0, 360);
x = (float)GetRandomValue(0, 360);
y = (float)GetRandomValue(0, 360);
z = (float)GetRandomValue(0, 360);
Vector3 axis = Vector3Normalize((Vector3){x, y, z});
float angle = (float)GetRandomValue(0, 10) * DEG2RAD;

View file

@ -45,10 +45,10 @@ int main(void)
camera.projection = CAMERA_PERSPECTIVE;
// Define our three models to show the shader on
Mesh torus = GenMeshTorus(.3, 1, 16, 32);
Mesh torus = GenMeshTorus(.3f, 1, 16, 32);
Model model1 = LoadModelFromMesh(torus);
Mesh cube = GenMeshCube(.8,.8,.8);
Mesh cube = GenMeshCube(.8f,.8f,.8f);
Model model2 = LoadModelFromMesh(cube);
// Generate model to be shaded just to see the gaps in the other two

View file

@ -49,7 +49,7 @@ int main(void)
{
// Update
//----------------------------------------------------------------------------------
time = GetTime();
time = (float)GetTime();
SetShaderValue(shader, timeLoc, &time, SHADER_UNIFORM_FLOAT);
//----------------------------------------------------------------------------------