From ba4595305fe426f81233ebbb20fc94cd86d07af9 Mon Sep 17 00:00:00 2001 From: jussi Date: Thu, 14 Dec 2023 23:08:19 +0200 Subject: RLGL Hello triangle example. --- src/rlgl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/rlgl.c') 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; } -- cgit v1.2.3