SFML community forums
Help => Graphics => Topic started by: massive_potato on August 12, 2012, 09:36:19 pm
-
I have created a polygon class and am trying to render it. I created a vertex array containing each point of the polygon and am able to draw the shape to a window, but have no way of changing the color of the polygon's outline (it draws white lines). Is there some way of doing this without resorting to sf::Shape (the polygons can be both concave and convex, preventing me from using the sf::Shape class)?
-
Each vertex is defined through a position, a color and a texture coordinate, so if you want you outline to be red, you'll just have to change the color of the vertex. Then again I don't know how you construct your polygon.
Note if you just want to have a ConcaveShape I can point you to Thor (http://www.bromeon.ch/libraries/thor/v2.0/doc/classthor_1_1_concave_shape.html), which has such a class implemented.
-
Thanks for the response!