OpenGLフラグメントシェーダとバーテックスシェーダの作成
Qt はすべてのプラットフォームで OpenGL 実装との統合をサポートしており、ハードウェアアクセラレーションによる 3D グラフィックスを従来のユーザーインターフェースと一緒に表示することができます。詳しくは Qt GUI.
QOpenGLShader クラスを使用すると、OpenGL シェーディング言語(GLSL)や OpenGL/ES シェーディング言語(GLSL/ES)で記述された OpenGL シェーダーをコンパイルできます。QOpenGLShaderとQOpenGLShaderProgramは、頂点シェーダーとフラグメント・シェーダーのコンパイルとリンクの詳細からあなたを守ります。
OpenGLシェーダーを作成するには
- File >New File >GLSL を選択します。

- 作成するシェーダーのタイプを選択し、Choose を選択します。
- ウィザードの指示に従ってシェーダーファイルを作成します。
- コードエディタでシェーダファイルを開き、GLSL または GLSL/ES でシェーダコードを記述します。コードエディタは、ファイルのシンタックスハイライトとコード補完を提供します。
ファイルの作成と プロジェクト・ウィザードの使用も参照してください 。
Copyright © The Qt Company Ltd. and other contributors. 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.