diff options
| author | jussi | 2024-09-10 12:53:20 +0300 |
|---|---|---|
| committer | jussi | 2024-09-10 12:53:20 +0300 |
| commit | cd6471d339c394a37a1d46119818e0cabdcf5b42 (patch) | |
| tree | 501d87d701cbc8ecba46498b876c85a6e020fa0d /src | |
| parent | 415f3b6c019c62ddb065d6d861732531ac7385c2 (diff) | |
| download | reilua-enhanced-cd6471d339c394a37a1d46119818e0cabdcf5b42.tar.gz reilua-enhanced-cd6471d339c394a37a1d46119818e0cabdcf5b42.tar.bz2 reilua-enhanced-cd6471d339c394a37a1d46119818e0cabdcf5b42.zip | |
rlSetVertexAttribute takes pointer as Buffer.
Diffstat (limited to 'src')
| -rw-r--r-- | src/rlgl.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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; } |
