summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorMaksymilian Mika <[email protected]>2021-03-27 06:54:44 +0000
committerGitHub <[email protected]>2021-03-27 07:54:44 +0100
commitf38ced15e7c831e611edd8a125f48f929633733b (patch)
treef6b432b98596d3f017da3925ed3c9bf5228c1e95 /src
parentb6ca524bdd0e56a56b7fa3ef539c7b7891a4e6e9 (diff)
downloadraylib-f38ced15e7c831e611edd8a125f48f929633733b.tar.gz
raylib-f38ced15e7c831e611edd8a125f48f929633733b.zip
Fixing pointer arithmetic to avoid error [-Werror=pointer-arith] (#1685)
Diffstat (limited to 'src')
-rw-r--r--src/rlgl.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rlgl.h b/src/rlgl.h
index f2283743..3b690b2a 100644
--- a/src/rlgl.h
+++ b/src/rlgl.h
@@ -3118,7 +3118,7 @@ void rlDrawVertexArray(int offset, int count)
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)
@@ -3131,7 +3131,7 @@ void rlDrawVertexArrayInstanced(int offset, int count, int instances)
void rlDrawVertexArrayElementsInstanced(int offset, int count, void *buffer, int instances)
{
#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
}