Remove unsupported primitives

This commit is contained in:
Thomas Edvalson
2016-01-01 03:21:13 -05:00
parent b980934d85
commit 1df8dabc96
2 changed files with 1 additions and 12 deletions
@@ -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)
};
}
+1 -8
View File
@@ -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