Skip to main content
GameDev.net gamedev.net
🔒 Locked

SDL_BlendMode when sharing textures?

Started by doyleman77 Jul 19, 2014 at 4:23 PM 0 replies 2.3k views
Original Post
doyleman77
doyleman77

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?

doyleman77
doyleman77

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?

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.