[gl] Use Buffer::getID() whenever possible

This commit is contained in:
Bruno de Oliveira Abinader
2016-02-14 15:07:16 +02:00
parent 0386dc7a4e
commit 47d6099242

View File

@@ -42,10 +42,10 @@ public:
// Transfers this buffer to the GPU and binds the buffer to the GL context.
void bind() {
if (buffer) {
MBGL_CHECK_ERROR(glBindBuffer(bufferType, buffer));
MBGL_CHECK_ERROR(glBindBuffer(bufferType, getID()));
} else {
MBGL_CHECK_ERROR(glGenBuffers(1, &buffer));
MBGL_CHECK_ERROR(glBindBuffer(bufferType, buffer));
MBGL_CHECK_ERROR(glBindBuffer(bufferType, getID()));
if (array == nullptr) {
Log::Debug(Event::OpenGL, "Buffer doesn't contain elements");
pos = 0;