mirror of
https://github.com/encounter/cpp3ds.git
synced 2026-03-30 11:04:22 -07:00
Remove unsupported primitives
This commit is contained in:
@@ -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)
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user