Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

  • Loading branch information...
commit 57f81d40518def673690f26c439bfd3ff1329a93 1 parent da64dbe
@LaurentGomila LaurentGomila authored
Showing with 3 additions and 7 deletions.
  1. +0 −1  include/SFML/Graphics/Shape.hpp
  2. +3 −6 src/SFML/Graphics/Shape.cpp
View
1  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
View
9 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);
Please sign in to comment.
Something went wrong with that request. Please try again.