Skip to content

Commit

Permalink
fix #5418
Browse files Browse the repository at this point in the history
  • Loading branch information
rtri committed Dec 16, 2016
1 parent 6f02e27 commit 8627c46
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rts/Rendering/GL/VBO.cpp
Expand Up @@ -205,8 +205,9 @@ void VBO::Resize(GLsizeiptr _size, GLenum usage)
void VBO::New(GLsizeiptr _size, GLenum usage, const void* data_)
{
assert(bound);
assert(!mapped);
assert(!mapped || (data_ == nullptr && _size == size && usage == this->usage));

// no-op new, allows e.g. repeated Bind+New with persistent buffers
if (data_ == nullptr && _size == size && usage == this->usage)
return;

Expand Down

0 comments on commit 8627c46

Please sign in to comment.