git-svn-id: svn://db.shs.com.ru/libs@422 a8b55f48-bf90-11e4-a774-851b48703e85

This commit is contained in:
2018-09-11 11:32:58 +00:00
parent b6bad7a921
commit f42a8b86c2
4 changed files with 23 additions and 0 deletions

View File

@@ -171,6 +171,7 @@ void QGLView::drawBackground(QPainter * painter, const QRectF & rect) {
painter_ = painter;
painter_->beginNativePainting();
if (is_first_draw) {
//connect(context(), SIGNAL(aboutToBeDestroyed()), this, SLOT(glCleanup()));
resizeGL(viewport()->width(), viewport()->height());
initializeGL();
}
@@ -731,3 +732,13 @@ bool QGLView::setupViewport() {
setViewport(_w);
return true;
}
void QGLView::glCleanup() {
//qDebug() << "cleanup";
/*disconnect(context(), SIGNAL(aboutToBeDestroyed()), this, SLOT(glCleanup()));
is_first_draw = true;
textures_manager = GLTextureManager();
currentQGLView = 0;
currentGLTextureManager = 0;*/
}