glshim updated, added latest changes by ptitSeb

This commit is contained in:
lubomyr
2016-03-13 21:39:35 +02:00
parent cc52affa6b
commit aee68aefb3
2 changed files with 3 additions and 3 deletions

View File

@@ -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;

View File

@@ -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++) {