mirror of
https://github.com/libSDL2pp/libSDL2pp.git
synced 2025-08-03 19:05:59 -04:00
Add method to set color component multipliers
This commit is contained in:
parent
7698a2522e
commit
96576e112d
@ -56,6 +56,11 @@ void Texture::SetAlphaMod(Uint8 alpha) {
|
||||
throw Exception("SDL_SetTextureAlphaMod failed");
|
||||
}
|
||||
|
||||
void Texture::SetColorMod(Uint8 r, Uint8 g, Uint8 b) {
|
||||
if (SDL_SetTextureColorMod(texture_, r, g, b) != 0)
|
||||
throw Exception("SDL_SetTextureColorMod failed");
|
||||
}
|
||||
|
||||
void Texture::Swap(Texture& other) noexcept {
|
||||
SDL_Texture* tmp = other.texture_;
|
||||
other.texture_ = texture_;
|
||||
|
@ -51,6 +51,7 @@ public:
|
||||
|
||||
void SetBlendMode(SDL_BlendMode blendMode);
|
||||
void SetAlphaMod(Uint8 alpha);
|
||||
void SetColorMod(Uint8 r, Uint8 g, Uint8 b);
|
||||
|
||||
void Swap(Texture& other) noexcept;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user