#pragma once
//------------------------------------------------------------------------------
/**
    @class Oryol::Render::PrimitiveType
    @brief primitive type enum (triangle strips, lists, etc...)
*/
#include "Core/Types.h"

namespace Oryol {
namespace Render {
    
class PrimitiveType {
public:
    /// primitive type enum (don't change order, append to end!)
    enum Code {
        Points = 0,             ///< point list
        LineStrip,              ///< line strip
        LineLoop,               ///< closed line loop
        Lines,                  ///< line list
        TriangleStrip,          ///< triangle strip
        TriangleFan,            ///< triangle fan
        Triangles,              ///< triangle list
        
        NumPrimitiveTypes,      ///< number of primitive types
        InvalidPrimitiveType,   ///< invalid primitive type value
    };
    
    /// convert to string
    static const char* ToString(Code c);
    /// convert from string
    static Code FromString(const char* str);
};
    
} // namespace Render
} // namespace Oryol
#pragma once
//------------------------------------------------------------------------------
/**
    @class Oryol::Render::PrimitiveType
    @brief primitive type enum (triangle strips, lists, etc...)
*/
#include "Core/Types.h"

namespace Oryol {
namespace Render {
    
class PrimitiveType {
public:
    /// primitive type enum
    enum Code {
        Points,                 ///< point list
        LineStrip,              ///< line strip
        LineLoop,               ///< closed line loop
        Lines,                  ///< line list
        TriangleStrip,          ///< triangle strip
        TriangleFan,            ///< triangle fan
        Triangles,              ///< triangle list
        
        NumPrimitiveTypes,      ///< number of primitive types
        InvalidPrimitiveType,   ///< invalid primitive type value
    };
    
    /// convert to string
    static const char* ToString(Code c);
    /// convert from string
    static Code FromString(const char* str);
};
    
} // namespace Render
} // namespace Oryol
--- 
+++ 
@@ -11,9 +11,9 @@
     
 class PrimitiveType {
 public:
-    /// primitive type enum
+    /// primitive type enum (don't change order, append to end!)
     enum Code {
-        Points,                 ///< point list
+        Points = 0,             ///< point list
         LineStrip,              ///< line strip
         LineLoop,               ///< closed line loop
         Lines,                  ///< line list
Make sure primitive type enum starts at 0
