summaryrefslogtreecommitdiffhomepage
path: root/examples/models/models_skybox.c
diff options
context:
space:
mode:
authorRay <[email protected]>2019-03-29 20:22:50 +0100
committerRay <[email protected]>2019-03-29 20:22:50 +0100
commitbe6d237b9ebbe245de4384c17b84e75dab0f4981 (patch)
treedf451509352e1c197c28dc94e9211468a1124540 /examples/models/models_skybox.c
parenta197f40bb4bd5a644ad54bef756d7f435977df9d (diff)
downloadraylib-be6d237b9ebbe245de4384c17b84e75dab0f4981.tar.gz
raylib-be6d237b9ebbe245de4384c17b84e75dab0f4981.zip
Review models examples
Diffstat (limited to 'examples/models/models_skybox.c')
-rw-r--r--examples/models/models_skybox.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/models/models_skybox.c b/examples/models/models_skybox.c
index c7f76ecf..759c79c6 100644
--- a/examples/models/models_skybox.c
+++ b/examples/models/models_skybox.c
@@ -29,8 +29,8 @@ int main()
// Load skybox shader and set required locations
// NOTE: Some locations are automatically set at shader loading
- skybox.material.shader = LoadShader("resources/shaders/skybox.vs", "resources/shaders/skybox.fs");
- SetShaderValue(skybox.material.shader, GetShaderLocation(skybox.material.shader, "environmentMap"), (int[1]){ MAP_CUBEMAP }, UNIFORM_INT);
+ skybox.materials[0].shader = LoadShader("resources/shaders/skybox.vs", "resources/shaders/skybox.fs");
+ SetShaderValue(skybox.materials[0].shader, GetShaderLocation(skybox.materials[0].shader, "environmentMap"), (int[1]){ MAP_CUBEMAP }, UNIFORM_INT);
// Load cubemap shader and setup required shader locations
Shader shdrCubemap = LoadShader("resources/shaders/cubemap.vs", "resources/shaders/cubemap.fs");
@@ -41,7 +41,7 @@ int main()
// Generate cubemap (texture with 6 quads-cube-mapping) from panorama HDR texture
// NOTE: New texture is generated rendering to texture, shader computes the sphre->cube coordinates mapping
- skybox.material.maps[MAP_CUBEMAP].texture = GenTextureCubemap(shdrCubemap, texHDR, 512);
+ skybox.materials[0].maps[MAP_CUBEMAP].texture = GenTextureCubemap(shdrCubemap, texHDR, 512);
UnloadTexture(texHDR); // Texture not required anymore, cubemap already generated
UnloadShader(shdrCubemap); // Unload cubemap generation shader, not required anymore