diff --git a/examples/models_cubicmap.c b/examples/models_cubicmap.c index 60e93c6da..62f7b076e 100644 --- a/examples/models_cubicmap.c +++ b/examples/models_cubicmap.c @@ -23,13 +23,13 @@ int main() // Define the camera to look into our 3d world Camera camera = {{ 7.0, 7.0, 7.0 }, { 0.0, 0.0, 0.0 }, { 0.0, 1.0, 0.0 }}; - Image img = LoadImage("resources/cubicmap.png"); // Load cubesmap image (RAM) - Texture2D texture = LoadTextureFromImage(img, false); // Convert image to texture (VRAM) - Model map = LoadCubicmap(img); // Load cubicmap model + Image image = LoadImage("resources/cubicmap.png"); // Load cubesmap image (RAM) + Texture2D texture = LoadTextureFromImage(image); // Convert image to texture (VRAM) + Model map = LoadCubicmap(image); // Load cubicmap model (generate model from image) SetModelTexture(&map, texture); // Bind texture to model Vector3 mapPosition = { -1, 0.0, -1 }; // Set model position - UnloadImage(img); // Unload cubesmap image from RAM, already uploaded to VRAM + UnloadImage(image); // Unload cubesmap image from RAM, already uploaded to VRAM SetTargetFPS(60); // Set our game to run at 60 frames-per-second //-------------------------------------------------------------------------------------- diff --git a/examples/models_heightmap.c b/examples/models_heightmap.c index 7121c2615..a23656a56 100644 --- a/examples/models_heightmap.c +++ b/examples/models_heightmap.c @@ -23,13 +23,13 @@ int main() // Define the camera to look into our 3d world Camera camera = {{ 10.0, 12.0, 10.0 }, { 0.0, 0.0, 0.0 }, { 0.0, 1.0, 0.0 }}; - Image img = LoadImage("resources/heightmap.png"); // Load heightmap image (RAM) - Texture2D texture = LoadTextureFromImage(img, false); // Convert image to texture (VRAM) - Model map = LoadHeightmap(img, 4); // Load heightmap model + Image image = LoadImage("resources/heightmap.png"); // Load heightmap image (RAM) + Texture2D texture = LoadTextureFromImage(image); // Convert image to texture (VRAM) + Model map = LoadHeightmap(image, 4); // Load heightmap model SetModelTexture(&map, texture); // Bind texture to model Vector3 mapPosition = { -4, 0.0, -4 }; // Set model position - UnloadImage(img); // Unload heightmap image from RAM, already uploaded to VRAM + UnloadImage(image); // Unload heightmap image from RAM, already uploaded to VRAM SetTargetFPS(60); // Set our game to run at 60 frames-per-second //-------------------------------------------------------------------------------------- diff --git a/examples/models_planes.c b/examples/models_planes.c index b0a6b8780..58b5137e4 100644 --- a/examples/models_planes.c +++ b/examples/models_planes.c @@ -42,8 +42,7 @@ int main() Begin3dMode(camera); - DrawPlane((Vector3){ 0, 0, 0 }, (Vector2){ 4, 4 }, (Vector3){ 0, 45, 0 }, RED); - //DrawPlaneEx((Vector3){ 0, 8, 0 }, (Vector2){ 2, 1 }, (Vector3){ 0, 0, 0 }, 4, 4, SKYBLUE); + DrawPlane((Vector3){ 0, 0, 0 }, (Vector2){ 4, 4 }, RED); // Draw a plane XZ DrawGrid(10.0, 1.0); diff --git a/examples/textures_compressed_dds.c b/examples/textures_compressed_dds.c index d2ba58c8d..1092d5caf 100644 --- a/examples/textures_compressed_dds.c +++ b/examples/textures_compressed_dds.c @@ -24,8 +24,8 @@ int main() InitWindow(screenWidth, screenHeight, "raylib [textures] example - DDS texture loading and drawing"); // NOTE: Textures MUST be loaded after Window initialization (OpenGL context is required) - //Texture2D texture = LoadTexture("resources/raylib_logo.dds"); // Texture loading (compressed) - Texture2D texture = LoadTexture("resources/raylib_logo_uncompressed.dds"); // Texture loading (uncompressed) + + Texture2D texture = LoadTexture("resources/raylib_logo.dds"); // Texture loading (compressed) SetTargetFPS(60); // Set our game to run at 60 frames-per-second //--------------------------------------------------------------------------------------- diff --git a/examples/textures_image_loading.c b/examples/textures_image_loading.c index b7fc2cfca..7c6aae522 100644 --- a/examples/textures_image_loading.c +++ b/examples/textures_image_loading.c @@ -24,10 +24,10 @@ int main() // NOTE: Textures MUST be loaded after Window initialization (OpenGL context is required) - Image img = LoadImage("resources/raylib_logo.png"); // Loaded in CPU memory (RAM) - Texture2D texture = LoadTextureFromImage(img, false); // Image converted to texture, GPU memory (VRAM) + Image image = LoadImage("resources/raylib_logo.png"); // Loaded in CPU memory (RAM) + Texture2D texture = LoadTextureFromImage(image); // Image converted to texture, GPU memory (VRAM) - UnloadImage(img); // Once image has been converted to texture and uploaded to VRAM, it can be unloaded from RAM + UnloadImage(image); // Once image has been converted to texture and uploaded to VRAM, it can be unloaded from RAM //--------------------------------------------------------------------------------------- // Main game loop diff --git a/examples/textures_mipmaps.c b/examples/textures_mipmaps.c index d3ba1708f..6b7a64f01 100644 --- a/examples/textures_mipmaps.c +++ b/examples/textures_mipmaps.c @@ -24,10 +24,10 @@ int main() InitWindow(screenWidth, screenHeight, "raylib [textures] example - texture mipmaps generation"); // NOTE: To generate mipmaps for an image, image must be loaded first and converted to texture - // with mipmaps option set to true on CreateTexture() Image image = LoadImage("resources/raylib_logo.png"); // Load image to CPU memory (RAM) - Texture2D texture = LoadTextureFromImage(image, true); // Create texture and generate mipmaps + Texture2D texture = LoadTextureFromImage(image); // Load texture into GPU memory (VRAM) + GenTextureMipmaps(texture); // Generate mipmaps for texture UnloadImage(image); // Once texture has been created, we can unload image data from RAM //--------------------------------------------------------------------------------------