Note
This class was introduced in Qt 4.6
The PySide.QtOpenGL.QGLShader class allows OpenGL shaders to be compiled.
This class supports shaders written in the OpenGL Shading Language (GLSL) and in the OpenGL/ES Shading Language (GLSL/ES).
PySide.QtOpenGL.QGLShader and PySide.QtOpenGL.QGLShaderProgram shelter the programmer from the details of compiling and linking vertex and fragment shaders.
See also
Parameters: |
|
---|
This enum specifies the type of PySide.QtOpenGL.QGLShader that is being created.
Constant | Description |
---|---|
QGLShader.Vertex | Vertex shader written in the OpenGL Shading Language (GLSL). |
QGLShader.Fragment | Fragment shader written in the OpenGL Shading Language (GLSL). |
QGLShader.Geometry | Geometry shaders written in the OpenGL Shading Language (GLSL), based on the GL_EXT_geometry_shader4 extension. |
Parameters: | source – str |
---|---|
Return type: | PySide.QtCore.bool |
Sets the source code for this shader and compiles it. Returns true if the source was successfully compiled, false otherwise.
Parameters: | source – PySide.QtCore.QByteArray |
---|---|
Return type: | PySide.QtCore.bool |
This is an overloaded function.
Sets the source code for this shader and compiles it. Returns true if the source was successfully compiled, false otherwise.
Parameters: | source – unicode |
---|---|
Return type: | PySide.QtCore.bool |
This is an overloaded function.
Sets the source code for this shader and compiles it. Returns true if the source was successfully compiled, false otherwise.
Parameters: | fileName – unicode |
---|---|
Return type: | PySide.QtCore.bool |
Sets the source code for this shader to the contents of fileName and compiles it. Returns true if the file could be opened and the source compiled, false otherwise.
Parameters: |
|
---|---|
Return type: | PySide.QtCore.bool |
Return type: | PySide.QtCore.bool |
---|
Returns true if this shader has been compiled; false otherwise.
Return type: | unicode |
---|
Returns the errors and warnings that occurred during the last compile.
Return type: | long |
---|
Returns the OpenGL identifier associated with this shader.
See also
Return type: | PySide.QtOpenGL.QGLShader.ShaderType |
---|
Returns the type of this shader.
Return type: | PySide.QtCore.QByteArray |
---|
Returns the source code for this shader.