QOpenGLShader Class
The QOpenGLShader class allows OpenGL shaders to be compiled. More...
| Header: | #include <QOpenGLShader> |
| qmake: | QT += gui |
| Since: | Qt 5.0 |
| Inherits: | QObject |
This class was introduced in Qt 5.0.
Public Types
| enum | ShaderTypeBit { Vertex, Fragment, Geometry, TessellationControl, TessellationEvaluation, Compute } |
Detailed Description
This class supports shaders written in the OpenGL Shading Language (GLSL) and in the OpenGL/ES Shading Language (GLSL/ES).
QOpenGLShader and QOpenGLShaderProgram shelter the programmer from the details of compiling and linking vertex and fragment shaders.
See also QOpenGLShaderProgram.
Member Type Documentation
enum QOpenGLShader::ShaderTypeBit
This enum specifies the type of QOpenGLShader that is being created.
| Constant | Value | Description |
|---|---|---|
QOpenGLShader::Vertex | 0x0001 | Vertex shader written in the OpenGL Shading Language (GLSL). |
QOpenGLShader::Fragment | 0x0002 | Fragment shader written in the OpenGL Shading Language (GLSL). |
QOpenGLShader::Geometry | 0x0004 | Geometry shaders written in the OpenGL Shading Language (GLSL) (requires OpenGL >= 3.2 or OpenGL ES >= 3.2). |
QOpenGLShader::TessellationControl | 0x0008 | Tessellation control shaders written in the OpenGL shading language (GLSL) (requires OpenGL >= 4.0 or OpenGL ES >= 3.2). |
QOpenGLShader::TessellationEvaluation | 0x0010 | Tessellation evaluation shaders written in the OpenGL shading language (GLSL) (requires OpenGL >= 4.0 or OpenGL ES >= 3.2). |
QOpenGLShader::Compute | 0x0020 | Compute shaders written in the OpenGL shading language (GLSL) (requires OpenGL >= 4.3 or OpenGL ES >= 3.1). |