Skip to content

Commit

Permalink
[rlgl] Fix rlgl standalone defaults (#4357)
Browse files Browse the repository at this point in the history
* Fix rlgl standalone defaults

* Fix rmodels
  • Loading branch information
asdqwe authored Oct 2, 2024
1 parent 09987b0 commit 96d91a3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/rlgl.h
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@
#define RL_DEFAULT_SHADER_ATTRIB_LOCATION_INDICES 6
#endif

#ifdef RL_SUPPORT_MESH_ANIMATION_VBO
#ifdef RL_SUPPORT_MESH_GPU_SKINNING
#ifndef RL_DEFAULT_SHADER_ATTRIB_LOCATION_BONEIDS
#define RL_DEFAULT_SHADER_ATTRIB_LOCATION_BONEIDS 7
#endif
Expand Down
4 changes: 2 additions & 2 deletions src/rmodels.c
Original file line number Diff line number Diff line change
Expand Up @@ -1254,7 +1254,7 @@ void UploadMesh(Mesh *mesh, bool dynamic)
mesh->vboId[RL_DEFAULT_SHADER_ATTRIB_LOCATION_TEXCOORD2] = 0; // Vertex buffer: texcoords2
mesh->vboId[RL_DEFAULT_SHADER_ATTRIB_LOCATION_INDICES] = 0; // Vertex buffer: indices

#ifdef RL_SUPPORT_MESH_ANIMATION_VBO
#ifdef RL_SUPPORT_MESH_GPU_SKINNING
mesh->vboId[RL_DEFAULT_SHADER_ATTRIB_LOCATION_BONEIDS] = 0; // Vertex buffer: boneIds
mesh->vboId[RL_DEFAULT_SHADER_ATTRIB_LOCATION_BONEWEIGHTS] = 0; // Vertex buffer: boneWeights
#endif
Expand Down Expand Up @@ -1823,7 +1823,7 @@ void DrawMeshInstanced(Mesh mesh, Material material, const Matrix *transforms, i
rlEnableVertexAttribute(material.shader.locs[SHADER_LOC_VERTEX_TEXCOORD02]);
}

#ifdef RL_SUPPORT_MESH_ANIMATION_VBO
#ifdef RL_SUPPORT_MESH_GPU_SKINNING
// Bind mesh VBO data: vertex bone ids (shader-location = 6, if available)
if (material.shader.locs[SHADER_LOC_VERTEX_BONEIDS] != -1)
{
Expand Down

0 comments on commit 96d91a3

Please sign in to comment.