mirror of
https://github.com/raysan5/raylib.git
synced 2025-11-03 09:14:23 +00:00
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
This commit is contained in:
@@ -58,13 +58,13 @@ int main(void)
|
||||
float speedY = 8.0f;
|
||||
|
||||
float screenSize[2] = { (float)GetScreenWidth(), (float)GetScreenHeight() };
|
||||
SetShaderValue(shader, GetShaderLocation(shader, "size"), &screenSize, UNIFORM_VEC2);
|
||||
SetShaderValue(shader, freqXLoc, &freqX, UNIFORM_FLOAT);
|
||||
SetShaderValue(shader, freqYLoc, &freqY, UNIFORM_FLOAT);
|
||||
SetShaderValue(shader, ampXLoc, &X, UNIFORM_FLOAT);
|
||||
SetShaderValue(shader, ampYLoc, &Y, UNIFORM_FLOAT);
|
||||
SetShaderValue(shader, speedXLoc, &speedX, UNIFORM_FLOAT);
|
||||
SetShaderValue(shader, speedYLoc, &speedY, UNIFORM_FLOAT);
|
||||
SetShaderValue(shader, GetShaderLocation(shader, "size"), &screenSize, SHADER_UNIFORM_VEC2);
|
||||
SetShaderValue(shader, freqXLoc, &freqX, SHADER_UNIFORM_FLOAT);
|
||||
SetShaderValue(shader, freqYLoc, &freqY, SHADER_UNIFORM_FLOAT);
|
||||
SetShaderValue(shader, ampXLoc, &X, SHADER_UNIFORM_FLOAT);
|
||||
SetShaderValue(shader, ampYLoc, &Y, SHADER_UNIFORM_FLOAT);
|
||||
SetShaderValue(shader, speedXLoc, &speedX, SHADER_UNIFORM_FLOAT);
|
||||
SetShaderValue(shader, speedYLoc, &speedY, SHADER_UNIFORM_FLOAT);
|
||||
|
||||
float seconds = 0.0f;
|
||||
|
||||
@@ -78,7 +78,7 @@ int main(void)
|
||||
//----------------------------------------------------------------------------------
|
||||
seconds += GetFrameTime();
|
||||
|
||||
SetShaderValue(shader, secondsLoc, &seconds, UNIFORM_FLOAT);
|
||||
SetShaderValue(shader, secondsLoc, &seconds, SHADER_UNIFORM_FLOAT);
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
// Draw
|
||||
|
||||
Reference in New Issue
Block a user