注意
该类在 Qt4.6 引入
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.
参数: |
|
---|
This enum specifies the type of PySide.QtOpenGL.QGLShader that is being created.
常量 | 描述 |
---|---|
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. |
参数: | source – str |
---|---|
返回类型: | PySide.QtCore.bool |
设置 source code for this shader and compiles it. Returns true if the source was successfully compiled, false otherwise.
参数: | source – PySide.QtCore.QByteArray |
---|---|
返回类型: | PySide.QtCore.bool |
这是重载函数。
设置 source code for this shader and compiles it. Returns true if the source was successfully compiled, false otherwise.
参数: | source – unicode |
---|---|
返回类型: | PySide.QtCore.bool |
这是重载函数。
设置 source code for this shader and compiles it. Returns true if the source was successfully compiled, false otherwise.
参数: | fileName – unicode |
---|---|
返回类型: | 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.
参数: |
|
---|---|
返回类型: |
PySide.QtCore.bool |
返回类型: | PySide.QtCore.bool |
---|
Returns true if this shader has been compiled; false otherwise.
返回类型: | unicode |
---|
Returns the errors and warnings that occurred during the last compile.
返回类型: | PySide.QtOpenGL.GLuint |
---|
Returns the OpenGL identifier associated with this shader.
返回类型: | PySide.QtOpenGL.QGLShader.ShaderType |
---|
Returns the type of this shader.
返回类型: | PySide.QtCore.QByteArray |
---|
Returns the source code for this shader.