diff --git a/scene_opengl.cpp b/scene_opengl.cpp index 7cf0b186e4..5d9137a242 100644 --- a/scene_opengl.cpp +++ b/scene_opengl.cpp @@ -610,6 +610,7 @@ void SceneOpenGL::windowGeometryShapeChanged( Toplevel* c ) Window& w = windows[ c ]; w.discardShape(); w.discardTexture(); + w.discardVertices(); } void SceneOpenGL::windowOpacityChanged( Toplevel* ) @@ -645,6 +646,7 @@ SceneOpenGL::Window::Window( Toplevel* c ) void SceneOpenGL::Window::free() { discardTexture(); + discardVertices(); } void SceneOpenGL::Window::requestVertexGrid(int maxquadsize) @@ -985,6 +987,13 @@ void SceneOpenGL::Window::discardTexture() texture = 0; } +void SceneOpenGL::Window::discardVertices() +{ + // Causes list of vertices to be recreated before next rendering pass + currentXResolution = -1; + currentYResolution = -1; +} + // paint the window void SceneOpenGL::Window::performPaint( int mask, QRegion region, WindowPaintData data ) { diff --git a/scene_opengl.h b/scene_opengl.h index 8fa73106c2..63a0757079 100644 --- a/scene_opengl.h +++ b/scene_opengl.h @@ -81,6 +81,7 @@ class SceneOpenGL::Window void enableTexture(); void disableTexture(); void discardTexture(); + void discardVertices(); Window() {} // QMap sucks even in Qt4 /**