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

@@ -48,6 +48,12 @@ void Buffer::destroy(QOpenGLExtraFunctions * f) {
}
void Buffer::reinit() {
buffer_ = 0;
prev_size = 0;
}
void Buffer::bind(QOpenGLExtraFunctions * f) {
//qDebug() << "bind" << target_ << buffer_;
f->glBindBuffer(target_, buffer_);