Skip to content

Commit

Permalink
Make sure ShaderUniformDataType matches rlShaderUniformDataType (#4577)
Browse files Browse the repository at this point in the history
* Make sure ShaderUniformDataType matches rlShaderUniformDataType

* Update raylib_api.* by CI

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Ray <[email protected]>
  • Loading branch information
3 people authored Dec 8, 2024
1 parent 732da94 commit 2a2acff
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 7 deletions.
22 changes: 21 additions & 1 deletion parser/output/raylib_api.json
Original file line number Diff line number Diff line change
Expand Up @@ -2596,8 +2596,28 @@
"description": "Shader uniform type: ivec4 (4 int)"
},
{
"name": "SHADER_UNIFORM_SAMPLER2D",
"name": "SHADER_UNIFORM_UINT",
"value": 8,
"description": "Shader uniform type: unsigned int"
},
{
"name": "SHADER_UNIFORM_UIVEC2",
"value": 9,
"description": "Shader uniform type: uivec2 (2 unsigned int)"
},
{
"name": "SHADER_UNIFORM_UIVEC3",
"value": 10,
"description": "Shader uniform type: uivec3 (3 unsigned int)"
},
{
"name": "SHADER_UNIFORM_UIVEC4",
"value": 11,
"description": "Shader uniform type: uivec4 (4 unsigned int)"
},
{
"name": "SHADER_UNIFORM_SAMPLER2D",
"value": 12,
"description": "Shader uniform type: sampler2d"
}
]
Expand Down
22 changes: 21 additions & 1 deletion parser/output/raylib_api.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2596,8 +2596,28 @@ return {
description = "Shader uniform type: ivec4 (4 int)"
},
{
name = "SHADER_UNIFORM_SAMPLER2D",
name = "SHADER_UNIFORM_UINT",
value = 8,
description = "Shader uniform type: unsigned int"
},
{
name = "SHADER_UNIFORM_UIVEC2",
value = 9,
description = "Shader uniform type: uivec2 (2 unsigned int)"
},
{
name = "SHADER_UNIFORM_UIVEC3",
value = 10,
description = "Shader uniform type: uivec3 (3 unsigned int)"
},
{
name = "SHADER_UNIFORM_UIVEC4",
value = 11,
description = "Shader uniform type: uivec4 (4 unsigned int)"
},
{
name = "SHADER_UNIFORM_SAMPLER2D",
value = 12,
description = "Shader uniform type: sampler2d"
}
}
Expand Down
9 changes: 6 additions & 3 deletions parser/output/raylib_api.txt
Original file line number Diff line number Diff line change
Expand Up @@ -827,8 +827,7 @@ Enum 09: ShaderLocationIndex (30 values)
Value[SHADER_LOC_VERTEX_BONEIDS]: 26
Value[SHADER_LOC_VERTEX_BONEWEIGHTS]: 27
Value[SHADER_LOC_BONE_MATRICES]: 28
Value[SHADER_LOC_VERTEX_INSTANCE_TX]: 29
Enum 10: ShaderUniformDataType (9 values)
Enum 10: ShaderUniformDataType (13 values)
Name: ShaderUniformDataType
Description: Shader uniform data type
Value[SHADER_UNIFORM_FLOAT]: 0
Expand All @@ -839,7 +838,11 @@ Enum 10: ShaderUniformDataType (9 values)
Value[SHADER_UNIFORM_IVEC2]: 5
Value[SHADER_UNIFORM_IVEC3]: 6
Value[SHADER_UNIFORM_IVEC4]: 7
Value[SHADER_UNIFORM_SAMPLER2D]: 8
Value[SHADER_UNIFORM_UINT]: 8
Value[SHADER_UNIFORM_UIVEC2]: 9
Value[SHADER_UNIFORM_UIVEC3]: 10
Value[SHADER_UNIFORM_UIVEC4]: 11
Value[SHADER_UNIFORM_SAMPLER2D]: 12
Enum 11: ShaderAttributeDataType (4 values)
Name: ShaderAttributeDataType
Description: Shader attribute data types
Expand Down
8 changes: 6 additions & 2 deletions parser/output/raylib_api.xml
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@
<Value name="SHADER_LOC_BONE_MATRICES" integer="28" desc="Shader location: array of matrices uniform: boneMatrices" />
<Value name="SHADER_LOC_VERTEX_INSTANCE_TX" integer="29" desc="Shader location: vertex attribute: instanceTransform" />
</Enum>
<Enum name="ShaderUniformDataType" valueCount="9" desc="Shader uniform data type">
<Enum name="ShaderUniformDataType" valueCount="13" desc="Shader uniform data type">
<Value name="SHADER_UNIFORM_FLOAT" integer="0" desc="Shader uniform type: float" />
<Value name="SHADER_UNIFORM_VEC2" integer="1" desc="Shader uniform type: vec2 (2 float)" />
<Value name="SHADER_UNIFORM_VEC3" integer="2" desc="Shader uniform type: vec3 (3 float)" />
Expand All @@ -548,7 +548,11 @@
<Value name="SHADER_UNIFORM_IVEC2" integer="5" desc="Shader uniform type: ivec2 (2 int)" />
<Value name="SHADER_UNIFORM_IVEC3" integer="6" desc="Shader uniform type: ivec3 (3 int)" />
<Value name="SHADER_UNIFORM_IVEC4" integer="7" desc="Shader uniform type: ivec4 (4 int)" />
<Value name="SHADER_UNIFORM_SAMPLER2D" integer="8" desc="Shader uniform type: sampler2d" />
<Value name="SHADER_UNIFORM_UINT" integer="8" desc="Shader uniform type: unsigned int" />
<Value name="SHADER_UNIFORM_UIVEC2" integer="9" desc="Shader uniform type: uivec2 (2 unsigned int)" />
<Value name="SHADER_UNIFORM_UIVEC3" integer="10" desc="Shader uniform type: uivec3 (3 unsigned int)" />
<Value name="SHADER_UNIFORM_UIVEC4" integer="11" desc="Shader uniform type: uivec4 (4 unsigned int)" />
<Value name="SHADER_UNIFORM_SAMPLER2D" integer="12" desc="Shader uniform type: sampler2d" />
</Enum>
<Enum name="ShaderAttributeDataType" valueCount="4" desc="Shader attribute data types">
<Value name="SHADER_ATTRIB_FLOAT" integer="0" desc="Shader attribute type: float" />
Expand Down
4 changes: 4 additions & 0 deletions src/raylib.h
Original file line number Diff line number Diff line change
Expand Up @@ -818,6 +818,10 @@ typedef enum {
SHADER_UNIFORM_IVEC2, // Shader uniform type: ivec2 (2 int)
SHADER_UNIFORM_IVEC3, // Shader uniform type: ivec3 (3 int)
SHADER_UNIFORM_IVEC4, // Shader uniform type: ivec4 (4 int)
SHADER_UNIFORM_UINT, // Shader uniform type: unsigned int
SHADER_UNIFORM_UIVEC2, // Shader uniform type: uivec2 (2 unsigned int)
SHADER_UNIFORM_UIVEC3, // Shader uniform type: uivec3 (3 unsigned int)
SHADER_UNIFORM_UIVEC4, // Shader uniform type: uivec4 (4 unsigned int)
SHADER_UNIFORM_SAMPLER2D // Shader uniform type: sampler2d
} ShaderUniformDataType;

Expand Down

0 comments on commit 2a2acff

Please sign in to comment.