summaryrefslogtreecommitdiffhomepage
path: root/examples/web/shaders
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/shaders
parent0ae8e4d606b8d9bd41f875f9395fcf3bfa1c9121 (diff)
downloadraylib.com-23b966d5155c721b71447ddb5129f9a3424ce5fb.tar.gz
raylib.com-23b966d5155c721b71447ddb5129f9a3424ce5fb.zip
Update examples to use latest enum values
Diffstat (limited to 'examples/web/shaders')
-rw-r--r--examples/web/shaders/rlights.h10
-rw-r--r--examples/web/shaders/shaders_basic_lighting.c4
-rw-r--r--examples/web/shaders/shaders_custom_uniform.c2
-rw-r--r--examples/web/shaders/shaders_palette_switch.c2
4 files changed, 9 insertions, 9 deletions
diff --git a/examples/web/shaders/rlights.h b/examples/web/shaders/rlights.h
index f9727c9..a607893 100644
--- a/examples/web/shaders/rlights.h
+++ b/examples/web/shaders/rlights.h
@@ -168,21 +168,21 @@ Light CreateLight(int type, Vector3 position, Vector3 target, Color color, Shade
void UpdateLightValues(Shader shader, Light light)
{
// Send to shader light enabled state and type
- SetShaderValue(shader, light.enabledLoc, &light.enabled, UNIFORM_INT);
- SetShaderValue(shader, light.typeLoc, &light.type, UNIFORM_INT);
+ SetShaderValue(shader, light.enabledLoc, &light.enabled, SHADER_UNIFORM_INT);
+ SetShaderValue(shader, light.typeLoc, &light.type, SHADER_UNIFORM_INT);
// Send to shader light position values
float position[3] = { light.position.x, light.position.y, light.position.z };
- SetShaderValue(shader, light.posLoc, position, UNIFORM_VEC3);
+ SetShaderValue(shader, light.posLoc, position, SHADER_UNIFORM_VEC3);
// Send to shader light target position values
float target[3] = { light.target.x, light.target.y, light.target.z };
- SetShaderValue(shader, light.targetLoc, target, UNIFORM_VEC3);
+ SetShaderValue(shader, light.targetLoc, target, SHADER_UNIFORM_VEC3);
// Send to shader light color values
float color[4] = { (float)light.color.r/(float)255, (float)light.color.g/(float)255,
(float)light.color.b/(float)255, (float)light.color.a/(float)255 };
- SetShaderValue(shader, light.colorLoc, color, UNIFORM_VEC4);
+ SetShaderValue(shader, light.colorLoc, color, SHADER_UNIFORM_VEC4);
}
#endif // RLIGHTS_IMPLEMENTATION \ No newline at end of file
diff --git a/examples/web/shaders/shaders_basic_lighting.c b/examples/web/shaders/shaders_basic_lighting.c
index 05b5acc..47c8de9 100644
--- a/examples/web/shaders/shaders_basic_lighting.c
+++ b/examples/web/shaders/shaders_basic_lighting.c
@@ -108,7 +108,7 @@ int main(void)
// ambient light level
ambientLoc = GetShaderLocation(shader, "ambient");
- SetShaderValue(shader, ambientLoc, (float[4]){ 0.2f, 0.2f, 0.2f, 1.0f }, UNIFORM_VEC4);
+ SetShaderValue(shader, ambientLoc, (float[4]){ 0.2f, 0.2f, 0.2f, 1.0f }, SHADER_UNIFORM_VEC4);
// All models use the same shader
modelA.materials[0].shader = shader;
@@ -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[SHADER_LOC_VECTOR_VIEW], cameraPos, UNIFORM_VEC3);
+ SetShaderValue(shader, shader.locs[SHADER_LOC_VECTOR_VIEW], cameraPos, SHADER_UNIFORM_VEC3);
//----------------------------------------------------------------------------------
// Draw
diff --git a/examples/web/shaders/shaders_custom_uniform.c b/examples/web/shaders/shaders_custom_uniform.c
index 83fa51c..e574dc4 100644
--- a/examples/web/shaders/shaders_custom_uniform.c
+++ b/examples/web/shaders/shaders_custom_uniform.c
@@ -129,7 +129,7 @@ void UpdateDrawFrame(void)
swirlCenter[1] = screenHeight - mousePosition.y;
// Send new value to the shader to be used on drawing
- SetShaderValue(shader, swirlCenterLoc, swirlCenter, UNIFORM_VEC2);
+ SetShaderValue(shader, swirlCenterLoc, swirlCenter, SHADER_UNIFORM_VEC2);
UpdateCamera(&camera); // Update camera
//----------------------------------------------------------------------------------
diff --git a/examples/web/shaders/shaders_palette_switch.c b/examples/web/shaders/shaders_palette_switch.c
index 6e2e618..29f3070 100644
--- a/examples/web/shaders/shaders_palette_switch.c
+++ b/examples/web/shaders/shaders_palette_switch.c
@@ -153,7 +153,7 @@ void UpdateDrawFrame(void)
// Send new value to the shader to be used on drawing.
// NOTE: We are sending RGB triplets w/o the alpha channel
- SetShaderValueV(shader, paletteLoc, palettes[currentPalette], UNIFORM_IVEC3, COLORS_PER_PALETTE);
+ SetShaderValueV(shader, paletteLoc, palettes[currentPalette], SHADER_UNIFORM_IVEC3, COLORS_PER_PALETTE);
//----------------------------------------------------------------------------------
// Draw