Files
MapLibreParticleLab/include/llmr/geometry/vertex_buffer.hpp
artemp d6654ccaed c++
* fix typedef's
* fix virtual dtor's
* make ctor's with one argument explicit
* util::noncopyable utility class  ( class my_object : private noncopyable {} )
* update kTileURL
2014-02-06 10:33:46 +00:00

35 lines
697 B
C++

#ifndef LLMR_GEOMETRY_VERTEX_BUFFER
#define LLMR_GEOMETRY_VERTEX_BUFFER
#include <vector>
#include <cstdint>
#include <cmath>
namespace llmr {
class VertexBuffer {
public:
typedef int16_t vertex_type;
VertexBuffer(std::initializer_list<vertex_type> init);
~VertexBuffer();
/*
* 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 length() const;
/*
* Transfers this buffer to the GPU and binds the buffer to the GL context.
*/
void bind();
private:
const std::vector<vertex_type> array;
uint32_t buffer = 0;
};
}
#endif