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 Texture2DArray::destroy(QOpenGLExtraFunctions * f) {
}
void Texture2DArray::reinit() {
texture_ = 0;
layers_ = 0;
}
void Texture2DArray::bind(QOpenGLExtraFunctions * f, int channel) {
f->glActiveTexture(GL_TEXTURE0 + channel);
f->glBindTexture(target_, texture_);