summaryrefslogtreecommitdiff
path: root/src/rlgl.c
diff options
context:
space:
mode:
authorjussi2023-12-14 23:08:19 +0200
committerjussi2023-12-14 23:08:19 +0200
commitba4595305fe426f81233ebbb20fc94cd86d07af9 (patch)
tree13692707cd3c1dcd5aa885e8d50dade2feba25e9 /src/rlgl.c
parent5ebdba6af0d55269980a64ce190ec29ccd9faaf3 (diff)
downloadreilua-enhanced-ba4595305fe426f81233ebbb20fc94cd86d07af9.tar.gz
reilua-enhanced-ba4595305fe426f81233ebbb20fc94cd86d07af9.tar.bz2
reilua-enhanced-ba4595305fe426f81233ebbb20fc94cd86d07af9.zip
RLGL Hello triangle example.
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;
}