From 1df8dabc96f7dce7e8bac96fd5253aa92ef36a9b Mon Sep 17 00:00:00 2001 From: Thomas Edvalson Date: Fri, 1 Jan 2016 03:21:13 -0500 Subject: [PATCH] Remove unsupported primitives --- include/cpp3ds/Graphics/PrimitiveType.hpp | 4 ---- src/cpp3ds/Graphics/RenderTarget.cpp | 9 +-------- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/include/cpp3ds/Graphics/PrimitiveType.hpp b/include/cpp3ds/Graphics/PrimitiveType.hpp index 7daacc7..62c812a 100644 --- a/include/cpp3ds/Graphics/PrimitiveType.hpp +++ b/include/cpp3ds/Graphics/PrimitiveType.hpp @@ -38,13 +38,9 @@ namespace cpp3ds //////////////////////////////////////////////////////////// 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) }; } diff --git a/src/cpp3ds/Graphics/RenderTarget.cpp b/src/cpp3ds/Graphics/RenderTarget.cpp index e0f83d4..45a3b37 100644 --- a/src/cpp3ds/Graphics/RenderTarget.cpp +++ b/src/cpp3ds/Graphics/RenderTarget.cpp @@ -213,12 +213,6 @@ void RenderTarget::draw(const Vertex* vertices, unsigned int vertexCount, #endif // GL_QUADS is unavailable on OpenGL ES - if (type == Quads) - { - err() << "cpp3ds::Quads primitive type is not supported on OpenGL ES platforms, drawing skipped" << std::endl; - return; - } - #define GL_QUADS 0 if (activate(true)) { @@ -303,8 +297,7 @@ void RenderTarget::draw(const Vertex* vertices, unsigned int vertexCount, } // Find the OpenGL primitive type - static const GLenum modes[] = {GL_POINTS, GL_LINES, GL_LINE_STRIP, GL_TRIANGLES, - GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, GL_QUADS}; + static const GLenum modes[] = {GL_TRIANGLES, GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN}; GLenum mode = modes[type]; // Draw the primitives