--- a/src/gl/basicshaderprogram.cpp Tue Jul 27 13:23:34 2021 +0300 +++ b/src/gl/basicshaderprogram.cpp Tue Jul 27 16:29:00 2021 +0300 @@ -37,8 +37,12 @@ this->program->bind(); this->buffer.create(); this->buffer.bind(); - this->buffer.setUsagePattern(QOpenGLBuffer::StaticDraw); - this->buffer.allocate(this->vertexData(), this->vertexCount() * this->vertexSize()); + const QOpenGLBuffer::UsagePattern pattern = this->usagePattern(); + this->buffer.setUsagePattern(pattern); + if (pattern == QOpenGLBuffer::StaticDraw) + { + this->buffer.allocate(this->vertexData(), this->vertexCount() * this->vertexSize()); + } this->vertexArrayObject.create(); this->vertexArrayObject.bind(); this->setupVertexArrays();