Changeset 31808 in vbox for trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_texdiff.c
- Timestamp:
- Aug 20, 2010 9:40:40 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_texdiff.c
r16969 r31808 185 185 activeUnit = i; 186 186 } 187 if (from->unit[i].currentTexture1D-> name != to->unit[i].currentTexture1D->name)188 { 189 diff_api.BindTexture(GL_TEXTURE_1D, to->unit[i].currentTexture1D->name);187 if (from->unit[i].currentTexture1D->id != to->unit[i].currentTexture1D->id) 188 { 189 diff_api.BindTexture(GL_TEXTURE_1D, crStateGetTextureObjHWID(to->unit[i].currentTexture1D)); 190 190 FILLDIRTY(tb->current[i]); 191 191 FILLDIRTY(tb->dirty); 192 192 } 193 if (from->unit[i].currentTexture2D-> name != to->unit[i].currentTexture2D->name)194 { 195 diff_api.BindTexture(GL_TEXTURE_2D, to->unit[i].currentTexture2D->name);193 if (from->unit[i].currentTexture2D->id != to->unit[i].currentTexture2D->id) 194 { 195 diff_api.BindTexture(GL_TEXTURE_2D, crStateGetTextureObjHWID(to->unit[i].currentTexture2D)); 196 196 FILLDIRTY(tb->current[i]); 197 197 FILLDIRTY(tb->dirty); 198 198 } 199 199 #ifdef CR_OPENGL_VERSION_1_2 200 if (from->unit[i].currentTexture3D-> name != to->unit[i].currentTexture3D->name) {201 diff_api.BindTexture(GL_TEXTURE_3D, to->unit[i].currentTexture3D->name);200 if (from->unit[i].currentTexture3D->id != to->unit[i].currentTexture3D->id) { 201 diff_api.BindTexture(GL_TEXTURE_3D, crStateGetTextureObjHWID(to->unit[i].currentTexture3D)); 202 202 FILLDIRTY(tb->current[i]); 203 203 FILLDIRTY(tb->dirty); … … 206 206 #ifdef CR_ARB_texture_cube_map 207 207 if (fromCtx->extensions.ARB_texture_cube_map && 208 from->unit[i].currentTextureCubeMap-> name != to->unit[i].currentTextureCubeMap->name) {209 diff_api.BindTexture(GL_TEXTURE_CUBE_MAP_ARB, to->unit[i].currentTextureCubeMap->name);208 from->unit[i].currentTextureCubeMap->id != to->unit[i].currentTextureCubeMap->id) { 209 diff_api.BindTexture(GL_TEXTURE_CUBE_MAP_ARB, crStateGetTextureObjHWID(to->unit[i].currentTextureCubeMap)); 210 210 FILLDIRTY(tb->current[i]); 211 211 FILLDIRTY(tb->dirty); … … 214 214 #ifdef CR_NV_texture_rectangle 215 215 if (fromCtx->extensions.NV_texture_rectangle && 216 from->unit[i].currentTextureRect-> name != to->unit[i].currentTextureRect->name) {217 diff_api.BindTexture(GL_TEXTURE_RECTANGLE_NV, to->unit[i].currentTextureRect->name);216 from->unit[i].currentTextureRect->id != to->unit[i].currentTextureRect->id) { 217 diff_api.BindTexture(GL_TEXTURE_RECTANGLE_NV, crStateGetTextureObjHWID(to->unit[i].currentTextureRect)); 218 218 FILLDIRTY(tb->current[i]); 219 219 FILLDIRTY(tb->dirty); … … 616 616 #endif 617 617 618 diff_api.BindTexture( tobj->target, tobj->name);618 diff_api.BindTexture(tobj->target, crStateGetTextureObjHWID(tobj)); 619 619 620 620 if (alwaysDirty || CHECKDIRTY(tobj->paramsBit[u], bitID)) … … 1304 1304 if (*fromBinding != tobj) 1305 1305 { 1306 diff_api.BindTexture(tobj->target, tobj->name);1306 diff_api.BindTexture(tobj->target, crStateGetTextureObjHWID(tobj)); 1307 1307 *fromBinding = tobj; 1308 1308 } … … 1389 1389 /* save current texture bindings */ 1390 1390 origUnit = g->texture.curTextureUnit; 1391 orig1D = g->texture.unit[0].currentTexture1D->name;1392 orig2D = g->texture.unit[0].currentTexture2D->name;1393 orig3D = g->texture.unit[0].currentTexture3D->name;1391 orig1D = crStateGetTextureObjHWID(g->texture.unit[0].currentTexture1D); 1392 orig2D = crStateGetTextureObjHWID(g->texture.unit[0].currentTexture2D); 1393 orig3D = crStateGetTextureObjHWID(g->texture.unit[0].currentTexture3D); 1394 1394 #ifdef CR_ARB_texture_cube_map 1395 origCube = g->texture.unit[0].currentTextureCubeMap->name;1395 origCube = crStateGetTextureObjHWID(g->texture.unit[0].currentTextureCubeMap); 1396 1396 #endif 1397 1397 #ifdef CR_NV_texture_rectangle 1398 origRect = g->texture.unit[0].currentTextureRect->name;1398 origRect = crStateGetTextureObjHWID(g->texture.unit[0].currentTextureRect); 1399 1399 #endif 1400 1400
Note:
See TracChangeset
for help on using the changeset viewer.