|
@@ -23,13 +23,13 @@ int main()
|
|
// Define the camera to look into our 3d world
|
|
// 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 }};
|
|
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
|
|
SetModelTexture(&map, texture); // Bind texture to model
|
|
Vector3 mapPosition = { -4, 0.0, -4 }; // Set model position
|
|
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
|
|
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
|
//--------------------------------------------------------------------------------------
|
|
//--------------------------------------------------------------------------------------
|