diff --git a/drape/glbuffer.cpp b/drape/glbuffer.cpp index 49f635c342..ad8eb2575f 100644 --- a/drape/glbuffer.cpp +++ b/drape/glbuffer.cpp @@ -20,12 +20,10 @@ GLBuffer::GLBuffer(Target t, uint8_t elementSize, uint16_t capacity) m_bufferID = GLFunctions::glGenBuffer(); Bind(); GLFunctions::glBufferData(glTarget(m_t), m_capacity * m_elementSize, NULL, GLConst::GLStaticDraw); - Unbind(); } GLBuffer::~GLBuffer() { - Unbind(); GLFunctions::glDeleteBuffer(m_bufferID); } @@ -35,7 +33,6 @@ void GLBuffer::UploadData(const void * data, uint16_t elementCount) Bind(); GLFunctions::glBufferSubData(glTarget(m_t), elementCount * m_elementSize, data, m_size * m_elementSize); m_size += elementCount; - Unbind(); } uint16_t GLBuffer::GetCapacity() const @@ -57,8 +54,3 @@ void GLBuffer::Bind() { GLFunctions::glBindBuffer(m_bufferID, glTarget((m_t))); } - -void GLBuffer::Unbind() -{ - GLFunctions::glBindBuffer(0, glTarget((m_t))); -} diff --git a/drape/glbuffer.hpp b/drape/glbuffer.hpp index d51108ea26..1a2d2159d6 100644 --- a/drape/glbuffer.hpp +++ b/drape/glbuffer.hpp @@ -21,7 +21,6 @@ public: uint16_t GetAvailableSize() const; void Bind(); - void Unbind(); private: Target m_t;