Lines Matching refs:to
101 const CRTextureState *to = &(toCtx->texture);
120 if (from->unit[i].enabled1D != to->unit[i].enabled1D)
122 able[to->unit[i].enabled1D](GL_TEXTURE_1D);
126 if (from->unit[i].enabled2D != to->unit[i].enabled2D)
128 able[to->unit[i].enabled2D](GL_TEXTURE_2D);
133 if (from->unit[i].enabled3D != to->unit[i].enabled3D)
135 able[to->unit[i].enabled3D](GL_TEXTURE_3D);
142 from->unit[i].enabledCubeMap != to->unit[i].enabledCubeMap)
144 able[to->unit[i].enabledCubeMap](GL_TEXTURE_CUBE_MAP_ARB);
151 from->unit[i].enabledRect != to->unit[i].enabledRect)
153 able[to->unit[i].enabledRect](GL_TEXTURE_RECTANGLE_NV);
158 if (from->unit[i].textureGen.s != to->unit[i].textureGen.s ||
159 from->unit[i].textureGen.t != to->unit[i].textureGen.t ||
160 from->unit[i].textureGen.r != to->unit[i].textureGen.r ||
161 from->unit[i].textureGen.q != to->unit[i].textureGen.q)
163 able[to->unit[i].textureGen.s](GL_TEXTURE_GEN_S);
164 able[to->unit[i].textureGen.t](GL_TEXTURE_GEN_T);
165 able[to->unit[i].textureGen.r](GL_TEXTURE_GEN_R);
166 able[to->unit[i].textureGen.q](GL_TEXTURE_GEN_Q);
176 ** and not a sync, we won't need to
187 if (from->unit[i].currentTexture1D->hwid != to->unit[i].currentTexture1D->hwid)
189 diff_api.BindTexture(GL_TEXTURE_1D, crStateGetTextureObjHWID(to->unit[i].currentTexture1D));
193 if (from->unit[i].currentTexture2D->hwid != to->unit[i].currentTexture2D->hwid)
195 diff_api.BindTexture(GL_TEXTURE_2D, crStateGetTextureObjHWID(to->unit[i].currentTexture2D));
200 if (from->unit[i].currentTexture3D->hwid != to->unit[i].currentTexture3D->hwid)
202 diff_api.BindTexture(GL_TEXTURE_3D, crStateGetTextureObjHWID(to->unit[i].currentTexture3D));
209 from->unit[i].currentTextureCubeMap->hwid != to->unit[i].currentTextureCubeMap->hwid)
211 diff_api.BindTexture(GL_TEXTURE_CUBE_MAP_ARB, crStateGetTextureObjHWID(to->unit[i].currentTextureCubeMap));
218 from->unit[i].currentTextureRect->hwid != to->unit[i].currentTextureRect->hwid)
220 diff_api.BindTexture(GL_TEXTURE_RECTANGLE_NV, crStateGetTextureObjHWID(to->unit[i].currentTextureRect));
234 if (from->unit[i].objSCoeff.x != to->unit[i].objSCoeff.x ||
235 from->unit[i].objSCoeff.y != to->unit[i].objSCoeff.y ||
236 from->unit[i].objSCoeff.z != to->unit[i].objSCoeff.z ||
237 from->unit[i].objSCoeff.w != to->unit[i].objSCoeff.w)
240 f[0] = to->unit[i].objSCoeff.x;
241 f[1] = to->unit[i].objSCoeff.y;
242 f[2] = to->unit[i].objSCoeff.z;
243 f[3] = to->unit[i].objSCoeff.w;
248 if (from->unit[i].objTCoeff.x != to->unit[i].objTCoeff.x ||
249 from->unit[i].objTCoeff.y != to->unit[i].objTCoeff.y ||
250 from->unit[i].objTCoeff.z != to->unit[i].objTCoeff.z ||
251 from->unit[i].objTCoeff.w != to->unit[i].objTCoeff.w) {
253 f[0] = to->unit[i].objTCoeff.x;
254 f[1] = to->unit[i].objTCoeff.y;
255 f[2] = to->unit[i].objTCoeff.z;
256 f[3] = to->unit[i].objTCoeff.w;
261 if (from->unit[i].objRCoeff.x != to->unit[i].objRCoeff.x ||
262 from->unit[i].objRCoeff.y != to->unit[i].objRCoeff.y ||
263 from->unit[i].objRCoeff.z != to->unit[i].objRCoeff.z ||
264 from->unit[i].objRCoeff.w != to->unit[i].objRCoeff.w) {
266 f[0] = to->unit[i].objRCoeff.x;
267 f[1] = to->unit[i].objRCoeff.y;
268 f[2] = to->unit[i].objRCoeff.z;
269 f[3] = to->unit[i].objRCoeff.w;
274 if (from->unit[i].objQCoeff.x != to->unit[i].objQCoeff.x ||
275 from->unit[i].objQCoeff.y != to->unit[i].objQCoeff.y ||
276 from->unit[i].objQCoeff.z != to->unit[i].objQCoeff.z ||
277 from->unit[i].objQCoeff.w != to->unit[i].objQCoeff.w) {
279 f[0] = to->unit[i].objQCoeff.x;
280 f[1] = to->unit[i].objQCoeff.y;
281 f[2] = to->unit[i].objQCoeff.z;
282 f[3] = to->unit[i].objQCoeff.w;
298 if (from->unit[i].eyeSCoeff.x != to->unit[i].eyeSCoeff.x ||
299 from->unit[i].eyeSCoeff.y != to->unit[i].eyeSCoeff.y ||
300 from->unit[i].eyeSCoeff.z != to->unit[i].eyeSCoeff.z ||
301 from->unit[i].eyeSCoeff.w != to->unit[i].eyeSCoeff.w) {
303 f[0] = to->unit[i].eyeSCoeff.x;
304 f[1] = to->unit[i].eyeSCoeff.y;
305 f[2] = to->unit[i].eyeSCoeff.z;
306 f[3] = to->unit[i].eyeSCoeff.w;
311 if (from->unit[i].eyeTCoeff.x != to->unit[i].eyeTCoeff.x ||
312 from->unit[i].eyeTCoeff.y != to->unit[i].eyeTCoeff.y ||
313 from->unit[i].eyeTCoeff.z != to->unit[i].eyeTCoeff.z ||
314 from->unit[i].eyeTCoeff.w != to->unit[i].eyeTCoeff.w) {
316 f[0] = to->unit[i].eyeTCoeff.x;
317 f[1] = to->unit[i].eyeTCoeff.y;
318 f[2] = to->unit[i].eyeTCoeff.z;
319 f[3] = to->unit[i].eyeTCoeff.w;
324 if (from->unit[i].eyeRCoeff.x != to->unit[i].eyeRCoeff.x ||
325 from->unit[i].eyeRCoeff.y != to->unit[i].eyeRCoeff.y ||
326 from->unit[i].eyeRCoeff.z != to->unit[i].eyeRCoeff.z ||
327 from->unit[i].eyeRCoeff.w != to->unit[i].eyeRCoeff.w) {
329 f[0] = to->unit[i].eyeRCoeff.x;
330 f[1] = to->unit[i].eyeRCoeff.y;
331 f[2] = to->unit[i].eyeRCoeff.z;
332 f[3] = to->unit[i].eyeRCoeff.w;
337 if (from->unit[i].eyeQCoeff.x != to->unit[i].eyeQCoeff.x ||
338 from->unit[i].eyeQCoeff.y != to->unit[i].eyeQCoeff.y ||
339 from->unit[i].eyeQCoeff.z != to->unit[i].eyeQCoeff.z ||
340 from->unit[i].eyeQCoeff.w != to->unit[i].eyeQCoeff.w) {
342 f[0] = to->unit[i].eyeQCoeff.x;
343 f[1] = to->unit[i].eyeQCoeff.y;
344 f[2] = to->unit[i].eyeQCoeff.z;
345 f[3] = to->unit[i].eyeQCoeff.w;
359 if (from->unit[i].gen.s != to->unit[i].gen.s ||
360 from->unit[i].gen.t != to->unit[i].gen.t ||
361 from->unit[i].gen.r != to->unit[i].gen.r ||
362 from->unit[i].gen.q != to->unit[i].gen.q)
364 diff_api.TexGeni (GL_S, GL_TEXTURE_GEN_MODE, to->unit[i].gen.s);
365 diff_api.TexGeni (GL_T, GL_TEXTURE_GEN_MODE, to->unit[i].gen.t);
366 diff_api.TexGeni (GL_R, GL_TEXTURE_GEN_MODE, to->unit[i].gen.r);
367 diff_api.TexGeni (GL_Q, GL_TEXTURE_GEN_MODE, to->unit[i].gen.q);
382 if (from->unit[i].envMode != to->unit[i].envMode)
384 diff_api.TexEnvi (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, to->unit[i].envMode);
388 if (from->unit[i].envColor.r != to->unit[i].envColor.r ||
389 from->unit[i].envColor.g != to->unit[i].envColor.g ||
390 from->unit[i].envColor.b != to->unit[i].envColor.b ||
391 from->unit[i].envColor.a != to->unit[i].envColor.a)
394 f[0] = to->unit[i].envColor.r;
395 f[1] = to->unit[i].envColor.g;
396 f[2] = to->unit[i].envColor.b;
397 f[3] = to->unit[i].envColor.a;
402 if (from->unit[i].combineModeRGB != to->unit[i].combineModeRGB)
404 diff_api.TexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB_ARB, to->unit[i].combineModeRGB);
408 if (from->unit[i].combineModeA != to->unit[i].combineModeA)
410 diff_api.TexEnvi(GL_TEXTURE_ENV, GL_COMBINE_ALPHA_ARB, to->unit[i].combineModeA);
414 if (from->unit[i].combineSourceRGB[0] != to->unit[i].combineSourceRGB[0])
416 diff_api.TexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_RGB_ARB, to->unit[i].combineSourceRGB[0]);
420 if (from->unit[i].combineSourceRGB[1] != to->unit[i].combineSourceRGB[1])
422 diff_api.TexEnvi(GL_TEXTURE_ENV, GL_SOURCE1_RGB_ARB, to->unit[i].combineSourceRGB[1]);
426 if (from->unit[i].combineSourceRGB[2] != to->unit[i].combineSourceRGB[2])
428 diff_api.TexEnvi(GL_TEXTURE_ENV, GL_SOURCE2_RGB_ARB, to->unit[i].combineSourceRGB[2]);
432 if (from->unit[i].combineSourceA[0] != to->unit[i].combineSourceA[0])
434 diff_api.TexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_ALPHA_ARB, to->unit[i].combineSourceA[0]);
438 if (from->unit[i].combineSourceA[1] != to->unit[i].combineSourceA[1])
440 diff_api.TexEnvi(GL_TEXTURE_ENV, GL_SOURCE1_ALPHA_ARB, to->unit[i].combineSourceA[1]);
444 if (from->unit[i].combineSourceA[2] != to->unit[i].combineSourceA[2])
446 diff_api.TexEnvi(GL_TEXTURE_ENV, GL_SOURCE2_ALPHA_ARB, to->unit[i].combineSourceA[2]);
450 if (from->unit[i].combineOperandRGB[0] != to->unit[i].combineOperandRGB[0])
452 diff_api.TexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_RGB_ARB, to->unit[i].combineOperandRGB[0]);
456 if (from->unit[i].combineOperandRGB[1] != to->unit[i].combineOperandRGB[1])
458 diff_api.TexEnvi(GL_TEXTURE_ENV, GL_OPERAND1_RGB_ARB, to->unit[i].combineOperandRGB[1]);
462 if (from->unit[i].combineOperandRGB[2] != to->unit[i].combineOperandRGB[2])
464 diff_api.TexEnvi(GL_TEXTURE_ENV, GL_OPERAND2_RGB_ARB, to->unit[i].combineOperandRGB[2]);
468 if (from->unit[i].combineOperandA[0] != to->unit[i].combineOperandA[0])
470 diff_api.TexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_ALPHA_ARB, to->unit[i].combineOperandA[0]);
474 if (from->unit[i].combineOperandA[1] != to->unit[i].combineOperandA[1])
476 diff_api.TexEnvi(GL_TEXTURE_ENV, GL_OPERAND1_ALPHA_ARB, to->unit[i].combineOperandA[1]);
480 if (from->unit[i].combineOperandA[2] != to->unit[i].combineOperandA[2])
482 diff_api.TexEnvi(GL_TEXTURE_ENV, GL_OPERAND2_ALPHA_ARB, to->unit[i].combineOperandA[2]);
486 if (from->unit[i].combineScaleRGB != to->unit[i].combineScaleRGB)
488 diff_api.TexEnvf(GL_TEXTURE_ENV, GL_RGB_SCALE_ARB, to->unit[i].combineScaleRGB);
492 if (from->unit[i].combineScaleA != to->unit[i].combineScaleA)
494 diff_api.TexEnvf(GL_TEXTURE_ENV, GL_ALPHA_SCALE, to->unit[i].combineScaleA);
519 * Check the dirty bits for the specified texture on a given unit to
523 int crStateTextureCheckDirtyImages(CRContext *from, CRContext *to, GLenum target, int textureUnit)
532 CRASSERT(to);
535 tsto = &(to->texture);
931 CRTextureState *to = &(toCtx->texture);
959 if (from->unit[u].enabled1D != to->unit[u].enabled1D)
961 able[to->unit[u].enabled1D](GL_TEXTURE_1D);
962 from->unit[u].enabled1D = to->unit[u].enabled1D;
964 if (from->unit[u].enabled2D != to->unit[u].enabled2D)
966 able[to->unit[u].enabled2D](GL_TEXTURE_2D);
967 from->unit[u].enabled2D = to->unit[u].enabled2D;
970 if (from->unit[u].enabled3D != to->unit[u].enabled3D)
972 able[to->unit[u].enabled3D](GL_TEXTURE_3D);
973 from->unit[u].enabled3D = to->unit[u].enabled3D;
978 from->unit[u].enabledCubeMap != to->unit[u].enabledCubeMap)
980 able[to->unit[u].enabledCubeMap](GL_TEXTURE_CUBE_MAP_ARB);
981 from->unit[u].enabledCubeMap = to->unit[u].enabledCubeMap;
986 from->unit[u].enabledRect != to->unit[u].enabledRect)
988 able[to->unit[u].enabledRect](GL_TEXTURE_RECTANGLE_NV);
989 from->unit[u].enabledRect = to->unit[u].enabledRect;
994 if (from->unit[u].textureGen.s != to->unit[u].textureGen.s ||
995 from->unit[u].textureGen.t != to->unit[u].textureGen.t ||
996 from->unit[u].textureGen.r != to->unit[u].textureGen.r ||
997 from->unit[u].textureGen.q != to->unit[u].textureGen.q)
999 able[to->unit[u].textureGen.s](GL_TEXTURE_GEN_S);
1000 able[to->unit[u].textureGen.t](GL_TEXTURE_GEN_T);
1001 able[to->unit[u].textureGen.r](GL_TEXTURE_GEN_R);
1002 able[to->unit[u].textureGen.q](GL_TEXTURE_GEN_Q);
1003 from->unit[u].textureGen = to->unit[u].textureGen;
1016 if (from->unit[u].objSCoeff.x != to->unit[u].objSCoeff.x ||
1017 from->unit[u].objSCoeff.y != to->unit[u].objSCoeff.y ||
1018 from->unit[u].objSCoeff.z != to->unit[u].objSCoeff.z ||
1019 from->unit[u].objSCoeff.w != to->unit[u].objSCoeff.w)
1022 f[0] = to->unit[u].objSCoeff.x;
1023 f[1] = to->unit[u].objSCoeff.y;
1024 f[2] = to->unit[u].objSCoeff.z;
1025 f[3] = to->unit[u].objSCoeff.w;
1027 from->unit[u].objSCoeff = to->unit[u].objSCoeff;
1029 if (from->unit[u].objTCoeff.x != to->unit[u].objTCoeff.x ||
1030 from->unit[u].objTCoeff.y != to->unit[u].objTCoeff.y ||
1031 from->unit[u].objTCoeff.z != to->unit[u].objTCoeff.z ||
1032 from->unit[u].objTCoeff.w != to->unit[u].objTCoeff.w)
1035 f[0] = to->unit[u].objTCoeff.x;
1036 f[1] = to->unit[u].objTCoeff.y;
1037 f[2] = to->unit[u].objTCoeff.z;
1038 f[3] = to->unit[u].objTCoeff.w;
1040 from->unit[u].objTCoeff = to->unit[u].objTCoeff;
1042 if (from->unit[u].objRCoeff.x != to->unit[u].objRCoeff.x ||
1043 from->unit[u].objRCoeff.y != to->unit[u].objRCoeff.y ||
1044 from->unit[u].objRCoeff.z != to->unit[u].objRCoeff.z ||
1045 from->unit[u].objRCoeff.w != to->unit[u].objRCoeff.w)
1048 f[0] = to->unit[u].objRCoeff.x;
1049 f[1] = to->unit[u].objRCoeff.y;
1050 f[2] = to->unit[u].objRCoeff.z;
1051 f[3] = to->unit[u].objRCoeff.w;
1053 from->unit[u].objRCoeff = to->unit[u].objRCoeff;
1055 if (from->unit[u].objQCoeff.x != to->unit[u].objQCoeff.x ||
1056 from->unit[u].objQCoeff.y != to->unit[u].objQCoeff.y ||
1057 from->unit[u].objQCoeff.z != to->unit[u].objQCoeff.z ||
1058 from->unit[u].objQCoeff.w != to->unit[u].objQCoeff.w)
1061 f[0] = to->unit[u].objQCoeff.x;
1062 f[1] = to->unit[u].objQCoeff.y;
1063 f[2] = to->unit[u].objQCoeff.z;
1064 f[3] = to->unit[u].objQCoeff.w;
1066 from->unit[u].objQCoeff = to->unit[u].objQCoeff;
1082 if (from->unit[u].eyeSCoeff.x != to->unit[u].eyeSCoeff.x ||
1083 from->unit[u].eyeSCoeff.y != to->unit[u].eyeSCoeff.y ||
1084 from->unit[u].eyeSCoeff.z != to->unit[u].eyeSCoeff.z ||
1085 from->unit[u].eyeSCoeff.w != to->unit[u].eyeSCoeff.w)
1088 f[0] = to->unit[u].eyeSCoeff.x;
1089 f[1] = to->unit[u].eyeSCoeff.y;
1090 f[2] = to->unit[u].eyeSCoeff.z;
1091 f[3] = to->unit[u].eyeSCoeff.w;
1093 from->unit[u].eyeSCoeff = to->unit[u].eyeSCoeff;
1095 if (from->unit[u].eyeTCoeff.x != to->unit[u].eyeTCoeff.x ||
1096 from->unit[u].eyeTCoeff.y != to->unit[u].eyeTCoeff.y ||
1097 from->unit[u].eyeTCoeff.z != to->unit[u].eyeTCoeff.z ||
1098 from->unit[u].eyeTCoeff.w != to->unit[u].eyeTCoeff.w)
1101 f[0] = to->unit[u].eyeTCoeff.x;
1102 f[1] = to->unit[u].eyeTCoeff.y;
1103 f[2] = to->unit[u].eyeTCoeff.z;
1104 f[3] = to->unit[u].eyeTCoeff.w;
1106 from->unit[u].eyeTCoeff = to->unit[u].eyeTCoeff;
1108 if (from->unit[u].eyeRCoeff.x != to->unit[u].eyeRCoeff.x ||
1109 from->unit[u].eyeRCoeff.y != to->unit[u].eyeRCoeff.y ||
1110 from->unit[u].eyeRCoeff.z != to->unit[u].eyeRCoeff.z ||
1111 from->unit[u].eyeRCoeff.w != to->unit[u].eyeRCoeff.w)
1114 f[0] = to->unit[u].eyeRCoeff.x;
1115 f[1] = to->unit[u].eyeRCoeff.y;
1116 f[2] = to->unit[u].eyeRCoeff.z;
1117 f[3] = to->unit[u].eyeRCoeff.w;
1119 from->unit[u].eyeRCoeff = to->unit[u].eyeRCoeff;
1121 if (from->unit[u].eyeQCoeff.x != to->unit[u].eyeQCoeff.x ||
1122 from->unit[u].eyeQCoeff.y != to->unit[u].eyeQCoeff.y ||
1123 from->unit[u].eyeQCoeff.z != to->unit[u].eyeQCoeff.z ||
1124 from->unit[u].eyeQCoeff.w != to->unit[u].eyeQCoeff.w)
1127 f[0] = to->unit[u].eyeQCoeff.x;
1128 f[1] = to->unit[u].eyeQCoeff.y;
1129 f[2] = to->unit[u].eyeQCoeff.z;
1130 f[3] = to->unit[u].eyeQCoeff.w;
1132 from->unit[u].eyeQCoeff = to->unit[u].eyeQCoeff;
1143 if (from->unit[u].gen.s != to->unit[u].gen.s ||
1144 from->unit[u].gen.t != to->unit[u].gen.t ||
1145 from->unit[u].gen.r != to->unit[u].gen.r ||
1146 from->unit[u].gen.q != to->unit[u].gen.q)
1148 diff_api.TexGeni (GL_S, GL_TEXTURE_GEN_MODE, to->unit[u].gen.s);
1149 diff_api.TexGeni (GL_T, GL_TEXTURE_GEN_MODE, to->unit[u].gen.t);
1150 diff_api.TexGeni (GL_R, GL_TEXTURE_GEN_MODE, to->unit[u].gen.r);
1151 diff_api.TexGeni (GL_Q, GL_TEXTURE_GEN_MODE, to->unit[u].gen.q);
1152 from->unit[u].gen = to->unit[u].gen;
1160 if (from->unit[u].envMode != to->unit[u].envMode)
1162 diff_api.TexEnvi (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, to->unit[u].envMode);
1163 from->unit[u].envMode = to->unit[u].envMode;
1165 if (from->unit[u].envColor.r != to->unit[u].envColor.r ||
1166 from->unit[u].envColor.g != to->unit[u].envColor.g ||
1167 from->unit[u].envColor.b != to->unit[u].envColor.b ||
1168 from->unit[u].envColor.a != to->unit[u].envColor.a)
1171 f[0] = to->unit[u].envColor.r;
1172 f[1] = to->unit[u].envColor.g;
1173 f[2] = to->unit[u].envColor.b;
1174 f[3] = to->unit[u].envColor.a;
1176 from->unit[u].envColor = to->unit[u].envColor;
1179 if (from->unit[u].combineModeRGB != to->unit[u].combineModeRGB)
1181 diff_api.TexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB_ARB, to->unit[u].combineModeRGB);
1182 from->unit[u].combineModeRGB = to->unit[u].combineModeRGB;
1184 if (from->unit[u].combineModeA != to->unit[u].combineModeA)
1186 diff_api.TexEnvi(GL_TEXTURE_ENV, GL_COMBINE_ALPHA_ARB, to->unit[u].combineModeA);
1187 from->unit[u].combineModeA = to->unit[u].combineModeA;
1189 if (from->unit[u].combineSourceRGB[0] != to->unit[u].combineSourceRGB[0])
1191 diff_api.TexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_RGB_ARB, to->unit[u].combineSourceRGB[0]);
1192 from->unit[u].combineSourceRGB[0] = to->unit[u].combineSourceRGB[0];
1194 if (from->unit[u].combineSourceRGB[1] != to->unit[u].combineSourceRGB[1])
1196 diff_api.TexEnvi(GL_TEXTURE_ENV, GL_SOURCE1_RGB_ARB, to->unit[u].combineSourceRGB[1]);
1197 from->unit[u].combineSourceRGB[1] = to->unit[u].combineSourceRGB[1];
1199 if (from->unit[u].combineSourceRGB[2] != to->unit[u].combineSourceRGB[2])
1201 diff_api.TexEnvi(GL_TEXTURE_ENV, GL_SOURCE2_RGB_ARB, to->unit[u].combineSourceRGB[2]);
1202 from->unit[u].combineSourceRGB[2] = to->unit[u].combineSourceRGB[2];
1204 if (from->unit[u].combineSourceA[0] != to->unit[u].combineSourceA[0])
1206 diff_api.TexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_ALPHA_ARB, to->unit[u].combineSourceA[0]);
1207 from->unit[u].combineSourceA[0] = to->unit[u].combineSourceA[0];
1209 if (from->unit[u].combineSourceA[1] != to->unit[u].combineSourceA[1])
1211 diff_api.TexEnvi(GL_TEXTURE_ENV, GL_SOURCE1_ALPHA_ARB, to->unit[u].combineSourceA[1]);
1212 from->unit[u].combineSourceA[1] = to->unit[u].combineSourceA[1];
1214 if (from->unit[u].combineSourceA[2] != to->unit[u].combineSourceA[2])
1216 diff_api.TexEnvi(GL_TEXTURE_ENV, GL_SOURCE2_ALPHA_ARB, to->unit[u].combineSourceA[2]);
1217 from->unit[u].combineSourceA[2] = to->unit[u].combineSourceA[2];
1219 if (from->unit[u].combineOperandRGB[0] != to->unit[u].combineOperandRGB[0])
1221 diff_api.TexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_RGB_ARB, to->unit[u].combineOperandRGB[0]);
1222 from->unit[u].combineOperandRGB[0] = to->unit[u].combineOperandRGB[0];
1224 if (from->unit[u].combineOperandRGB[1] != to->unit[u].combineOperandRGB[1])
1226 diff_api.TexEnvi(GL_TEXTURE_ENV, GL_OPERAND1_RGB_ARB, to->unit[u].combineOperandRGB[1]);
1227 from->unit[u].combineOperandRGB[1] = to->unit[u].combineOperandRGB[1];
1229 if (from->unit[u].combineOperandRGB[2] != to->unit[u].combineOperandRGB[2])
1231 diff_api.TexEnvi(GL_TEXTURE_ENV, GL_OPERAND2_RGB_ARB, to->unit[u].combineOperandRGB[2]);
1232 from->unit[u].combineOperandRGB[2] = to->unit[u].combineOperandRGB[2];
1234 if (from->unit[u].combineOperandA[0] != to->unit[u].combineOperandA[0])
1236 diff_api.TexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_ALPHA_ARB, to->unit[u].combineOperandA[0]);
1237 from->unit[u].combineOperandA[0] = to->unit[u].combineOperandA[0];
1239 if (from->unit[u].combineOperandA[1] != to->unit[u].combineOperandA[1])
1241 diff_api.TexEnvi(GL_TEXTURE_ENV, GL_OPERAND1_ALPHA_ARB, to->unit[u].combineOperandA[1]);
1242 from->unit[u].combineOperandA[1] = to->unit[u].combineOperandA[1];
1244 if (from->unit[u].combineOperandA[2] != to->unit[u].combineOperandA[2])
1246 diff_api.TexEnvi(GL_TEXTURE_ENV, GL_OPERAND2_ALPHA_ARB, to->unit[u].combineOperandA[2]);
1247 from->unit[u].combineOperandA[2] = to->unit[u].combineOperandA[2];
1249 if (from->unit[u].combineScaleRGB != to->unit[u].combineScaleRGB)
1251 diff_api.TexEnvf(GL_TEXTURE_ENV, GL_RGB_SCALE_ARB, to->unit[u].combineScaleRGB);
1252 from->unit[u].combineScaleRGB = to->unit[u].combineScaleRGB;
1254 if (from->unit[u].combineScaleA != to->unit[u].combineScaleA)
1256 diff_api.TexEnvf(GL_TEXTURE_ENV, GL_ALPHA_SCALE, to->unit[u].combineScaleA);
1257 from->unit[u].combineScaleA = to->unit[u].combineScaleA;
1261 if (from->unit[u].lodBias != to->unit[u].lodBias)
1263 diff_api.TexEnvf(GL_TEXTURE_FILTER_CONTROL_EXT, GL_TEXTURE_LOD_BIAS_EXT, to->unit[u].lodBias);
1264 from->unit[u].lodBias = to->unit[u].lodBias;
1277 if (to->unit[u].enabled1D || haveFragProg) {
1278 tobj = to->unit[u].currentTexture1D;
1283 if (to->unit[u].enabled2D || haveFragProg) {
1284 tobj = to->unit[u].currentTexture2D;
1290 if (to->unit[u].enabled3D || haveFragProg) {
1291 tobj = to->unit[u].currentTexture3D;
1299 (to->unit[u].enabledCubeMap || haveFragProg)) {
1300 tobj = to->unit[u].currentTextureCubeMap;
1308 (to->unit[u].enabledRect || haveFragProg)) {
1309 tobj = to->unit[u].currentTextureRect;
1395 * This isn't used right now, but will be used in the future to fix some
1397 * in a display list, we have to be sure that all outstanding texture object