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
|
@ -163,21 +163,21 @@ Light CreateLight(int type, Vector3 position, Vector3 target, Color color, Shade
|
|||
void UpdateLightValues(Shader shader, Light light)
|
||||
{
|
||||
// Send to shader light enabled state and type
|
||||
SetShaderValue(shader, light.enabledLoc, &light.enabled, UNIFORM_INT);
|
||||
SetShaderValue(shader, light.typeLoc, &light.type, UNIFORM_INT);
|
||||
SetShaderValue(shader, light.enabledLoc, &light.enabled, SHADER_UNIFORM_INT);
|
||||
SetShaderValue(shader, light.typeLoc, &light.type, SHADER_UNIFORM_INT);
|
||||
|
||||
// Send to shader light position values
|
||||
float position[3] = { light.position.x, light.position.y, light.position.z };
|
||||
SetShaderValue(shader, light.posLoc, position, UNIFORM_VEC3);
|
||||
SetShaderValue(shader, light.posLoc, position, SHADER_UNIFORM_VEC3);
|
||||
|
||||
// Send to shader light target position values
|
||||
float target[3] = { light.target.x, light.target.y, light.target.z };
|
||||
SetShaderValue(shader, light.targetLoc, target, UNIFORM_VEC3);
|
||||
SetShaderValue(shader, light.targetLoc, target, SHADER_UNIFORM_VEC3);
|
||||
|
||||
// Send to shader light color values
|
||||
float color[4] = { (float)light.color.r/(float)255, (float)light.color.g/(float)255,
|
||||
(float)light.color.b/(float)255, (float)light.color.a/(float)255 };
|
||||
SetShaderValue(shader, light.colorLoc, color, UNIFORM_VEC4);
|
||||
SetShaderValue(shader, light.colorLoc, color, SHADER_UNIFORM_VEC4);
|
||||
}
|
||||
|
||||
#endif // RLIGHTS_IMPLEMENTATION
|
Loading…
Add table
Add a link
Reference in a new issue