glshim updated. added changes from https://github.com/ptitSeb/glshim

This commit is contained in:
lubomyr
2015-09-27 15:11:13 +03:00
parent c8fc91b310
commit 4f2acb52ad
15 changed files with 492 additions and 332 deletions
+4 -2
View File
@@ -224,8 +224,9 @@ void glPushAttrib(GLbitfield mask) {
int a;
for (a=0; a<MAX_TEX; a++) {
cur->texgen_r[a] = state.enable.texgen_r[a];
cur->texgen_r[a] = state.enable.texgen_s[a];
cur->texgen_r[a] = state.enable.texgen_t[a];
cur->texgen_s[a] = state.enable.texgen_s[a];
cur->texgen_t[a] = state.enable.texgen_t[a];
cur->texgen[a] = state.texgen[a]; // all mode and planes per texture in 1 line
cur->texture[a] = (state.texture.bound[a])?state.texture.bound[a]->texture:0;
}
//glActiveTexture(GL_TEXTURE0+cur->active);
@@ -478,6 +479,7 @@ void glPopAttrib() {
state.enable.texgen_r[a] = cur->texgen_r[a];
state.enable.texgen_s[a] = cur->texgen_s[a];
state.enable.texgen_t[a] = cur->texgen_t[a];
state.texgen[a] = cur->texgen[a]; // all mode and planes per texture in 1 line
if ((cur->texture[a]==0 && state.texture.bound[a] != 0) || (cur->texture[a]!=0 && state.texture.bound[a]==0)) {
glActiveTexture(GL_TEXTURE0+a);
glBindTexture(GL_TEXTURE_2D, cur->texture[a]);