diff options
| author | raysan5 <raysan5@gmail.com> | 2016-02-12 19:02:23 +0100 |
|---|---|---|
| committer | raysan5 <raysan5@gmail.com> | 2016-02-12 19:02:23 +0100 |
| commit | cbbe9485294032d680579809976f7035785d3694 (patch) | |
| tree | 52a8a749fcd6be00f26d3ee71f7fff6ddbdd12ba /examples | |
| parent | 823abf666e09e96ccbf5230c96f2d3a61ff60895 (diff) | |
| download | raylib-cbbe9485294032d680579809976f7035785d3694.tar.gz raylib-cbbe9485294032d680579809976f7035785d3694.zip | |
Some code tweaks
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/shaders_basic_lighting.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/examples/shaders_basic_lighting.c b/examples/shaders_basic_lighting.c index 649eab74..84bd1af4 100644 --- a/examples/shaders_basic_lighting.c +++ b/examples/shaders_basic_lighting.c @@ -77,9 +77,9 @@ int main() light.specIntensity = 1.0f; // Material initialization - matBlinn.diffuse = WHITE; - matBlinn.ambient = (Color){ 50, 50, 50, 255 }; - matBlinn.specular = WHITE; + matBlinn.colDiffuse = WHITE; + matBlinn.colAmbient = (Color){ 50, 50, 50, 255 }; + matBlinn.colSpecular = WHITE; matBlinn.glossiness = 50.0f; // Setup camera @@ -129,8 +129,8 @@ int main() SetShaderValue(shader, lSpecIntensityLoc, &light.specIntensity, 1); // Send material values to shader - SetShaderValue(shader, mAmbientLoc, ColorToFloat(matBlinn.ambient), 3); - SetShaderValue(shader, mSpecularLoc, ColorToFloat(matBlinn.specular), 3); + SetShaderValue(shader, mAmbientLoc, ColorToFloat(matBlinn.colAmbient), 3); + SetShaderValue(shader, mSpecularLoc, ColorToFloat(matBlinn.colSpecular), 3); SetShaderValue(shader, mGlossLoc, &matBlinn.glossiness, 1); // Send camera and light transform values to shader @@ -146,7 +146,7 @@ int main() Begin3dMode(camera); - DrawModel(model, position, 4.0f, matBlinn.diffuse); + DrawModel(model, position, 4.0f, matBlinn.colDiffuse); DrawSphere(light.position, 0.5f, GOLD); DrawGrid(20, 1.0f); |
