diff options
| author | Ray <[email protected]> | 2021-03-14 13:10:05 +0100 |
|---|---|---|
| committer | Ray <[email protected]> | 2021-03-14 13:10:05 +0100 |
| commit | 06c815f05810fb2a72356d19f9cac218ca977892 (patch) | |
| tree | b8e08779a8374cb641c5246c55475f88e263704a /examples/web/shaders/shaders_simple_mask.c | |
| parent | 421c4e4cd85310bef3a8f79f89d23e3a1eac9668 (diff) | |
| download | raylib.com-06c815f05810fb2a72356d19f9cac218ca977892.tar.gz raylib.com-06c815f05810fb2a72356d19f9cac218ca977892.zip | |
Updated examples after enum values rename
Diffstat (limited to 'examples/web/shaders/shaders_simple_mask.c')
| -rw-r--r-- | examples/web/shaders/shaders_simple_mask.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/examples/web/shaders/shaders_simple_mask.c b/examples/web/shaders/shaders_simple_mask.c index 1dd63f8..79effab 100644 --- a/examples/web/shaders/shaders_simple_mask.c +++ b/examples/web/shaders/shaders_simple_mask.c @@ -94,16 +94,16 @@ int main(void) // Load and apply the diffuse texture (colour map) texDiffuse = LoadTexture("resources/plasma.png"); - model1.materials[0].maps[MAP_DIFFUSE].texture = texDiffuse; - model2.materials[0].maps[MAP_DIFFUSE].texture = texDiffuse; + model1.materials[0].maps[MATERIAL_MAP_DIFFUSE].texture = texDiffuse; + model2.materials[0].maps[MATERIAL_MAP_DIFFUSE].texture = texDiffuse; - // Using MAP_EMISSION as a spare slot to use for 2nd texture - // NOTE: Don't use MAP_IRRADIANCE, MAP_PREFILTER or MAP_CUBEMAP + // Using MATERIAL_MAP_EMISSION as a spare slot to use for 2nd texture + // NOTE: Don't use MATERIAL_MAP_IRRADIANCE, MATERIAL_MAP_PREFILTER or MATERIAL_MAP_CUBEMAP // as they are bound as cube maps texMask = LoadTexture("resources/mask.png"); - model1.materials[0].maps[MAP_EMISSION].texture = texMask; - model2.materials[0].maps[MAP_EMISSION].texture = texMask; - shader.locs[LOC_MAP_EMISSION] = GetShaderLocation(shader, "mask"); + model1.materials[0].maps[MATERIAL_MAP_EMISSION].texture = texMask; + model2.materials[0].maps[MATERIAL_MAP_EMISSION].texture = texMask; + shader.locs[SHADER_LOC_MAP_EMISSION] = GetShaderLocation(shader, "mask"); // Frame is incremented each frame to animate the shader shaderFrame = GetShaderLocation(shader, "frame"); @@ -155,7 +155,7 @@ void UpdateDrawFrame(void) rotation.z -= 0.0025f; // Send frames counter to shader for animation - SetShaderValue(shader, shaderFrame, &framesCounter, UNIFORM_INT); + SetShaderValue(shader, shaderFrame, &framesCounter, SHADER_UNIFORM_INT); // Rotate one of the models model1.transform = MatrixRotateXYZ(rotation); |
