mirror of
https://github.com/raysan5/raylib.git
synced 2025-09-22 11:18:15 +00:00
Fixing pointer arithmetic to avoid error [-Werror=pointer-arith] (#1685)
This commit is contained in:
@@ -3118,7 +3118,7 @@ void rlDrawVertexArray(int offset, int count)
|
|||||||
|
|
||||||
void rlDrawVertexArrayElements(int offset, int count, void *buffer)
|
void rlDrawVertexArrayElements(int offset, int count, void *buffer)
|
||||||
{
|
{
|
||||||
glDrawElements(GL_TRIANGLES, count, GL_UNSIGNED_SHORT, buffer + offset);
|
glDrawElements(GL_TRIANGLES, count, GL_UNSIGNED_SHORT, (unsigned short*)buffer + offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
void rlDrawVertexArrayInstanced(int offset, int count, int instances)
|
void rlDrawVertexArrayInstanced(int offset, int count, int instances)
|
||||||
@@ -3131,7 +3131,7 @@ void rlDrawVertexArrayInstanced(int offset, int count, int instances)
|
|||||||
void rlDrawVertexArrayElementsInstanced(int offset, int count, void *buffer, int instances)
|
void rlDrawVertexArrayElementsInstanced(int offset, int count, void *buffer, int instances)
|
||||||
{
|
{
|
||||||
#if defined(GRAPHICS_API_OPENGL_33) || defined(GRAPHICS_API_OPENGL_ES2)
|
#if defined(GRAPHICS_API_OPENGL_33) || defined(GRAPHICS_API_OPENGL_ES2)
|
||||||
glDrawElementsInstanced(GL_TRIANGLES, count, GL_UNSIGNED_SHORT, buffer + offset, instances);
|
glDrawElementsInstanced(GL_TRIANGLES, count, GL_UNSIGNED_SHORT, (unsigned short*)buffer + offset, instances);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user