#ifndef MBGL_GEOMETRY_TRIANGLE_ELEMENTS_BUFFER #define MBGL_GEOMETRY_TRIANGLE_ELEMENTS_BUFFER #include #include #include #include namespace mbgl { template struct ElementGroup : public util::noncopyable { std::array array; uint32_t vertex_length; uint32_t elements_length; ElementGroup() : vertex_length(0), elements_length(0) {} ElementGroup(uint32_t vertex_length_, uint32_t elements_length_) : vertex_length(vertex_length_), elements_length(elements_length_) { } }; class TriangleElementsBuffer : public Buffer< 6, // bytes per triangle (3 * unsigned short == 6 bytes) GL_ELEMENT_ARRAY_BUFFER > { public: typedef uint16_t element_type; void add(element_type a, element_type b, element_type c); }; class LineElementsBuffer : public Buffer< 4, // bytes per triangle (2 * unsigned short == 6 bytes) GL_ELEMENT_ARRAY_BUFFER > { public: typedef uint16_t element_type; void add(element_type a, element_type b); }; } #endif