The QQuickOpenGLUtils namespace contains utilities for Qt Quick when used with an OpenGL backend. 更多...
头: | #include <QQuickOpenGLUtils> |
CMake: |
find_package(Qt6 REQUIRED COMPONENTS Quick)
target_link_libraries(mytarget PRIVATE Qt6::Quick) |
qmake: | QT += quick |
Since: | Qt 6.0 |
(从 6.0 起)
void
|
resetOpenGLState () |
[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 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).
该函数在 Qt 6.0 引入。