summaryrefslogtreecommitdiffhomepage
path: root/examples/web/shaders/shaders_basic_lighting.c
diff options
context:
space:
mode:
authorRay <[email protected]>2021-03-14 13:10:05 +0100
committerRay <[email protected]>2021-03-14 13:10:05 +0100
commit06c815f05810fb2a72356d19f9cac218ca977892 (patch)
treeb8e08779a8374cb641c5246c55475f88e263704a /examples/web/shaders/shaders_basic_lighting.c
parent421c4e4cd85310bef3a8f79f89d23e3a1eac9668 (diff)
downloadraylib.com-06c815f05810fb2a72356d19f9cac218ca977892.tar.gz
raylib.com-06c815f05810fb2a72356d19f9cac218ca977892.zip
Updated examples after enum values rename
Diffstat (limited to 'examples/web/shaders/shaders_basic_lighting.c')
-rw-r--r--examples/web/shaders/shaders_basic_lighting.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/examples/web/shaders/shaders_basic_lighting.c b/examples/web/shaders/shaders_basic_lighting.c
index 2bcae63..05b5acc 100644
--- a/examples/web/shaders/shaders_basic_lighting.c
+++ b/examples/web/shaders/shaders_basic_lighting.c
@@ -95,16 +95,16 @@ int main(void)
texture = LoadTexture("resources/texel_checker.png");
// Assign texture to default model material
- modelA.materials[0].maps[MAP_DIFFUSE].texture = texture;
- modelB.materials[0].maps[MAP_DIFFUSE].texture = texture;
- modelC.materials[0].maps[MAP_DIFFUSE].texture = texture;
+ modelA.materials[0].maps[MATERIAL_MAP_DIFFUSE].texture = texture;
+ modelB.materials[0].maps[MATERIAL_MAP_DIFFUSE].texture = texture;
+ modelC.materials[0].maps[MATERIAL_MAP_DIFFUSE].texture = texture;
shader = LoadShader(TextFormat("resources/shaders/glsl%i/base_lighting.vs", GLSL_VERSION),
TextFormat("resources/shaders/glsl%i/lighting.fs", GLSL_VERSION));
// Get some shader loactions
- shader.locs[LOC_MATRIX_MODEL] = GetShaderLocation(shader, "matModel");
- shader.locs[LOC_VECTOR_VIEW] = GetShaderLocation(shader, "viewPos");
+ shader.locs[SHADER_LOC_MATRIX_MODEL] = GetShaderLocation(shader, "matModel");
+ shader.locs[SHADER_LOC_VECTOR_VIEW] = GetShaderLocation(shader, "viewPos");
// ambient light level
ambientLoc = GetShaderLocation(shader, "ambient");
@@ -187,7 +187,7 @@ void UpdateDrawFrame(void)
// Update the light shader with the camera view position
float cameraPos[3] = { camera.position.x, camera.position.y, camera.position.z };
- SetShaderValue(shader, shader.locs[LOC_VECTOR_VIEW], cameraPos, UNIFORM_VEC3);
+ SetShaderValue(shader, shader.locs[SHADER_LOC_VECTOR_VIEW], cameraPos, UNIFORM_VEC3);
//----------------------------------------------------------------------------------
// Draw