summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorraysan5 <[email protected]>2021-07-30 13:50:33 +0200
committerraysan5 <[email protected]>2021-07-30 13:50:33 +0200
commitdffd1435e95eb56b68e3dd7362f0a0190cb8a582 (patch)
tree693862711870a6233359c5e94917a3dd22547a57
parenta8e9e1387f0abaa46557dd2076973cd30784148c (diff)
downloadraylib-dffd1435e95eb56b68e3dd7362f0a0190cb8a582.tar.gz
raylib-dffd1435e95eb56b68e3dd7362f0a0190cb8a582.zip
Revert "REVIEWED: Avoid UBSAN warnings #1891"
This reverts commit a8e9e1387f0abaa46557dd2076973cd30784148c.
-rw-r--r--src/rlgl.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/rlgl.h b/src/rlgl.h
index 10cde309..ece72f8c 100644
--- a/src/rlgl.h
+++ b/src/rlgl.h
@@ -3227,8 +3227,7 @@ void rlDrawVertexArray(int offset, int count)
void rlDrawVertexArrayElements(int offset, int count, void *buffer)
{
- if (buffer == 0) glDrawElements(GL_TRIANGLES, count, GL_UNSIGNED_SHORT, offset);
- else glDrawElements(GL_TRIANGLES, count, GL_UNSIGNED_SHORT, (unsigned short *)buffer + offset);
+ glDrawElements(GL_TRIANGLES, count, GL_UNSIGNED_SHORT, (unsigned short *)buffer + offset);
}
void rlDrawVertexArrayInstanced(int offset, int count, int instances)
@@ -3241,8 +3240,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)
- if (buffer == 0) glDrawElementsInstanced(GL_TRIANGLES, count, GL_UNSIGNED_SHORT, offset, instances);
- else glDrawElementsInstanced(GL_TRIANGLES, count, GL_UNSIGNED_SHORT, (unsigned short *)buffer + offset, instances);
+ glDrawElementsInstanced(GL_TRIANGLES, count, GL_UNSIGNED_SHORT, (unsigned short *)buffer + offset, instances);
#endif
}