summaryrefslogtreecommitdiff
path: root/src/mbgl/gfx
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2019-03-05 18:36:41 +0100
committerKonstantin Käfer <mail@kkaefer.com>2019-03-06 16:12:51 +0100
commit3a57aa65d75af0d71bda9c1bde8fe8118ce7c7d1 (patch)
tree5e5e149094a45a1b3b0457b2f698661c66741428 /src/mbgl/gfx
parent4737a45383911fcddf93f0a33e7e25246a5da07e (diff)
downloadqtlocation-mapboxgl-3a57aa65d75af0d71bda9c1bde8fe8118ce7c7d1.tar.gz
[core] move VertexBuffer<> to gfx namespace
Diffstat (limited to 'src/mbgl/gfx')
-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