log_pitch++;
t->dirty_images = 0;
- t->bound = 0;
offset = 0;
for ( i = 0 ; i < SAVAGE_TEX_MAXLEVELS && tObj->Image[0][i] ; i++ ) {
if (t->globj)
t->globj->DriverData = 0;
- if (t->bound)
- imesa->CurrentTexObj[t->bound - 1] = 0;
-
remove_from_list(t);
free(t);
}
savageTexSetUnit( t, 0 );
imesa->CurrentTexObj[0] = t;
- t->bound = 1;
+ t->bound |= 1;
if (t->dirty_images) {
savageSetTexImages(imesa, tObj);
imesa->CurrentTexObj[1] = t;
- t->bound = 2;
+ t->bound |= 2;
if (t->dirty_images) {
savageSetTexImages(imesa, tObj);
savageTexSetUnit( t, 0 );
imesa->CurrentTexObj[0] = t;
- t->bound = 1;
+ t->bound |= 1;
if (t->dirty_images) {
savageSetTexImages(imesa, tObj);
static void savageUpdateTextureState_s4( GLcontext *ctx )
{
savageContextPtr imesa = SAVAGE_CONTEXT(ctx);
- if (imesa->CurrentTexObj[0]) imesa->CurrentTexObj[0]->bound = 0;
- if (imesa->CurrentTexObj[1]) imesa->CurrentTexObj[1]->bound = 0;
+ if (imesa->CurrentTexObj[0]) imesa->CurrentTexObj[0]->bound &= ~1;
+ if (imesa->CurrentTexObj[1]) imesa->CurrentTexObj[1]->bound &= ~2;
imesa->CurrentTexObj[0] = 0;
imesa->CurrentTexObj[1] = 0;
FALLBACK (ctx, SAVAGE_FALLBACK_TEXTURE, GL_FALSE);
static void savageUpdateTextureState_s3d( GLcontext *ctx )
{
savageContextPtr imesa = SAVAGE_CONTEXT(ctx);
- if (imesa->CurrentTexObj[0]) imesa->CurrentTexObj[0]->bound = 0;
+ if (imesa->CurrentTexObj[0]) imesa->CurrentTexObj[0]->bound &= ~1;
imesa->CurrentTexObj[0] = 0;
if (ctx->Texture.Unit[1]._ReallyEnabled) {
FALLBACK (ctx, SAVAGE_FALLBACK_TEXTURE, GL_TRUE);
{
savageContextPtr imesa = SAVAGE_CONTEXT( ctx );
-
- if (imesa->CurrentTexObj[ctx->Texture.CurrentUnit]) {
- imesa->CurrentTexObj[ctx->Texture.CurrentUnit]->bound = 0;
- imesa->CurrentTexObj[ctx->Texture.CurrentUnit] = 0;
- }
-
assert( (target != GL_TEXTURE_2D) || (tObj->DriverData != NULL) );
imesa->new_state |= SAVAGE_NEW_TEXTURE;