Disabled an optimization in sf::Shape that could break rendering

This commit is contained in:
Laurent Gomila 2012-09-21 22:06:27 +02:00
parent da64dbe89f
commit 57f81d4051
2 changed files with 3 additions and 7 deletions

View File

@ -107,7 +107,6 @@ public :
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Set the outline color of the shape /// \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. /// By default, the shape's outline color is opaque white.
/// ///
/// \param color New outline color of the shape /// \param color New outline color of the shape

View File

@ -206,14 +206,11 @@ void Shape::draw(RenderTarget& target, RenderStates states) const
states.transform *= getTransform(); states.transform *= getTransform();
// Render the inside // Render the inside
if (m_fillColor.a > 0)
{
states.texture = m_texture; states.texture = m_texture;
target.draw(m_vertices, states); target.draw(m_vertices, states);
}
// Render the outline // Render the outline
if ((m_outlineColor.a > 0) && (m_outlineThickness != 0)) if (m_outlineThickness != 0)
{ {
states.texture = NULL; states.texture = NULL;
target.draw(m_outlineVertices, states); target.draw(m_outlineVertices, states);