forked from organicmaps/organicmaps
[drape] remove unbind method. Buffer bounded to target as long as other buffer bind
This commit is contained in:
parent
5241dd130e
commit
b1e7a00e75
2 changed files with 0 additions and 9 deletions
|
@ -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)));
|
||||
}
|
||||
|
|
|
@ -21,7 +21,6 @@ public:
|
|||
uint16_t GetAvailableSize() const;
|
||||
|
||||
void Bind();
|
||||
void Unbind();
|
||||
|
||||
private:
|
||||
Target m_t;
|
||||
|
|
Loading…
Add table
Reference in a new issue