From 6aacdcf5730c3b8915e8c0c82ee7c1cf38ec6284 Mon Sep 17 00:00:00 2001 From: Luke Benstead Date: Wed, 31 May 2017 11:12:34 +0100 Subject: [PATCH] Fix start offset of glDrawArrays for colours and vertices --- gl-arrays.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gl-arrays.c b/gl-arrays.c index d8bd6eb..6afc813 100644 --- a/gl-arrays.c +++ b/gl-arrays.c @@ -1199,9 +1199,9 @@ GLAPI void APIENTRY glDrawArrays(GLenum mode, GLint first, GLsizei count) { if(!_glKosArraysVerifyParameter(mode, count, first, 0)) return; - GL_KOS_VERTEX_POINTER += first; /* Add Pointer Offset */ + GL_KOS_VERTEX_POINTER += (first * GL_KOS_VERTEX_STRIDE); /* Add Pointer Offset */ GL_KOS_TEXCOORD0_POINTER += first; - GL_KOS_COLOR_POINTER += first; + GL_KOS_COLOR_POINTER += (first * GL_KOS_COLOR_STRIDE); GL_KOS_NORMAL_POINTER += first; /* Compile the PVR polygon context with the currently enabled flags */