diff --git a/project/jni/glshim/src/gl/gl.c b/project/jni/glshim/src/gl/gl.c index 59297bb27..5bad5838f 100755 --- a/project/jni/glshim/src/gl/gl.c +++ b/project/jni/glshim/src/gl/gl.c @@ -700,7 +700,7 @@ void glshim_glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid list = glstate.list.active; normalize_indices(sindices, &max, &min, count); - list = arrays_to_renderlist(list, mode, 0, max + 1 - min); + list = arrays_to_renderlist(list, mode, min, max + 1); list->indices = sindices; list->ilen = count; list->indice_cap = count; @@ -715,7 +715,7 @@ void glshim_glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid GLsizei min, max; normalize_indices(sindices, &max, &min, count); - list = arrays_to_renderlist(list, mode, 0, max + 1 - min); + list = arrays_to_renderlist(list, mode, min, max + 1); list->indices = sindices; list->ilen = count; list->indice_cap = count; diff --git a/project/jni/glshim/src/gl/pixel.c b/project/jni/glshim/src/gl/pixel.c index e1aca880e..c5fb82251 100755 --- a/project/jni/glshim/src/gl/pixel.c +++ b/project/jni/glshim/src/gl/pixel.c @@ -755,7 +755,7 @@ bool pixel_convert(const GLvoid *src, GLvoid **dst, } return true; } - if ((src_format == GL_BGR) && (dst_format == GL_RGB) && (dst_type = GL_UNSIGNED_SHORT_5_6_5) && ((src_type == GL_UNSIGNED_BYTE)||(src_type == GL_UNSIGNED_INT_8_8_8_8_REV))) { + if (((src_format == GL_BGR) || (src_format == GL_BGRA)) && (dst_format == GL_RGB) && (dst_type = GL_UNSIGNED_SHORT_5_6_5) && ((src_type == GL_UNSIGNED_BYTE)||(src_type == GL_UNSIGNED_INT_8_8_8_8_REV))) { GLuint tmp; for (int i = 0; i < height; i++) { for (int j = 0; j < width; j++) {