1

I need to disable transparency in a Sprite or SpriteBatch. I can't find any methods to do that for a Sprite, and when I call .DisableBlending() on a SpriteBatch, and then I call .EnableBlending(), but doesn't get enabled again until it ends. Code outline:

batch.begin();

// draw non-transparent sprite.
batch.disableBlending();
batch.draw(sprite);

//draw transparent sprites
batch.enableBlending();
batch.draw(sprite2);

batch.end();

So what happens is sprite2 also isn't transparent. Is there any way to "update" a SpriteBatch's blending? Or, if it's impossible, disable transparency on a texture or Sprite?

Anuken
  • 65
  • 11

0 Answers0