Review literals type
This commit is contained in:
parent
91e00431d4
commit
183795b8aa
31 changed files with 133 additions and 125 deletions
|
@ -21,7 +21,7 @@ int main()
|
|||
InitWindow(screenWidth, screenHeight, "raylib [models] example - geometric shapes");
|
||||
|
||||
// Define the camera to look into our 3d world
|
||||
Camera camera = {{ 0.0, 10.0, 10.0 }, { 0.0, 0.0, 0.0 }, { 0.0, 1.0, 0.0 }};
|
||||
Camera camera = {{ 0.0f, 10.0f, 10.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 1.0f, 0.0f }};
|
||||
|
||||
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
@ -42,21 +42,21 @@ int main()
|
|||
|
||||
Begin3dMode(camera);
|
||||
|
||||
DrawCube((Vector3){-4, 0, 2}, 2, 5, 2, RED);
|
||||
DrawCubeWires((Vector3){-4, 0, 2}, 2, 5, 2, GOLD);
|
||||
DrawCubeWires((Vector3){-4, 0, -2}, 3, 6, 2, MAROON);
|
||||
DrawCube((Vector3){-4.0f, 0.0f, 2.0f}, 2.0f, 5.0f, 2.0f, RED);
|
||||
DrawCubeWires((Vector3){-4.0f, 0.0f, 2.0f}, 2.0f, 5.0f, 2.0f, GOLD);
|
||||
DrawCubeWires((Vector3){-4.0f, 0.0f, -2.0f}, 3.0f, 6.0f, 2.0f, MAROON);
|
||||
|
||||
DrawSphere((Vector3){-1, 0, -2}, 1, GREEN);
|
||||
DrawSphereWires((Vector3){1, 0, 2}, 2, 16, 16, LIME);
|
||||
DrawSphere((Vector3){-1.0f, 0.0f, -2.0f}, 1.0f, GREEN);
|
||||
DrawSphereWires((Vector3){1.0f, 0.0f, 2.0f}, 2.0f, 16, 16, LIME);
|
||||
|
||||
DrawCylinder((Vector3){4, 0, -2}, 1, 2, 3, 4, SKYBLUE);
|
||||
DrawCylinderWires((Vector3){4, 0, -2}, 1, 2, 3, 4, DARKBLUE);
|
||||
DrawCylinderWires((Vector3){4.5, -1, 2}, 1, 1, 2, 6, BROWN);
|
||||
DrawCylinder((Vector3){4.0f, 0.0f, -2.0f}, 1.0f, 2.0f, 3.0f, 4, SKYBLUE);
|
||||
DrawCylinderWires((Vector3){4.0f, 0.0f, -2.0f}, 1.0f, 2.0f, 3.0f, 4, DARKBLUE);
|
||||
DrawCylinderWires((Vector3){4.5f, -1.0f, 2.0f}, 1.0f, 1.0f, 2.0f, 6, BROWN);
|
||||
|
||||
DrawCylinder((Vector3){1, 0, -4}, 0, 1.5, 3, 8, GOLD);
|
||||
DrawCylinderWires((Vector3){1, 0, -4}, 0, 1.5, 3, 8, PINK);
|
||||
DrawCylinder((Vector3){1.0f, 0.0f, -4.0f}, 0.0f, 1.5f, 3.0f, 8, GOLD);
|
||||
DrawCylinderWires((Vector3){1.0f, 0.0f, -4.0f}, 0.0f, 1.5f, 3.0f, 8, PINK);
|
||||
|
||||
DrawGrid(10.0, 1.0); // Draw a grid
|
||||
DrawGrid(10, 1.0f); // Draw a grid
|
||||
|
||||
End3dMode();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue