• PySide 模块
  • PySide.QtOpenGL
  • 内容表表

    上一话题

    QGLShaderProgram

    下一话题

    PySide.QtScript

    QGLShader

    注意

    该类在 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.

    class PySide.QtOpenGL. QGLShader ( type [ , parent=None ] )
    class PySide.QtOpenGL. QGLShader ( type , context [ , parent=None ] )
    参数:
    PySide.QtOpenGL.QGLShader. ShaderTypeBit

    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.
    PySide.QtOpenGL.QGLShader. compileSourceCode ( source )
    参数: source – str
    返回类型: PySide.QtCore.bool

    设置 source code for this shader and compiles it. Returns true if the source was successfully compiled, false otherwise.

    PySide.QtOpenGL.QGLShader. compileSourceCode ( source )
    参数: 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.

    PySide.QtOpenGL.QGLShader. compileSourceCode ( source )
    参数: source – unicode
    返回类型: PySide.QtCore.bool

    这是重载函数。

    设置 source code for this shader and compiles it. Returns true if the source was successfully compiled, false otherwise.

    PySide.QtOpenGL.QGLShader. compileSourceFile ( fileName )
    参数: 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.

    static PySide.QtOpenGL.QGLShader. hasOpenGLShaders ( type [ , context=None ] )
    参数:
    返回类型:

    PySide.QtCore.bool

    PySide.QtOpenGL.QGLShader. isCompiled ( )
    返回类型: PySide.QtCore.bool

    Returns true if this shader has been compiled; false otherwise.

    PySide.QtOpenGL.QGLShader. log ( )
    返回类型: unicode

    Returns the errors and warnings that occurred during the last compile.

    PySide.QtOpenGL.QGLShader. shaderId ( )
    返回类型: PySide.QtOpenGL.GLuint

    Returns the OpenGL identifier associated with this shader.

    PySide.QtOpenGL.QGLShader. shaderType ( )
    返回类型: PySide.QtOpenGL.QGLShader.ShaderType

    Returns the type of this shader.

    PySide.QtOpenGL.QGLShader. sourceCode ( )
    返回类型: PySide.QtCore.QByteArray

    Returns the source code for this shader.