Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed primitive types to be grammatically correct. #1095

Merged
merged 1 commit into from
Jun 11, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 12 additions & 7 deletions include/SFML/Graphics/PrimitiveType.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,18 @@ namespace sf
////////////////////////////////////////////////////////////
enum PrimitiveType
{
Points, ///< List of individual points
Lines, ///< List of individual lines
LinesStrip, ///< List of connected lines, a point uses the previous point to form a line
Triangles, ///< List of individual triangles
TrianglesStrip, ///< 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
Quads ///< List of individual quads (deprecated, don't work with OpenGL ES)
Points, ///< List of individual points
Lines, ///< List of individual lines
LineStrip, ///< List of connected lines, a point uses the previous point to form a line
Triangles, ///< List of individual triangles
TriangleStrip, ///< List of connected triangles, a point uses the two previous points 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)

// Deprecated names
LinesStrip = LineStrip, /// \deprecated Use LineStrip instead
TrianglesStrip = TriangleStrip, /// \deprecated Use TriangleStrip instead
TrianglesFan = TriangleFan /// \deprecated Use TriangleFan instead
};

} // namespace sf
Expand Down
2 changes: 1 addition & 1 deletion include/SFML/Graphics/VertexArray.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ class SFML_GRAPHICS_API VertexArray : public Drawable
///
/// Example:
/// \code
/// sf::VertexArray lines(sf::LinesStrip, 4);
/// sf::VertexArray lines(sf::LineStrip, 4);
/// lines[0].position = sf::Vector2f(10, 0);
/// lines[1].position = sf::Vector2f(20, 0);
/// lines[2].position = sf::Vector2f(30, 5);
Expand Down
4 changes: 2 additions & 2 deletions src/SFML/Graphics/Shape.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,8 @@ m_textureRect (),
m_fillColor (255, 255, 255),
m_outlineColor (255, 255, 255),
m_outlineThickness(0),
m_vertices (TrianglesFan),
m_outlineVertices (TrianglesStrip),
m_vertices (TriangleFan),
m_outlineVertices (TriangleStrip),
m_insideBounds (),
m_bounds ()
{
Expand Down
2 changes: 1 addition & 1 deletion src/SFML/Graphics/Sprite.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ void Sprite::draw(RenderTarget& target, RenderStates states) const
{
states.transform *= getTransform();
states.texture = m_texture;
target.draw(m_vertices, 4, TrianglesStrip, states);
target.draw(m_vertices, 4, TriangleStrip, states);
}
}

Expand Down