Advertisement

SDL_BlendMode when sharing textures?

Started by July 19, 2014 04:23 PM
0 comments, last by doyleman77 10 years, 6 months ago

I'm using a map to store all of my textures, from which entity's refer upon. There may be an instance where I want one entity whom shares a texture with possibly many other entities to be transparent or blended, but not the others.

Right off the bat, I thought about having flag or check per entity on their alpha or blend mode, and modifying the texture just before drawing, and then resetting the texture's blend & alpha (this way, all entities will eventually be able to modify the texture as they need, and it'd default when done).

I am not sure if that'd work, though I *think* so. My question, though, is: is there a more optimal way of handling blending and alpha on a texture that is shared?

nothing?

So far, I've just skipped doing alpha & blends on textures; but I am curious more if there's a better way than the above proposed?

This topic is closed to new replies.

Advertisement