SFML community forums

Help => Graphics => Topic started by: Roose Bolton of the Dreadfort on December 12, 2012, 04:04:02 pm

Title: Quads with Transitions
Post by: Roose Bolton of the Dreadfort on December 12, 2012, 04:04:02 pm
Hey All,

so been playing with what im going to do with the background for my space game and I think I am going to use a simple QUAD with each corner set to a different colour to get a nice transitional background.

Now is it possible to get a QUAD strip to do this too?

so I have 4 quads in a big square like

QUAD QUAD
QUAD QUAD

if I set each vert to a diff colour will they all blend together?
Title: Re: Quads with Transitions
Post by: masskiller on December 12, 2012, 04:25:06 pm
Quote
if I set each vert to a diff colour will they all blend together?

Depends on how you do it, if you have a texture or not and what colors you use. Note that sf::Vertex is a wrapper for openGL vertexes (sf::Sprite is kind of one as well, just that sf::Vertex actually grants you freedom of truly using vertexes as such) so if you set all the colors of a self-made quad different they will blend. Now, since what you want is to do this with four quads I don't really know, you can get the desired effect, but it depends on what parameters you use for them.