context reinit support

This commit is contained in:
2022-10-13 08:57:27 +03:00
parent 3b0d1ea0e2
commit ce3df7d051
24 changed files with 136 additions and 24 deletions

View File

@@ -55,6 +55,15 @@ void VertexObject::destroy(QOpenGLExtraFunctions * f) {
}
void VertexObject::reinit() {
vao_ = 0;
buffer_obj.reinit();
buffer_sel.reinit();
buffers_binded = false;
objects_changed = selected_changed = true;
}
void VertexObject::bind(QOpenGLExtraFunctions * f) {
//qDebug() << "bind" << target_ << buffer_;
f->glBindVertexArray(vao_);