diff options
| author | Ray <[email protected]> | 2022-11-15 12:26:22 +0100 |
|---|---|---|
| committer | Ray <[email protected]> | 2022-11-15 12:26:22 +0100 |
| commit | 3c51d066f1f6e2a2035b74d4475aa2f9628eb1c3 (patch) | |
| tree | 2ad2c2613b8818ef8aa9c437b69eb50c2aa4ca86 /examples/core | |
| parent | fadc29d811de346218b4d03a41e3d90904043bd6 (diff) | |
| download | raylib-3c51d066f1f6e2a2035b74d4475aa2f9628eb1c3.tar.gz raylib-3c51d066f1f6e2a2035b74d4475aa2f9628eb1c3.zip | |
Avoid using `DrawCubeTexture()`
Diffstat (limited to 'examples/core')
| -rw-r--r-- | examples/core/core_split_screen.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/examples/core/core_split_screen.c b/examples/core/core_split_screen.c index 21bd9615..1f1f3967 100644 --- a/examples/core/core_split_screen.c +++ b/examples/core/core_split_screen.c @@ -15,7 +15,6 @@ #include "raylib.h" -Texture2D textureGrid = { 0 }; Camera cameraPlayer1 = { 0 }; Camera cameraPlayer2 = { 0 }; @@ -32,8 +31,8 @@ void DrawScene(void) { for (float z = -count*spacing; z <= count*spacing; z += spacing) { - DrawCubeTexture(textureGrid, (Vector3) { x, 1.5f, z }, 1, 1, 1, GREEN); - DrawCubeTexture(textureGrid, (Vector3) { x, 0.5f, z }, 0.25f, 1, 0.25f, BROWN); + DrawCube((Vector3) { x, 1.5f, z }, 1, 1, 1, LIME); + DrawCube((Vector3) { x, 0.5f, z }, 0.25f, 1, 0.25f, BROWN); } } @@ -54,13 +53,6 @@ int main(void) InitWindow(screenWidth, screenHeight, "raylib [core] example - split screen"); - // Generate a simple texture to use for trees - Image img = GenImageChecked(256, 256, 32, 32, DARKGRAY, WHITE); - textureGrid = LoadTextureFromImage(img); - UnloadImage(img); - SetTextureFilter(textureGrid, TEXTURE_FILTER_ANISOTROPIC_16X); - SetTextureWrap(textureGrid, TEXTURE_WRAP_CLAMP); - // Setup player 1 camera and screen cameraPlayer1.fovy = 45.0f; cameraPlayer1.up.y = 1.0f; @@ -151,7 +143,6 @@ int main(void) //-------------------------------------------------------------------------------------- UnloadRenderTexture(screenPlayer1); // Unload render texture UnloadRenderTexture(screenPlayer2); // Unload render texture - UnloadTexture(textureGrid); // Unload texture CloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- |
