このページでは

QQuickOpenGLUtils Namespace

QQuickOpenGLUtils ネームスペースには、OpenGL バックエンドと併用する場合の `Qt Quick ` 用のユーティリティが含まれています。詳細...

ヘッダー: #include <QQuickOpenGLUtils>
CMake: find_package(Qt6 REQUIRED COMPONENTS Quick)
target_link_libraries(mytarget PRIVATE Qt6::Quick)
qmake: QT += quick
以下のように: Qt 6.0

機能

(since 6.0) void resetOpenGLState()

詳細な説明

関数のドキュメント

[since 6.0] void QQuickOpenGLUtils::resetOpenGLState()

この関数を呼び出すと、現在の OpenGL コンテキストがデフォルトの状態にリセットされます。

シーングラフは OpenGL コンテキストを使用しており、その状態に依存する一方で、その状態を上書きすることもあります。生の OpenGL コマンドとシーングラフによるレンダリングを併用する場合、この関数を使用することで、OpenGL コンテキストの状態をデフォルト値にリセットする便利な方法となります。

この関数は、固定機能パイプラインの状態には影響を与えません。

警告: この関数は 、OpenGL シーングラフの一部として内部的に変更される可能性のある項目に関してのみ、OpenGL コンテキストをリセットします。 アプリケーションコード内で実行された直接的な OpenGL 呼び出しなど、外部で変更されたものは、それらが内部で使用されていない限り(たとえば、OpenGL 3.x や 4.x 固有のさまざまな状態など)、リセットされません。

この関数は Qt 6.0 で導入されました。

© 2026 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.