From 57f81d40518def673690f26c439bfd3ff1329a93 Mon Sep 17 00:00:00 2001 From: Laurent Gomila Date: Fri, 21 Sep 2012 22:06:27 +0200 Subject: [PATCH] Disabled an optimization in sf::Shape that could break rendering --- include/SFML/Graphics/Shape.hpp | 1 - src/SFML/Graphics/Shape.cpp | 9 +++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/include/SFML/Graphics/Shape.hpp b/include/SFML/Graphics/Shape.hpp index f0c9cbc4..094cabca 100644 --- a/include/SFML/Graphics/Shape.hpp +++ b/include/SFML/Graphics/Shape.hpp @@ -107,7 +107,6 @@ public : //////////////////////////////////////////////////////////// /// \brief Set the outline color of the shape /// - /// You can use sf::Color::Transparent to disable the outline. /// By default, the shape's outline color is opaque white. /// /// \param color New outline color of the shape diff --git a/src/SFML/Graphics/Shape.cpp b/src/SFML/Graphics/Shape.cpp index cf18ebb9..8f674da0 100644 --- a/src/SFML/Graphics/Shape.cpp +++ b/src/SFML/Graphics/Shape.cpp @@ -206,14 +206,11 @@ void Shape::draw(RenderTarget& target, RenderStates states) const states.transform *= getTransform(); // Render the inside - if (m_fillColor.a > 0) - { - states.texture = m_texture; - target.draw(m_vertices, states); - } + states.texture = m_texture; + target.draw(m_vertices, states); // Render the outline - if ((m_outlineColor.a > 0) && (m_outlineThickness != 0)) + if (m_outlineThickness != 0) { states.texture = NULL; target.draw(m_outlineVertices, states);