for (i = 0;i < backendarrayunits;i++)
{
- if (gl_workaround_mac_texmatrix.integer)
- GL_ActiveTexture(i);
GL_ClientActiveTexture(i);
GL_BindVBO(0);
qglTexCoordPointer(2, GL_FLOAT, sizeof(float[2]), NULL);CHECKGLERROR
CHECKGLERROR
}
}
- if (gl_workaround_mac_texmatrix.integer)
- GL_ClientActiveTexture(num);
}
void GL_ClientActiveTexture(unsigned int num)
{
if (gl_state.units[i].arrayenabled)
{
- if (gl_workaround_mac_texmatrix.integer)
- GL_ActiveTexture(i);
GL_ClientActiveTexture(i);
if (!qglIsEnabled(GL_TEXTURE_COORD_ARRAY))
Con_Print("R_Mesh_Draw: texcoord array set but not enabled\n");
if (!unit->arrayenabled)
{
unit->arrayenabled = true;
- if (gl_workaround_mac_texmatrix.integer)
- GL_ActiveTexture(unitnum);
GL_ClientActiveTexture(unitnum);
qglEnableClientState(GL_TEXTURE_COORD_ARRAY);CHECKGLERROR
}
unit->pointer_texcoord_buffer = bufferobject;
unit->pointer_texcoord_offset = bufferoffset;
unit->arraycomponents = numcomponents;
- if (gl_workaround_mac_texmatrix.integer)
- GL_ActiveTexture(unitnum);
GL_ClientActiveTexture(unitnum);
GL_BindVBO(bufferobject);
qglTexCoordPointer(unit->arraycomponents, GL_FLOAT, sizeof(float) * unit->arraycomponents, bufferobject ? (void *)bufferoffset : texcoord);CHECKGLERROR
if (unit->arrayenabled)
{
unit->arrayenabled = false;
- if (gl_workaround_mac_texmatrix.integer)
- GL_ActiveTexture(unitnum);
GL_ClientActiveTexture(unitnum);
qglDisableClientState(GL_TEXTURE_COORD_ARRAY);CHECKGLERROR
}
CHECKGLERROR
Matrix4x4_ToArrayDoubleGL(&unit->matrix, glmatrix);
GL_ActiveTexture(unitnum);
+ if (gl_workaround_mac_texmatrix.integer)
+ GL_ClientActiveTexture(unitnum);
qglMatrixMode(GL_TEXTURE);CHECKGLERROR
qglLoadMatrixd(glmatrix);CHECKGLERROR
qglMatrixMode(GL_MODELVIEW);CHECKGLERROR
unit->matrix = identitymatrix;
CHECKGLERROR
GL_ActiveTexture(unitnum);
+ if (gl_workaround_mac_texmatrix.integer)
+ GL_ClientActiveTexture(unitnum);
qglMatrixMode(GL_TEXTURE);CHECKGLERROR
qglLoadIdentity();CHECKGLERROR
qglMatrixMode(GL_MODELVIEW);CHECKGLERROR
if (unit->arrayenabled)
{
unit->arrayenabled = false;
- if (gl_workaround_mac_texmatrix.integer)
- GL_ActiveTexture(unitnum);
GL_ClientActiveTexture(unitnum);
qglDisableClientState(GL_TEXTURE_COORD_ARRAY);CHECKGLERROR
}
unit->texmatrixenabled = false;
unit->matrix = identitymatrix;
CHECKGLERROR
- qglMatrixMode(GL_TEXTURE);CHECKGLERROR
GL_ActiveTexture(unitnum);
+ if (gl_workaround_mac_texmatrix.integer)
+ GL_ClientActiveTexture(unitnum);
+ qglMatrixMode(GL_TEXTURE);CHECKGLERROR
qglLoadIdentity();CHECKGLERROR
qglMatrixMode(GL_MODELVIEW);CHECKGLERROR
}