summaryrefslogtreecommitdiff
path: root/src/rlgl.c
diff options
context:
space:
mode:
authorjussi2024-09-10 12:53:20 +0300
committerjussi2024-09-10 12:53:20 +0300
commitcd6471d339c394a37a1d46119818e0cabdcf5b42 (patch)
tree501d87d701cbc8ecba46498b876c85a6e020fa0d /src/rlgl.c
parent415f3b6c019c62ddb065d6d861732531ac7385c2 (diff)
downloadreilua-enhanced-cd6471d339c394a37a1d46119818e0cabdcf5b42.tar.gz
reilua-enhanced-cd6471d339c394a37a1d46119818e0cabdcf5b42.tar.bz2
reilua-enhanced-cd6471d339c394a37a1d46119818e0cabdcf5b42.zip
rlSetVertexAttribute takes pointer as Buffer.
Diffstat (limited to 'src/rlgl.c')
-rw-r--r--src/rlgl.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/rlgl.c b/src/rlgl.c
index c18a171..414666c 100644
--- a/src/rlgl.c
+++ b/src/rlgl.c
@@ -1216,9 +1216,9 @@ int lrlglUnloadVertexBuffer( lua_State* L ) {
}
/*
-> RL.rlSetVertexAttribute( int index, int compSize, int type, bool normalized, int stride, int pointer )
+> RL.rlSetVertexAttribute( int index, int compSize, int type, bool normalized, int stride, buffer pointer )
-Set vertex attribute. NOTE: Pointer should be given in size of bytes
+Set vertex attribute.
*/
int lrlglSetVertexAttribute( lua_State* L ) {
int index = luaL_checkinteger( L, 1 );
@@ -1226,9 +1226,9 @@ int lrlglSetVertexAttribute( lua_State* L ) {
int type = luaL_checkinteger( L, 3 );
bool normalized = uluaGetBoolean( L, 4 );
int stride = luaL_checkinteger( L, 5 );
- int pointer = luaL_checkinteger( L, 6 );
+ Buffer* pointer = uluaGetBuffer( L, 6 );
- rlSetVertexAttribute( index, compSize, type, normalized, stride, (void*)( pointer * sizeof( char ) ) );
+ rlSetVertexAttribute( index, compSize, type, normalized, stride, pointer->data );
return 0;
}