MCPcopy Create free account
hub / github.com/SFML/SFML / drawPrimitives

Method drawPrimitives

src/SFML/Graphics/RenderTarget.cpp:890–899  ·  view source on GitHub ↗

///////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

888
889////////////////////////////////////////////////////////////
890void RenderTarget::drawPrimitives(PrimitiveType type, std::size_t firstVertex, std::size_t vertexCount)
891{
892 // Find the OpenGL primitive type
893 static constexpr priv::EnumArray<PrimitiveType, GLenum, 6> modes =
894 {GL_POINTS, GL_LINES, GL_LINE_STRIP, GL_TRIANGLES, GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN};
895 const GLenum mode = modes[type];
896
897 // Draw the primitives
898 glCheck(glDrawArrays(mode, static_cast<GLint>(firstVertex), static_cast<GLsizei>(vertexCount)));
899}
900
901
902////////////////////////////////////////////////////////////

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected