summaryrefslogtreecommitdiff
path: root/src/mbgl/gfx/vertex_buffer.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbgl/gfx/vertex_buffer.hpp')
-rw-r--r--src/mbgl/gfx/vertex_buffer.hpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/mbgl/gfx/vertex_buffer.hpp b/src/mbgl/gfx/vertex_buffer.hpp
new file mode 100644
index 0000000000..2ed1e62759
--- /dev/null
+++ b/src/mbgl/gfx/vertex_buffer.hpp
@@ -0,0 +1,25 @@
+#pragma once
+
+#include <memory>
+
+namespace mbgl {
+namespace gfx {
+
+class VertexBufferResource {
+protected:
+ VertexBufferResource() = default;
+public:
+ virtual ~VertexBufferResource() = default;
+};
+
+// This class has a template argument that we use to specify the vertex type. It is not used by
+// the implementation, but serves type checking purposes during build time.
+template <class>
+class VertexBuffer {
+public:
+ std::size_t elements;
+ std::unique_ptr<const VertexBufferResource> resource;
+};
+
+} // namespace gfx
+} // namespace mbgl