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
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
#include <llmr/geometry/fill_buffer.hpp>
|
||||
#include <llmr/platform/gl.hpp>
|
||||
|
||||
#include <climits>
|
||||
|
||||
using namespace llmr;
|
||||
|
||||
FillBuffer::FillBuffer()
|
||||
@@ -32,16 +34,16 @@ uint32_t FillBuffer::elements_length() const {
|
||||
}
|
||||
|
||||
void FillBuffer::addDegenerate() {
|
||||
vertices.push_back(32767);
|
||||
vertices.push_back(std::numeric_limits<vertex_type>::max());
|
||||
vertices.push_back(0);
|
||||
}
|
||||
|
||||
void FillBuffer::addCoordinate(int16_t x, int16_t y) {
|
||||
void FillBuffer::addCoordinate(vertex_type x, vertex_type y) {
|
||||
vertices.push_back(x);
|
||||
vertices.push_back(y);
|
||||
}
|
||||
|
||||
void FillBuffer::addElements(uint16_t a, uint16_t b, uint16_t c) {
|
||||
void FillBuffer::addElements(element_type a, element_type b, element_type c) {
|
||||
elements.push_back(a);
|
||||
elements.push_back(b);
|
||||
elements.push_back(c);
|
||||
@@ -60,8 +62,8 @@ void FillBuffer::bind() {
|
||||
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, element_buffer);
|
||||
|
||||
if (dirty) {
|
||||
glBufferData(GL_ARRAY_BUFFER, vertices.size() * sizeof(uint16_t), vertices.data(), GL_STATIC_DRAW);
|
||||
glBufferData(GL_ELEMENT_ARRAY_BUFFER, elements.size() * sizeof(uint16_t), elements.data(), GL_STATIC_DRAW);
|
||||
glBufferData(GL_ARRAY_BUFFER, vertices.size() * sizeof(vertex_type), vertices.data(), GL_STATIC_DRAW);
|
||||
glBufferData(GL_ELEMENT_ARRAY_BUFFER, elements.size() * sizeof(element_type), elements.data(), GL_STATIC_DRAW);
|
||||
dirty = false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user