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_julia_set.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_julia_set.c')
| -rw-r--r-- | examples/shaders/shaders_julia_set.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/examples/shaders/shaders_julia_set.c b/examples/shaders/shaders_julia_set.c index 91067a10..d0304705 100644 --- a/examples/shaders/shaders_julia_set.c +++ b/examples/shaders/shaders_julia_set.c @@ -65,11 +65,11 @@ int main(void) // Tell the shader what the screen dimensions, zoom, offset and c are float screenDims[2] = { (float)screenWidth, (float)screenHeight }; - SetShaderValue(shader, GetShaderLocation(shader, "screenDims"), screenDims, UNIFORM_VEC2); + SetShaderValue(shader, GetShaderLocation(shader, "screenDims"), screenDims, SHADER_UNIFORM_VEC2); - SetShaderValue(shader, cLoc, c, UNIFORM_VEC2); - SetShaderValue(shader, zoomLoc, &zoom, UNIFORM_FLOAT); - SetShaderValue(shader, offsetLoc, offset, UNIFORM_VEC2); + SetShaderValue(shader, cLoc, c, SHADER_UNIFORM_VEC2); + SetShaderValue(shader, zoomLoc, &zoom, SHADER_UNIFORM_FLOAT); + SetShaderValue(shader, offsetLoc, offset, SHADER_UNIFORM_VEC2); // Create a RenderTexture2D to be used for render to texture RenderTexture2D target = LoadRenderTexture(screenWidth, screenHeight); @@ -101,7 +101,7 @@ int main(void) else if (IsKeyPressed(KEY_FIVE)) c[0] = POINTS_OF_INTEREST[4][0], c[1] = POINTS_OF_INTEREST[4][1]; else if (IsKeyPressed(KEY_SIX)) c[0] = POINTS_OF_INTEREST[5][0], c[1] = POINTS_OF_INTEREST[5][1]; - SetShaderValue(shader, cLoc, c, UNIFORM_VEC2); + SetShaderValue(shader, cLoc, c, SHADER_UNIFORM_VEC2); } if (IsKeyPressed(KEY_SPACE)) pause = !pause; // Pause animation (c change) @@ -130,15 +130,15 @@ int main(void) } else offsetSpeed = (Vector2){ 0.0f, 0.0f }; - SetShaderValue(shader, zoomLoc, &zoom, UNIFORM_FLOAT); - SetShaderValue(shader, offsetLoc, offset, UNIFORM_VEC2); + SetShaderValue(shader, zoomLoc, &zoom, SHADER_UNIFORM_FLOAT); + SetShaderValue(shader, offsetLoc, offset, SHADER_UNIFORM_VEC2); // Increment c value with time float amount = GetFrameTime()*incrementSpeed*0.0005f; c[0] += amount; c[1] += amount; - SetShaderValue(shader, cLoc, c, UNIFORM_VEC2); + SetShaderValue(shader, cLoc, c, SHADER_UNIFORM_VEC2); } //---------------------------------------------------------------------------------- |
