diff options
| author | Ray <[email protected]> | 2024-04-20 23:37:31 +0200 |
|---|---|---|
| committer | Ray <[email protected]> | 2024-04-20 23:37:31 +0200 |
| commit | f795941521d038840461e96779aaa097e8a2407a (patch) | |
| tree | cdc3efc702636b6759eb29215c41df312497c3b9 /src/rlgl.h | |
| parent | 5cfcf13d4bc4723055f1d6b329148abb92b6b383 (diff) | |
| download | raylib-f795941521d038840461e96779aaa097e8a2407a.tar.gz raylib-f795941521d038840461e96779aaa097e8a2407a.zip | |
REVIEWED: `rlSetVertexAttribute()`, define last parameter as offset #3800
Diffstat (limited to 'src/rlgl.h')
| -rw-r--r-- | src/rlgl.h | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -696,7 +696,7 @@ RLAPI void rlUpdateVertexBuffer(unsigned int bufferId, const void *data, int dat RLAPI void rlUpdateVertexBufferElements(unsigned int id, const void *data, int dataSize, int offset); // Update vertex buffer elements data on GPU buffer RLAPI void rlUnloadVertexArray(unsigned int vaoId); // Unload vertex array (vao) RLAPI void rlUnloadVertexBuffer(unsigned int vboId); // Unload vertex buffer object -RLAPI void rlSetVertexAttribute(unsigned int index, int compSize, int type, bool normalized, int stride, const void *pointer); // Set vertex attribute data configuration +RLAPI void rlSetVertexAttribute(unsigned int index, int compSize, int type, bool normalized, int stride, int offset); // Set vertex attribute data configuration RLAPI void rlSetVertexAttributeDivisor(unsigned int index, int divisor); // Set vertex attribute data divisor RLAPI void rlSetVertexAttributeDefault(int locIndex, const void *value, int attribType, int count); // Set vertex attribute default value, when attribute to provided RLAPI void rlDrawVertexArray(int offset, int count); // Draw vertex array (currently active vao) @@ -3824,14 +3824,14 @@ unsigned int rlLoadVertexArray(void) } // Set vertex attribute -void rlSetVertexAttribute(unsigned int index, int compSize, int type, bool normalized, int stride, const void *pointer) +void rlSetVertexAttribute(unsigned int index, int compSize, int type, bool normalized, int stride, int offset) { #if defined(GRAPHICS_API_OPENGL_33) || defined(GRAPHICS_API_OPENGL_ES2) // NOTE: Data type could be: GL_BYTE, GL_UNSIGNED_BYTE, GL_SHORT, GL_UNSIGNED_SHORT, GL_INT, GL_UNSIGNED_INT // Additional types (depends on OpenGL version or extensions): // - GL_HALF_FLOAT, GL_FLOAT, GL_DOUBLE, GL_FIXED, // - GL_INT_2_10_10_10_REV, GL_UNSIGNED_INT_2_10_10_10_REV, GL_UNSIGNED_INT_10F_11F_11F_REV - glVertexAttribPointer(index, compSize, type, normalized, stride, pointer); + glVertexAttribPointer(index, compSize, type, normalized, stride, (void *)offset); #endif } |
