diff -r 37d3c819cafa -r 2837b549e616 src/gl/basicshaderprogram.cpp --- a/src/gl/basicshaderprogram.cpp Wed Jun 22 16:13:15 2022 +0300 +++ b/src/gl/basicshaderprogram.cpp Wed Jun 22 16:53:35 2022 +0300 @@ -52,8 +52,9 @@ this->vertexArrayObject.bind(); for (std::size_t i = 0; i < attributeSpecs.size(); ++i) { const auto& spec = attributeSpecs[i]; - this->program->enableAttributeArray(i); - this->program->setAttributeBuffer(i, spec.type, spec.offset, spec.tuplesize, spec.stride); + const int attr = narrow(signed_cast(i)); + this->program->enableAttributeArray(attr); + this->program->setAttributeBuffer(attr, spec.type, spec.offset, spec.tuplesize, spec.stride); } this->vertexArrayObject.release(); this->buffer.release(); @@ -88,9 +89,9 @@ void BasicShader::bufferData(const void* data, std::size_t count, std::size_t size) { this->buffer.bind(); - this->buffer.allocate(data, count * size); + this->buffer.allocate(data, narrow(signed_cast(count * size))); this->buffer.release(); - this->vertexCount = count; + this->vertexCount = narrow(signed_cast(count)); } void BasicShader::draw(GLenum drawMode)