Disabled an optimization in sf::Shape that could break rendering
This commit is contained in:
parent
da64dbe89f
commit
57f81d4051
@ -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
|
||||||
|
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user