aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickwindow.h
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2020-06-11 15:32:53 +0200
committerLaszlo Agocs <laszlo.agocs@qt.io>2020-06-12 12:38:39 +0200
commit9943181dcc9e2b0de630669219edcaf62956c1f1 (patch)
treee9535243cbaf755cac734a9880e6aa3c9bee17ca /src/quick/items/qquickwindow.h
parent69c7ed97c2dde8b45cc29d08eb4568dc08fcd00a (diff)
Move resetOpenGLState() to QQuickFbo
QQuickWindow should not have OpenGL specifics in its API in Qt 6. However, resetOpenGLState() is used by applications commonly in combination with QQuickFramebufferObject (not the least because the documentation recommends it!). This is no problem in practice because QQuickFramebufferObject remains an OpenGL-only feature. So to minimize the breaks, move the function into QQuickFramebufferObject::Renderer so any application that calls the function can continue to do so by just calling it on 'this' instead. The rendercontrol_opengl example used to call this function as well, but unnecessarily, it will still function the same way without it. Note that there is a chance that there are applications that call resetOpenGLState() in other contexts, for example in slots connected to before or afterRendering(). For these it will need to be determined if the call is necessary at all, and if it is, should be replaced by (re)setting the appropriate OpenGL state manually instead. Task-number: QTBUG-84523 Change-Id: I335599f77e8a84e347a44427eb1a1bf917796ee8 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
Diffstat (limited to 'src/quick/items/qquickwindow.h')
-rw-r--r--src/quick/items/qquickwindow.h3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/quick/items/qquickwindow.h b/src/quick/items/qquickwindow.h
index acd289ff4a..1b87d01f96 100644
--- a/src/quick/items/qquickwindow.h
+++ b/src/quick/items/qquickwindow.h
@@ -134,9 +134,6 @@ public:
void setRenderTarget(const QQuickRenderTarget &target);
-#if QT_CONFIG(opengl)
- void resetOpenGLState(); // ### Qt 6 remove
-#endif
struct GraphicsStateInfo {
int currentFrameSlot;
int framesInFlight;