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:
parent
75038baf71
commit
01e28263be
33 changed files with 723 additions and 721 deletions
|
@ -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);
|
||||
}
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue