mirror of
https://github.com/SFML/SFML.git
synced 2024-11-28 22:31:09 +08:00
Changed primitive types to be grammatically correct.
This commit is contained in:
parent
fb40e7e43f
commit
afb8254b6d
@ -40,11 +40,16 @@ enum PrimitiveType
|
|||||||
{
|
{
|
||||||
Points, ///< List of individual points
|
Points, ///< List of individual points
|
||||||
Lines, ///< List of individual lines
|
Lines, ///< List of individual lines
|
||||||
LinesStrip, ///< List of connected lines, a point uses the previous point to form a line
|
LineStrip, ///< List of connected lines, a point uses the previous point to form a line
|
||||||
Triangles, ///< List of individual triangles
|
Triangles, ///< List of individual triangles
|
||||||
TrianglesStrip, ///< List of connected triangles, a point uses the two previous points to form a triangle
|
TriangleStrip, ///< List of connected triangles, a point uses the two previous points to form a triangle
|
||||||
TrianglesFan, ///< List of connected triangles, a point uses the common center and the previous point to form a triangle
|
TriangleFan, ///< List of connected triangles, a point uses the common center and the previous point to form a triangle
|
||||||
Quads ///< List of individual quads (deprecated, don't work with OpenGL ES)
|
Quads, ///< List of individual quads (deprecated, don't work with OpenGL ES)
|
||||||
|
|
||||||
|
// Deprecated names
|
||||||
|
LinesStrip = LineStrip, /// \deprecated Use LineStrip instead
|
||||||
|
TrianglesStrip = TriangleStrip, /// \deprecated Use TriangleStrip instead
|
||||||
|
TrianglesFan = TriangleFan /// \deprecated Use TriangleFan instead
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace sf
|
} // namespace sf
|
||||||
|
@ -209,7 +209,7 @@ private:
|
|||||||
///
|
///
|
||||||
/// Example:
|
/// Example:
|
||||||
/// \code
|
/// \code
|
||||||
/// sf::VertexArray lines(sf::LinesStrip, 4);
|
/// sf::VertexArray lines(sf::LineStrip, 4);
|
||||||
/// lines[0].position = sf::Vector2f(10, 0);
|
/// lines[0].position = sf::Vector2f(10, 0);
|
||||||
/// lines[1].position = sf::Vector2f(20, 0);
|
/// lines[1].position = sf::Vector2f(20, 0);
|
||||||
/// lines[2].position = sf::Vector2f(30, 5);
|
/// lines[2].position = sf::Vector2f(30, 5);
|
||||||
|
@ -163,8 +163,8 @@ m_textureRect (),
|
|||||||
m_fillColor (255, 255, 255),
|
m_fillColor (255, 255, 255),
|
||||||
m_outlineColor (255, 255, 255),
|
m_outlineColor (255, 255, 255),
|
||||||
m_outlineThickness(0),
|
m_outlineThickness(0),
|
||||||
m_vertices (TrianglesFan),
|
m_vertices (TriangleFan),
|
||||||
m_outlineVertices (TrianglesStrip),
|
m_outlineVertices (TriangleStrip),
|
||||||
m_insideBounds (),
|
m_insideBounds (),
|
||||||
m_bounds ()
|
m_bounds ()
|
||||||
{
|
{
|
||||||
|
@ -140,7 +140,7 @@ void Sprite::draw(RenderTarget& target, RenderStates states) const
|
|||||||
{
|
{
|
||||||
states.transform *= getTransform();
|
states.transform *= getTransform();
|
||||||
states.texture = m_texture;
|
states.texture = m_texture;
|
||||||
target.draw(m_vertices, 4, TrianglesStrip, states);
|
target.draw(m_vertices, 4, TriangleStrip, states);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user