glshim updated, added latest changes by ptitSeb

This commit is contained in:
lubomyr
2016-03-12 16:55:49 +02:00
parent 234245ae2d
commit ea3919b9b6
3 changed files with 8 additions and 7 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, min, max + 1 + min);
list = arrays_to_renderlist(list, mode, 0, max + 1 - min);
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, min, max + 1 + min);
list = arrays_to_renderlist(list, mode, 0, max + 1 - min);
list->indices = sindices;
list->ilen = count;
list->indice_cap = count;

View File

@@ -109,6 +109,7 @@ typedef enum {
} statbatch_enabled_t;
typedef struct {
int active_tex_changed;
GLenum active_tex; // only 1 active texture for now
GLenum bound_targ;
GLenum bound_tex;

View File

@@ -1494,13 +1494,13 @@ void glshim_glGetTexImage(GLenum target, GLint level, GLenum format, GLenum type
void glshim_glActiveTexture( GLenum texture ) {
if (glstate.list.active && (glstate.gl_batch && !glstate.list.compiling)) {
if ((glstate.statebatch.active_tex == texture))
return; // nothing to do...
if (!glstate.statebatch.active_tex) {
glstate.statebatch.active_tex = texture;
} else {
if (glstate.statebatch.active_tex_changed) {
if(glstate.statebatch.active_tex == texture)
return; // nothing to do...
flush();
}
glstate.statebatch.active_tex = texture;
glstate.statebatch.active_tex_changed = 1;
}
if (glstate.list.active) {
NewStage(glstate.list.active, STAGE_ACTIVETEX);