Game Development Reference
In-Depth Information
Apart from that, shapes can have colors and outlines, which can be modified with
Shape::setFillColor() , Shape::setOutlineColor() and
Shape::setOutlineThickness() . This last one sets the number of pixels for the
To render the preceding shapes, we can use the RenderWindow::draw() function.
Here is how we can implement it into our render frame:
Running the code produces the following result:
We can immediately note that the render order makes a big difference. Background ob-
jects have to be rendered first, followed by anything in the foreground. In this example,
Search WWH ::

Custom Search