![]() |
Qt 6.x
The Qt SDK
|
\inmodule QtQuick More...
Functions | |
Q_QUICK_EXPORT void | resetOpenGLState () |
Call this function to reset the current OpenGL context its default state. | |
\inmodule QtQuick
The QQuickOpenGLUtils namespace contains utilities for Qt Quick when used with an OpenGL backend.
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.
Definition at line 41 of file qquickopenglutils.cpp.
References QOpenGLFramebufferObject::bindDefault(), QOpenGLContext::currentContext(), QOpenGLFunctions::FixedFunctionPipeline, GL_ARRAY_BUFFER, GL_ELEMENT_ARRAY_BUFFER, GL_FLOAT, GL_MAX_VERTEX_ATTRIBS, GL_TEXTURE0, QOpenGLFunctions::glActiveTexture(), QOpenGLFunctions::glBindBuffer(), QOpenGLFunctions::glBindTexture(), QOpenGLVertexArrayObjectHelper::glBindVertexArray(), QOpenGLFunctions::glBlendFunc(), QOpenGLFunctions::glClearColor(), QOpenGLFunctions::glClearDepthf(), QOpenGLFunctions::glColorMask(), QOpenGLFunctions::glDepthFunc(), QOpenGLFunctions::glDepthMask(), QOpenGLFunctions::glDisable(), QOpenGLFunctions::glDisableVertexAttribArray(), QOpenGLFunctions::glGetIntegerv(), QOpenGLFunctions::glStencilFunc(), QOpenGLFunctions::glStencilMask(), QOpenGLFunctions::glStencilOp(), QOpenGLFunctions::glUseProgram(), QOpenGLFunctions::glVertexAttribPointer(), i, QOpenGLVertexArrayObjectHelper::isValid(), QOpenGLFunctions::openGLFeatures(), and QOpenGLVertexArrayObjectHelper::vertexArrayObjectHelperForContext().
Referenced by QSGFramebufferObjectNode::render().