The QQuickOpenGLUtils namespace contains utilities for Qt Quick when used with an OpenGL backend. More...
|CMake:|| find_package(Qt6 COMPONENTS Quick REQUIRED) |
target_link_libraries(mytarget PRIVATE Qt6::Quick)
|qmake:||QT += quick|
[since 6.0] void QQuickOpenGLUtils::resetOpenGLState()
Call this function to reset the current OpenGL context its default state.
The scene graph uses the OpenGL context and will both rely on and clobber its state. When mixing raw OpenGL commands with scene graph rendering, this function provides a convenient way of resetting the OpenGL context state back to its default values.
This function does not touch state in the fixed-function pipeline.
Warning: This function will only reset the OpenGL context in relation to what may be changed internally as part of the OpenGL scene graph. It does not reset anything that has been changed externally such as direct OpenGL calls done inside the application code if those same calls are not used internally (for example, various OpenGL 3.x or 4.x specific state).
This function was introduced in Qt 6.0.
© 2023 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.