Welcome,
Guest
. Please
login
or
register
. Did you miss your
activation email?
French forum
Home
Help
Search
Login
Register
SFML community forums
»
Help
»
Graphics
»
Question on setColor
Print
Pages: [
1
]
Author
Topic: Question on setColor (Read 1603 times)
0 Members and 1 Guest are viewing this topic.
dk123
Newbie
Posts: 49
Question on setColor
«
on:
October 01, 2015, 02:42:15 am »
Hi, it currently seems that setColor on a sprite works so that the colour argument is multiplied against the original colour of the sprite texture.
Would it somehow be possible to make this additive instead?
(In which case setColour would need to take in rgb arguments of the range -255~255 to cover all colours possible)
Logged
DarkRoku12
Full Member
Posts: 203
Lua coder.
Re: Question on setColor
«
Reply #1 on:
October 01, 2015, 05:46:29 am »
Is because you tint the image instead of changing the color.
There is no way, yet, but i believe if you use external libraries for modify the texture, or use shaders you can get a sort of that you want.
Logged
I would like a spanish/latin community...
Problems building for Android? Look here
Laurent
Administrator
Hero Member
Posts: 32498
Re: Question on setColor
«
Reply #2 on:
October 01, 2015, 07:44:13 am »
You can simply draw a sf::RectangleShape with the desired color and one of the several blend modes available (add / subtract in your case) on top of your sprite.
Logged
Laurent Gomila - SFML developer
Print
Pages: [
1
]
SFML community forums
»
Help
»
Graphics
»
Question on setColor
anything