Add texture alpha blending
This commit is contained in:
@@ -73,4 +73,9 @@ void Texture::setTextureFromSurface( std::shared_ptr< Renderer > &renderer,
|
||||
}
|
||||
SDL_FreeSurface( surface );
|
||||
}
|
||||
|
||||
void Texture::setAlpha( uint8_t alpha ) {
|
||||
SDL_SetTextureBlendMode( texture, SDL_BLENDMODE_BLEND );
|
||||
SDL_SetTextureAlphaMod( texture, alpha );
|
||||
}
|
||||
} // namespace SDLPP
|
||||
|
||||
Reference in New Issue
Block a user