Here’s my problem
I am using a depth control but now i have different sprites that need different blendstates
how can i change this if I already started the spritebatch.begin(…)
I was trying to change spritebatch.graphicsDevice.blendstate but it doesn’t seems to be working
I cannot turn a black area into transparency
Thank you
Still seems it cannot save the layer order between them by using that code…
I guess the problem might be in using object.draw(spritebatch) and then draw inside the method.
I think theres a problem because i have 2 classes each one with a draw method with input spritebatch
this is what im doing
spriteBatch.Begin(SpriteSortMode.FrontToBack, BlendState.Additive);
d.drawAttack(gameTime, spriteBatch);
spriteBatch.End();
spriteBatch.Begin(SpriteSortMode.FrontToBack, BlendState.AlphaBlend);
drawObjects(gameTime, spriteBatch);
charactersDraw(gameTime, spriteBatch); // same class as the d.drawAttack
spriteBatch.End();
they both draw but the layer !BETWEEN both spritebatche! doesn’t seems to make any difference
the layerdepth works fine with characters and draw objects… only doesn’t work with drawAttack
You need to do multiple SpriteBatch.Begin() .. End() calls, each with a different BlendState. You can still preserve your layerDepth among them.
For example: