summaryrefslogtreecommitdiffhomepage
path: root/examples/web/models
diff options
context:
space:
mode:
authorRay <[email protected]>2021-03-17 12:17:35 +0100
committerRay <[email protected]>2021-03-17 12:17:35 +0100
commit23b966d5155c721b71447ddb5129f9a3424ce5fb (patch)
treecdb63a53df1a177a28b63deffbc5650a6f77adcf /examples/web/models
parent0ae8e4d606b8d9bd41f875f9395fcf3bfa1c9121 (diff)
downloadraylib.com-23b966d5155c721b71447ddb5129f9a3424ce5fb.tar.gz
raylib.com-23b966d5155c721b71447ddb5129f9a3424ce5fb.zip
Update examples to use latest enum values
Diffstat (limited to 'examples/web/models')
-rw-r--r--examples/web/models/models_first_person_maze.c2
-rw-r--r--examples/web/models/models_skybox.c14
2 files changed, 8 insertions, 8 deletions
diff --git a/examples/web/models/models_first_person_maze.c b/examples/web/models/models_first_person_maze.c
index d9e3edb..d0be66f 100644
--- a/examples/web/models/models_first_person_maze.c
+++ b/examples/web/models/models_first_person_maze.c
@@ -85,7 +85,7 @@ int main(void)
// De-Initialization
//--------------------------------------------------------------------------------------
- UnoadImageColors(mapPixels); // Unload color array
+ UnloadImageColors(mapPixels); // Unload color array
UnloadTexture(cubicmap); // Unload cubicmap texture
UnloadTexture(texture); // Unload map texture
diff --git a/examples/web/models/models_skybox.c b/examples/web/models/models_skybox.c
index e6727e3..0853cd5 100644
--- a/examples/web/models/models_skybox.c
+++ b/examples/web/models/models_skybox.c
@@ -55,8 +55,8 @@ int main(void)
#else // PLATFORM_RPI, PLATFORM_ANDROID, PLATFORM_WEB
skybox.materials[0].shader = LoadShader("resources/shaders/glsl100/skybox.vs", "resources/shaders/glsl100/skybox.fs");
#endif
- SetShaderValue(skybox.materials[0].shader, GetShaderLocation(skybox.materials[0].shader, "environmentMap"), (int[1]){ MAP_CUBEMAP }, UNIFORM_INT);
- SetShaderValue(skybox.materials[0].shader, GetShaderLocation(skybox.materials[0].shader, "vflipped"), (int[1]){ 1 }, UNIFORM_INT);
+ SetShaderValue(skybox.materials[0].shader, GetShaderLocation(skybox.materials[0].shader, "environmentMap"), (int[1]){ MATERIAL_MAP_CUBEMAP }, SHADER_UNIFORM_INT);
+ SetShaderValue(skybox.materials[0].shader, GetShaderLocation(skybox.materials[0].shader, "vflipped"), (int[1]){ 1 }, SHADER_UNIFORM_INT);
// Load cubemap shader and setup required shader locations
#if defined(PLATFORM_DESKTOP)
@@ -64,7 +64,7 @@ int main(void)
#else // PLATFORM_RPI, PLATFORM_ANDROID, PLATFORM_WEB
shdrCubemap = LoadShader("resources/shaders/glsl100/cubemap.vs", "resources/shaders/glsl100/cubemap.fs");
#endif
- SetShaderValue(shdrCubemap, GetShaderLocation(shdrCubemap, "equirectangularMap"), (int[1]){ 0 }, UNIFORM_INT);
+ SetShaderValue(shdrCubemap, GetShaderLocation(shdrCubemap, "equirectangularMap"), (int[1]){ 0 }, SHADER_UNIFORM_INT);
// Load HDR panorama (sphere) texture
TextCopy(panoFileName, "resources/dresden_square_2k.hdr");
@@ -73,8 +73,8 @@ int main(void)
// Generate cubemap (texture with 6 quads-cube-mapping) from panorama HDR texture
// NOTE 1: New texture is generated rendering to texture, shader calculates the sphere->cube coordinates mapping
// NOTE 2: It seems on some Android devices WebGL, fbo does not properly support a FLOAT-based attachment,
- // despite texture can be successfully created.. so using UNCOMPRESSED_R8G8B8A8 instead of UNCOMPRESSED_R32G32B32A32
- skybox.materials[0].maps[MAP_CUBEMAP].texture = GenTextureCubemap(shdrCubemap, panorama, 1024, UNCOMPRESSED_R8G8B8A8);
+ // despite texture can be successfully created.. so using PIXELFORMAT_UNCOMPRESSED_R8G8B8A8 instead of PIXELFORMAT_UNCOMPRESSED_R32G32B32A32
+ skybox.materials[0].maps[MATERIAL_MAP_CUBEMAP].texture = GenTextureCubemap(shdrCubemap, panorama, 1024, PIXELFORMAT_UNCOMPRESSED_R8G8B8A8);
UnloadTexture(panorama); // Texture not required anymore, cubemap already generated
@@ -123,12 +123,12 @@ void UpdateDrawFrame(void)
if (IsFileExtension(droppedFiles[0], ".png;.jpg;.hdr;.bmp;.tga"))
{
// Unload current cubemap texture and load new one
- UnloadTexture(skybox.materials[0].maps[MAP_CUBEMAP].texture);
+ UnloadTexture(skybox.materials[0].maps[MATERIAL_MAP_CUBEMAP].texture);
panorama = LoadTexture(droppedFiles[0]);
TextCopy(panoFileName, droppedFiles[0]);
// Generate cubemap from panorama texture
- skybox.materials[0].maps[MAP_CUBEMAP].texture = GenTextureCubemap(shdrCubemap, panorama, 1024, UNCOMPRESSED_R8G8B8A8);
+ skybox.materials[0].maps[MATERIAL_MAP_CUBEMAP].texture = GenTextureCubemap(shdrCubemap, panorama, 1024, PIXELFORMAT_UNCOMPRESSED_R8G8B8A8);
UnloadTexture(panorama);
}
}