summaryrefslogtreecommitdiff
path: root/src/rlgl.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/rlgl.c')
-rw-r--r--src/rlgl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rlgl.c b/src/rlgl.c
index 65a57a1..a71aa61 100644
--- a/src/rlgl.c
+++ b/src/rlgl.c
@@ -1105,7 +1105,7 @@ int lrlglUnloadVertexBuffer( lua_State *L ) {
/*
> RL.rlSetVertexAttribute( int index, int compSize, int type, bool normalized, int stride, int pointer )
-Set vertex attribute
+Set vertex attribute. Note! Pointer should be given in size of bytes
*/
int lrlglSetVertexAttribute( lua_State *L ) {
int index = luaL_checkinteger( L, 1 );
@@ -1115,7 +1115,7 @@ int lrlglSetVertexAttribute( lua_State *L ) {
int stride = luaL_checkinteger( L, 5 );
int pointer = luaL_checkinteger( L, 6 );
- rlSetVertexAttribute( index, compSize, type, normalized, stride, &pointer );
+ rlSetVertexAttribute( index, compSize, type, normalized, stride, (void*)( pointer * sizeof( char ) ) );
return 0;
}