diff options
Diffstat (limited to 'include/llmr/geometry')
-rw-r--r-- | include/llmr/geometry/point_buffer.hpp | 19 | ||||
-rw-r--r-- | include/llmr/geometry/vertex_buffer.hpp | 3 |
2 files changed, 21 insertions, 1 deletions
diff --git a/include/llmr/geometry/point_buffer.hpp b/include/llmr/geometry/point_buffer.hpp new file mode 100644 index 0000000000..8c01a20ee2 --- /dev/null +++ b/include/llmr/geometry/point_buffer.hpp @@ -0,0 +1,19 @@ +#ifndef LLMR_GEOMETRY_POINT_BUFFER +#define LLMR_GEOMETRY_POINT_BUFFER + +#include "buffer.hpp" + +namespace llmr { + + class PointVertexBuffer : public Buffer< + 4 // 2 coordinates per vertex (== 4 bytes) + > { + public: + typedef int16_t vertex_type; + + void add(vertex_type x, vertex_type y); + }; + +} + +#endif diff --git a/include/llmr/geometry/vertex_buffer.hpp b/include/llmr/geometry/vertex_buffer.hpp index 9d053693c9..9478d7b15f 100644 --- a/include/llmr/geometry/vertex_buffer.hpp +++ b/include/llmr/geometry/vertex_buffer.hpp @@ -2,6 +2,7 @@ #define LLMR_GEOMETRY_VERTEX_BUFFER #include <vector> +#include <cstddef> #include <cstdint> #include <cmath> @@ -17,7 +18,7 @@ public: * Returns the number of elements in this buffer. This is not the number of * bytes, but rather the number of coordinates with associated information. */ - uint32_t index() const; + size_t index() const; /* * Transfers this buffer to the GPU and binds the buffer to the GL context. |