diff options
| author | Ray <[email protected]> | 2021-03-14 11:05:51 +0100 |
|---|---|---|
| committer | Ray <[email protected]> | 2021-03-14 11:05:51 +0100 |
| commit | 01e28263be9869b28acae5cf1128472269626edb (patch) | |
| tree | 7536aebc3ff6273926fc52c4aa5929dd2b96fba6 /examples/shaders/shaders_basic_lighting.c | |
| parent | 75038baf716a79606e86d46dad9d527bbb65628a (diff) | |
| download | raylib-01e28263be9869b28acae5cf1128472269626edb.tar.gz raylib-01e28263be9869b28acae5cf1128472269626edb.zip | |
WARNING: VERY BREAKING CHANGE: Renamed some enum values for consistency
Some enums values have been renamed to be more consistent and also provide a more detailed description:
- ShaderLocationIndex: LOC_VERTEX_POSITION -> SHADER_SHADER_LOC_VERTEX_POSITION
- ShaderUniformDataType: UNIFORM_VEC2 -> SHADER_UNIFORM_VEC2
- MaterialMapType: MAP_ALBEDO -> MATERIAL_MAP_ALBEDO
- PixelFormat: UNCOMPRESSED_GRAYSCALE -> PIXELFORMAT_UNCOMPRESSED_GRAYSCALE
Diffstat (limited to 'examples/shaders/shaders_basic_lighting.c')
| -rw-r--r-- | examples/shaders/shaders_basic_lighting.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/examples/shaders/shaders_basic_lighting.c b/examples/shaders/shaders_basic_lighting.c index 95df69c2..633fd012 100644 --- a/examples/shaders/shaders_basic_lighting.c +++ b/examples/shaders/shaders_basic_lighting.c @@ -65,20 +65,20 @@ int main(void) Texture 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 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 int 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); float angle = 6.282f; @@ -133,7 +133,7 @@ int main(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, SHADER_UNIFORM_VEC3); //---------------------------------------------------------------------------------- // Draw |
