<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                # QGLShaderProgram Class Reference ## [[QtOpenGL](index.htm) module] 該QGLShaderProgram類允許的OpenGL著色器程序鏈接和使用。[More...](#details) 繼承[QObject](qobject.html)。 ### Methods * `__init__ (self, QObject?parent?=?None)` * `__init__ (self, QGLContext?context, QObject?parent?=?None)` * `bool addShader (self, QGLShader?shader)` * `bool addShaderFromSourceCode (self, QGLShader.ShaderType?type, QByteArray?source)` * `bool addShaderFromSourceCode (self, QGLShader.ShaderType?type, QString?source)` * `bool addShaderFromSourceFile (self, QGLShader.ShaderType?type, QString?fileName)` * `int attributeLocation (self, QByteArray?name)` * `int attributeLocation (self, QString?name)` * `bool bind (self)` * `bindAttributeLocation (self, QByteArray?name, int?location)` * `bindAttributeLocation (self, QString?name, int?location)` * `disableAttributeArray (self, int?location)` * `disableAttributeArray (self, str?name)` * `enableAttributeArray (self, int?location)` * `enableAttributeArray (self, str?name)` * `int geometryInputType (self)` * `int geometryOutputType (self)` * `int geometryOutputVertexCount (self)` * `bool isLinked (self)` * `bool link (self)` * `QString log (self)` * `int programId (self)` * `release (self)` * `removeAllShaders (self)` * `removeShader (self, QGLShader?shader)` * `setAttributeArray (self, int?location, sequence?values)` * `setAttributeArray (self, str?name, sequence?values)` * `setAttributeBuffer (self, int?location, int?type, int?offset, int?tupleSize, int?stride?=?0)` * `setAttributeBuffer (self, str?name, int?type, int?offset, int?tupleSize, int?stride?=?0)` * `setAttributeValue (self, int?location, float?value)` * `setAttributeValue (self, int?location, float?x, float?y)` * `setAttributeValue (self, int?location, float?x, float?y, float?z)` * `setAttributeValue (self, int?location, float?x, float?y, float?z, float?w)` * `setAttributeValue (self, int?location, QVector2D?value)` * `setAttributeValue (self, int?location, QVector3D?value)` * `setAttributeValue (self, int?location, QVector4D?value)` * `setAttributeValue (self, int?location, QColor?value)` * `setAttributeValue (self, str?name, float?value)` * `setAttributeValue (self, str?name, float?x, float?y)` * `setAttributeValue (self, str?name, float?x, float?y, float?z)` * `setAttributeValue (self, str?name, float?x, float?y, float?z, float?w)` * `setAttributeValue (self, str?name, QVector2D?value)` * `setAttributeValue (self, str?name, QVector3D?value)` * `setAttributeValue (self, str?name, QVector4D?value)` * `setAttributeValue (self, str?name, QColor?value)` * `setGeometryInputType (self, int?inputType)` * `setGeometryOutputType (self, int?outputType)` * `setGeometryOutputVertexCount (self, int?count)` * `setUniformValue (self, int?location, int?value)` * `setUniformValue (self, int?location, float?value)` * `setUniformValue (self, int?location, float?x, float?y)` * `setUniformValue (self, int?location, float?x, float?y, float?z)` * `setUniformValue (self, int?location, float?x, float?y, float?z, float?w)` * `setUniformValue (self, int?location, QVector2D?value)` * `setUniformValue (self, int?location, QVector3D?value)` * `setUniformValue (self, int?location, QVector4D?value)` * `setUniformValue (self, int?location, QColor?color)` * `setUniformValue (self, int?location, QPoint?point)` * `setUniformValue (self, int?location, QPointF?point)` * `setUniformValue (self, int?location, QSize?size)` * `setUniformValue (self, int?location, QSizeF?size)` * `setUniformValue (self, int?location, QMatrix2x2?value)` * `setUniformValue (self, int?location, QMatrix2x3?value)` * `setUniformValue (self, int?location, QMatrix2x4?value)` * `setUniformValue (self, int?location, QMatrix3x2?value)` * `setUniformValue (self, int?location, QMatrix3x3?value)` * `setUniformValue (self, int?location, QMatrix3x4?value)` * `setUniformValue (self, int?location, QMatrix4x2?value)` * `setUniformValue (self, int?location, QMatrix4x3?value)` * `setUniformValue (self, int?location, QMatrix4x4?value)` * `setUniformValue (self, int?location, QTransform?value)` * `setUniformValue (self, str?name, int?value)` * `setUniformValue (self, str?name, float?value)` * `setUniformValue (self, str?name, float?x, float?y)` * `setUniformValue (self, str?name, float?x, float?y, float?z)` * `setUniformValue (self, str?name, float?x, float?y, float?z, float?w)` * `setUniformValue (self, str?name, QVector2D?value)` * `setUniformValue (self, str?name, QVector3D?value)` * `setUniformValue (self, str?name, QVector4D?value)` * `setUniformValue (self, str?name, QColor?color)` * `setUniformValue (self, str?name, QPoint?point)` * `setUniformValue (self, str?name, QPointF?point)` * `setUniformValue (self, str?name, QSize?size)` * `setUniformValue (self, str?name, QSizeF?size)` * `setUniformValue (self, str?name, QMatrix2x2?value)` * `setUniformValue (self, str?name, QMatrix2x3?value)` * `setUniformValue (self, str?name, QMatrix2x4?value)` * `setUniformValue (self, str?name, QMatrix3x2?value)` * `setUniformValue (self, str?name, QMatrix3x3?value)` * `setUniformValue (self, str?name, QMatrix3x4?value)` * `setUniformValue (self, str?name, QMatrix4x2?value)` * `setUniformValue (self, str?name, QMatrix4x3?value)` * `setUniformValue (self, str?name, QMatrix4x4?value)` * `setUniformValue (self, str?name, QTransform?value)` * `setUniformValueArray (self, int?location, sequence?values)` * `setUniformValueArray (self, str?name, sequence?values)` * `list-of-QGLShader shaders (self)` * `int uniformLocation (self, QByteArray?name)` * `int uniformLocation (self, QString?name)` ### Static Methods * `bool hasOpenGLShaderPrograms (QGLContext?context?=?None)` * * * ## Detailed Description 該QGLShaderProgram類允許的OpenGL著色器程序鏈接和使用。 ### Introduction 此類支持寫在OpenGL著色語言( GLSL )和OpenGL的/ ES著色語言( GLSL / ES)著色器程序。 [QGLShader](qglshader.html)和QGLShaderProgram庇護程序員從編譯和連接頂點和片段著色器的詳細信息。 下面的示例創建使用附帶的源頂點著色器程序`code`。一旦編譯和鏈接,著色器程序是在當前激活[QGLContext](qglcontext.html)通過調用[QGLShaderProgram.bind](qglshaderprogram.html#bind)(): ``` [QGLShader](qglshader.html) shader([QGLShader](qglshader.html).Vertex); shader.compileSourceCode(code); QGLShaderProgram program(context); program.addShader(shader); program.link(); program.bind(); ``` ### Writing portable shaders 著色器程序可能是因為不同的標準頂點屬性和統一的變量支持水平難以跨越的OpenGL實現重用。特別是, GLSL / ES缺乏一切都存在于桌面OpenGL系統的標準變量:`gl_Vertex`,`gl_Normal`,`gl_Color`,等等。桌面OpenGL缺少可變預選賽`highp`,`mediump`和`lowp`。 該QGLShaderProgram類使得編寫可移植著色器更容易的前綴與桌面OpenGL以下行的所有著色器程序的過程: ``` #define highp #define mediump #define lowp ``` 這使得它可以運行在桌面系統最GLSL / ES著色器程序。程序員應該限制自己只是功能,是目前在GLSL / ES ,避免標準的變量名只能在桌面上。 ### Simple shader example ``` program.addShaderFromSourceCode([QGLShader](qglshader.html).Vertex, "attribute highp vec4 vertex;\n" "uniform highp mat4 matrix;\n" "void main(void)\n" "{\n" " gl_Position = matrix * vertex;\n" "}"); program.addShaderFromSourceCode([QGLShader](qglshader.html).Fragment, "uniform mediump vec4 color;\n" "void main(void)\n" "{\n" " gl_FragColor = color;\n" "}"); program.link(); program.bind(); int vertexLocation = program.attributeLocation("vertex"); int matrixLocation = program.uniformLocation("matrix"); int colorLocation = program.uniformLocation("color"); ``` 有了上面的著色器程序活躍,我們可以得出一個綠色三角形如下: ``` static GLfloat const triangleVertices[] = { 60.0f, 10.0f, 0.0f, 110.0f, 110.0f, 0.0f, 10.0f, 110.0f, 0.0f }; [QColor](qcolor.html) color(0, 255, 0, 255); QMatrix4x4 pmvMatrix; pmvMatrix.ortho(rect()); program.enableAttributeArray(vertexLocation); program.setAttributeArray(vertexLocation, triangleVertices, 3); program.setUniformValue(matrixLocation, pmvMatrix); program.setUniformValue(colorLocation, color); glDrawArrays(GL_TRIANGLES, 0, 3); program.disableAttributeArray(vertexLocation); ``` ### Binary shaders and programs 二進制著色器可以使用指定`glShaderBinary()`從返回值[QGLShader.shaderId](qglshader.html#shaderId)( ) 。該[QGLShader](qglshader.html)實例包含二進制然后可以加入到著色器程序以[addShader](qglshaderprogram.html#addShader)()和以通常的方式聯系在一起[link](qglshaderprogram.html#link)( ) 。 二進制程序可以使用指定`glProgramBinaryOES()`從返回值[programId](qglshaderprogram.html#programId)( ) 。然后,應用程序應調用[link](qglshaderprogram.html#link)(),它會注意到,該方案已經指定和鏈接,讓其他操作要在著色器程序進行。 * * * ## Method Documentation ``` QGLShaderProgram.__init__ (self, QObject?parent?=?None) ``` 該_parent_的說法,如果不是沒有,原因_self_通過Qt的,而不是PyQt的擁有。 構造一個新的著色器程序并將其附加到_parent_。該計劃將是無效的,直到[addShader](qglshaderprogram.html#addShader)()被調用。 在著色器程序將與當前相關聯[QGLContext](qglcontext.html)。 **See also** [addShader](qglshaderprogram.html#addShader)( ) 。 ``` QGLShaderProgram.__init__ (self, QGLContext?context, QObject?parent?=?None) ``` 該_parent_的說法,如果不是沒有,原因_self_通過Qt的,而不是PyQt的擁有。 構造一個新的著色器程序并將其附加到_parent_。該計劃將是無效的,直到[addShader](qglshaderprogram.html#addShader)()被調用。 該著色器程序將與關聯_context_。 **See also** [addShader](qglshaderprogram.html#addShader)( ) 。 ``` bool QGLShaderProgram.addShader (self, QGLShader?shader) ``` 增加了一個編譯_shader_該著色器程序。返回True如果著色器可以添加,否則返回False。 所有權_shader_對象保持與來電者。它不會被刪除時,這[QGLShaderProgram](qglshaderprogram.html)實例被刪除。這允許調用者相同的著色器添加到多個著色器程序。 **See also** [addShaderFromSourceCode](qglshaderprogram.html#addShaderFromSourceCode)( )[addShaderFromSourceFile](qglshaderprogram.html#addShaderFromSourceFile)( )[removeShader](qglshaderprogram.html#removeShader)( )[link](qglshaderprogram.html#link)()和[removeAllShaders](qglshaderprogram.html#removeAllShaders)( ) 。 ``` bool QGLShaderProgram.addShaderFromSourceCode (self, QGLShader.ShaderType?type, QByteArray?source) ``` 編譯_source_作為指定的著色器_type_并將其添加到該著色器程序。返回True如果編譯成功,否則返回False。編譯錯誤和警告將透過提供[log](qglshaderprogram.html#log)( ) 。 該功能的目的是成為一個捷徑可以快速添加頂點和片段著色器的著色器程序,而無需創建一個實例[QGLShader](qglshader.html)第一。 **See also** [addShader](qglshaderprogram.html#addShader)( )[addShaderFromSourceFile](qglshaderprogram.html#addShaderFromSourceFile)( )[removeShader](qglshaderprogram.html#removeShader)( )[link](qglshaderprogram.html#link)( )[log](qglshaderprogram.html#log)()和[removeAllShaders](qglshaderprogram.html#removeAllShaders)( ) 。 ``` bool QGLShaderProgram.addShaderFromSourceCode (self, QGLShader.ShaderType?type, QString?source) ``` 這是一個重載函數。 編譯_source_作為指定的著色器_type_并將其添加到該著色器程序。返回True如果編譯成功,否則返回False。編譯錯誤和警告將透過提供[log](qglshaderprogram.html#log)( ) 。 該功能的目的是成為一個捷徑可以快速添加頂點和片段著色器的著色器程序,而無需創建一個實例[QGLShader](qglshader.html)第一。 **See also** [addShader](qglshaderprogram.html#addShader)( )[addShaderFromSourceFile](qglshaderprogram.html#addShaderFromSourceFile)( )[removeShader](qglshaderprogram.html#removeShader)( )[link](qglshaderprogram.html#link)( )[log](qglshaderprogram.html#log)()和[removeAllShaders](qglshaderprogram.html#removeAllShaders)( ) 。 ``` bool QGLShaderProgram.addShaderFromSourceFile (self, QGLShader.ShaderType?type, QString?fileName) ``` 編譯的內容_fileName_作為指定的著色器_type_并將其添加到該著色器程序。返回True如果編譯成功,否則返回False。編譯錯誤和警告將透過提供[log](qglshaderprogram.html#log)( ) 。 該功能的目的是成為一個捷徑可以快速添加頂點和片段著色器的著色器程序,而無需創建一個實例[QGLShader](qglshader.html)第一。 **See also** [addShader](qglshaderprogram.html#addShader)()和[addShaderFromSourceCode](qglshaderprogram.html#addShaderFromSourceCode)( ) 。 ``` int QGLShaderProgram.attributeLocation (self, QByteArray?name) ``` 返回屬性的位置_name_在此著色器程序的參數列表。返回-1,如果_name_是不是這個著色器程序的有效屬性。 **See also** [uniformLocation](qglshaderprogram.html#uniformLocation)()和[bindAttributeLocation](qglshaderprogram.html#bindAttributeLocation)( ) 。 ``` int QGLShaderProgram.attributeLocation (self, QString?name) ``` 這是一個重載函數。 返回屬性的位置_name_在此著色器程序的參數列表。返回-1,如果_name_是不是這個著色器程序的有效屬性。 **See also** [uniformLocation](qglshaderprogram.html#uniformLocation)()和[bindAttributeLocation](qglshaderprogram.html#bindAttributeLocation)( ) 。 ``` bool QGLShaderProgram.bind (self) ``` 此著色器程序綁定到活動[QGLContext](qglcontext.html)并使其成為當前著色器程序。所有以前綁定的著色器程序被釋放。這等同于調用`glUseProgram()`上[programId](qglshaderprogram.html#programId)( ) 。返回True如果該程序已成功綁定,否則為False 。如果著色器程序還沒有被鏈接,或者它需要被重新鏈接,該函數將調用[link](qglshaderprogram.html#link)( ) 。 **See also** [link](qglshaderprogram.html#link)()和[release](qglshaderprogram.html#release)( ) 。 ``` QGLShaderProgram.bindAttributeLocation (self, QByteArray?name, int?location) ``` 綁定屬性_name_到指定的_location_。此功能可調用的程序已被證實與之前或之后。還沒有當程序被鏈接被明確約束的任何屬性將被自動分配位置。 當這個函數被調用的程序被連接后,該程序將需要重新鏈接至使更改生效。 **See also** [attributeLocation](qglshaderprogram.html#attributeLocation)( ) 。 ``` QGLShaderProgram.bindAttributeLocation (self, QString?name, int?location) ``` 這是一個重載函數。 綁定屬性_name_到指定的_location_。此功能可調用的程序已被證實與之前或之后。還沒有當程序被鏈接被明確約束的任何屬性將被自動分配位置。 當這個函數被調用的程序被連接后,該程序將需要重新鏈接至使更改生效。 **See also** [attributeLocation](qglshaderprogram.html#attributeLocation)( ) 。 ``` QGLShaderProgram.disableAttributeArray (self, int?location) ``` 禁用頂點數組_location_在由以前調用啟用此著色器程序[enableAttributeArray](qglshaderprogram.html#enableAttributeArray)( ) 。 **See also** [enableAttributeArray](qglshaderprogram.html#enableAttributeArray)( )[setAttributeArray](qglshaderprogram.html#setAttributeArray)( )[setAttributeValue](qglshaderprogram.html#setAttributeValue)()和[setUniformValue](qglshaderprogram.html#setUniformValue)( ) 。 ``` QGLShaderProgram.disableAttributeArray (self, str?name) ``` 這是一個重載函數。 禁用頂點數組稱為_name_在由以前調用啟用此著色器程序[enableAttributeArray](qglshaderprogram.html#enableAttributeArray)( ) 。 **See also** [enableAttributeArray](qglshaderprogram.html#enableAttributeArray)( )[setAttributeArray](qglshaderprogram.html#setAttributeArray)( )[setAttributeValue](qglshaderprogram.html#setAttributeValue)()和[setUniformValue](qglshaderprogram.html#setUniformValue)( ) 。 ``` QGLShaderProgram.enableAttributeArray (self, int?location) ``` 啟用頂點數組_location_在這個shader程序,以便通過設置的值[setAttributeArray](qglshaderprogram.html#setAttributeArray)( )上_location_將用于由所述著色器程序。 **See also** [disableAttributeArray](qglshaderprogram.html#disableAttributeArray)( )[setAttributeArray](qglshaderprogram.html#setAttributeArray)( )[setAttributeValue](qglshaderprogram.html#setAttributeValue)()和[setUniformValue](qglshaderprogram.html#setUniformValue)( ) 。 ``` QGLShaderProgram.enableAttributeArray (self, str?name) ``` 這是一個重載函數。 使頂點數組稱為_name_在這個shader程序,以便通過設置的值[setAttributeArray](qglshaderprogram.html#setAttributeArray)( )上_name_將用于由所述著色器程序。 **See also** [disableAttributeArray](qglshaderprogram.html#disableAttributeArray)( )[setAttributeArray](qglshaderprogram.html#setAttributeArray)( )[setAttributeValue](qglshaderprogram.html#setAttributeValue)()和[setUniformValue](qglshaderprogram.html#setUniformValue)( ) 。 ``` int QGLShaderProgram.geometryInputType (self) ``` 返回幾何著色器輸入類型,如果活躍。 此參數將在下次程序連動效應。 此功能被引入Qt的4.7 。 **See also** [setGeometryInputType](qglshaderprogram.html#setGeometryInputType)( ) 。 ``` int QGLShaderProgram.geometryOutputType (self) ``` 返回幾何著色器輸出類型,如果活躍。 此參數將在下次程序連動效應。 此功能被引入Qt的4.7 。 **See also** [setGeometryOutputType](qglshaderprogram.html#setGeometryOutputType)( ) 。 ``` int QGLShaderProgram.geometryOutputVertexCount (self) ``` 返回頂點的當前幾何著色器程序會產生,如果活躍的最大數目。 此參數生效ntext的時間程序鏈接。 此功能被引入Qt的4.7 。 **See also** [setGeometryOutputVertexCount](qglshaderprogram.html#setGeometryOutputVertexCount)( ) 。 ``` bool QGLShaderProgram.hasOpenGLShaderPrograms (QGLContext?context?=?None) ``` 否則返回False ,如果寫在OpenGL著色語言( GLSL )著色器程序在該系統上都支持,則返回True 。 該_context_用于解析GLSL的擴展。如果_context_為null,則[QGLContext.currentContext](qglcontext.html#currentContext)( )被使用。 ``` bool QGLShaderProgram.isLinked (self) ``` 返回True如果著色器程序已被鏈接,否則為False 。 **See also** [link](qglshaderprogram.html#link)( ) 。 ``` bool QGLShaderProgram.link (self) ``` 鏈接在一起,加入到這個計劃與著色器[addShader](qglshaderprogram.html#addShader)( ) 。返回True如果鏈接成功,否則返回False。如果鏈接失敗,錯誤消息可以檢索與[log](qglshaderprogram.html#log)( ) 。 子類可以重載這個函數來初始化屬性和統一的變量在特定著色器程序中使用。 如果著色器程序已經聯系在一起,再調用這個函數將迫使它重新鏈接。 **See also** [addShader](qglshaderprogram.html#addShader)()和[log](qglshaderprogram.html#log)( ) 。 ``` QString QGLShaderProgram.log (self) ``` 在過去的返回所發生的錯誤和警告[link](qglshaderprogram.html#link)()或[addShader](qglshaderprogram.html#addShader)( )和顯式指定的源代碼。 **See also** [link](qglshaderprogram.html#link)( ) 。 ``` int QGLShaderProgram.programId (self) ``` 返回與此著色器程序相關聯的OpenGL的標識符。 **See also** [QGLShader.shaderId](qglshader.html#shaderId)( ) 。 ``` QGLShaderProgram.release (self) ``` 釋放從當前活動的著色器程序[QGLContext](qglcontext.html)。這等同于調用`glUseProgram(0)`。 **See also** [bind](qglshaderprogram.html#bind)( ) 。 ``` QGLShaderProgram.removeAllShaders (self) ``` 刪除所有被添加到這個程序,以前的著色器。該[QGLShader](qglshader.html)如果他們在外部構造為著色器對象將不會被刪除。[QGLShader](qglshader.html)這是由內部構造的對象[QGLShaderProgram](qglshaderprogram.html)將被刪除。 **See also** [addShader](qglshaderprogram.html#addShader)()和[removeShader](qglshaderprogram.html#removeShader)( ) 。 ``` QGLShaderProgram.removeShader (self, QGLShader?shader) ``` 移除_shader_從這個著色器程序。對象不會被刪除。 **See also** [addShader](qglshaderprogram.html#addShader)( )[link](qglshaderprogram.html#link)()和[removeAllShaders](qglshaderprogram.html#removeAllShaders)( ) 。 ``` QGLShaderProgram.setAttributeArray (self, int?location, sequence?values) ``` 設置頂點數組_values_在上面的屬性_location_在此著色器程序。該_tupleSize_表示每個頂點組件(4 1,2 ,3,或)的數量,以及_stride_表示頂點之間的字節數。默認_stride_零值表示該頂點被致密地填充_values_。 該陣列會變得活躍時[enableAttributeArray](qglshaderprogram.html#enableAttributeArray)( )被調用的_location_。否則,使用指定的值[setAttributeValue](qglshaderprogram.html#setAttributeValue)( )為_location_將被使用。 **See also** [setAttributeValue](qglshaderprogram.html#setAttributeValue)( )[setUniformValue](qglshaderprogram.html#setUniformValue)( )[enableAttributeArray](qglshaderprogram.html#enableAttributeArray)()和[disableAttributeArray](qglshaderprogram.html#disableAttributeArray)( ) 。 ``` QGLShaderProgram.setAttributeArray (self, str?name, sequence?values) ``` 設置二維頂點數組_values_在上面的屬性_location_在此著色器程序。該_stride_表示頂點之間的字節數。默認_stride_零值表示該頂點被致密地填充_values_。 該陣列會變得活躍時[enableAttributeArray](qglshaderprogram.html#enableAttributeArray)( )被調用的_location_。否則,使用指定的值[setAttributeValue](qglshaderprogram.html#setAttributeValue)( )為_location_將被使用。 **See also** [setAttributeValue](qglshaderprogram.html#setAttributeValue)( )[setUniformValue](qglshaderprogram.html#setUniformValue)( )[enableAttributeArray](qglshaderprogram.html#enableAttributeArray)()和[disableAttributeArray](qglshaderprogram.html#disableAttributeArray)( ) 。 ``` QGLShaderProgram.setAttributeBuffer (self, int?location, int?type, int?offset, int?tupleSize, int?stride?=?0) ``` 設置在頂點屬性值中的一個陣列_location_在此著色器程序,起始于一個特定的_offset_在當前綁定的頂點緩沖。該_stride_表示頂點之間的字節數。默認_stride_零值表示該頂點被密集的值的數組中。 該_type_表示元素的頂點值陣列中的類型,通常`GL_FLOAT`,`GL_UNSIGNED_BYTE`等。_tupleSize_表示每個頂點部件的數量:1,2 ,3,或4 。 該陣列會變得活躍時[enableAttributeArray](qglshaderprogram.html#enableAttributeArray)( )被調用的_location_。否則,使用指定的值[setAttributeValue](qglshaderprogram.html#setAttributeValue)( )為_location_將被使用。 此功能被引入Qt的4.7 。 **See also** [setAttributeArray](qglshaderprogram.html#setAttributeArray)( ) 。 ``` QGLShaderProgram.setAttributeBuffer (self, str?name, int?type, int?offset, int?tupleSize, int?stride?=?0) ``` 這是一個重載函數。 設置在頂點屬性值的數組,稱為_name_在此著色器程序,起始于一個特定的_offset_在當前綁定的頂點緩沖。該_stride_表示頂點之間的字節數。默認_stride_零值表示該頂點被密集的值的數組中。 該_type_表示元素的頂點值陣列中的類型,通常`GL_FLOAT`,`GL_UNSIGNED_BYTE`等。_tupleSize_表示每個頂點部件的數量:1,2 ,3,或4 。 該陣列會變得活躍時[enableAttributeArray](qglshaderprogram.html#enableAttributeArray)( )被調用的_name_。否則,使用指定的值[setAttributeValue](qglshaderprogram.html#setAttributeValue)( )為_name_將被使用。 此功能被引入Qt的4.7 。 **See also** [setAttributeArray](qglshaderprogram.html#setAttributeArray)( ) 。 ``` QGLShaderProgram.setAttributeValue (self, int?location, float?value) ``` 在設置該屬性_location_在目前情況下,以_value_。 **See also** [setUniformValue](qglshaderprogram.html#setUniformValue)( ) 。 ``` QGLShaderProgram.setAttributeValue (self, int?location, float?x, float?y) ``` 在設置該屬性_location_在目前情況下,以二維矢量(_x_,_y_) 。 **See also** [setUniformValue](qglshaderprogram.html#setUniformValue)( ) 。 ``` QGLShaderProgram.setAttributeValue (self, int?location, float?x, float?y, float?z) ``` 在設置該屬性_location_在當前上下文中的三維矢量(_x_,_y_,_z_) 。 **See also** [setUniformValue](qglshaderprogram.html#setUniformValue)( ) 。 ``` QGLShaderProgram.setAttributeValue (self, int?location, float?x, float?y, float?z, float?w) ``` 在設置該屬性_location_在目前情況下的4D向量(_x_,_y_,_z_,_w_) 。 **See also** [setUniformValue](qglshaderprogram.html#setUniformValue)( ) 。 ``` QGLShaderProgram.setAttributeValue (self, int?location, QVector2D?value) ``` 在設置該屬性_location_在目前情況下,以_value_。 **See also** [setUniformValue](qglshaderprogram.html#setUniformValue)( ) 。 ``` QGLShaderProgram.setAttributeValue (self, int?location, QVector3D?value) ``` 在設置該屬性_location_在目前情況下,以_value_。 **See also** [setUniformValue](qglshaderprogram.html#setUniformValue)( ) 。 ``` QGLShaderProgram.setAttributeValue (self, int?location, QVector4D?value) ``` 在設置該屬性_location_在目前情況下,以_value_。 **See also** [setUniformValue](qglshaderprogram.html#setUniformValue)( ) 。 ``` QGLShaderProgram.setAttributeValue (self, int?location, QColor?value) ``` 在設置該屬性_location_在目前情況下,以_value_。 **See also** [setUniformValue](qglshaderprogram.html#setUniformValue)( ) 。 ``` QGLShaderProgram.setAttributeValue (self, str?name, float?value) ``` 在設置該屬性_location_在當前上下文中的內容_values_,其中包含_columns_元素,每個元素包括_rows_元素。該_rows_值應為1,2, 3,或4 。這個功能通常是用來設置矩陣值和列向量。 **See also** [setUniformValue](qglshaderprogram.html#setUniformValue)( ) 。 ``` QGLShaderProgram.setAttributeValue (self, str?name, float?x, float?y) ``` 這是一個重載函數。 所謂設置該屬性_name_在目前情況下,以_value_。 **See also** [setUniformValue](qglshaderprogram.html#setUniformValue)( ) 。 ``` QGLShaderProgram.setAttributeValue (self, str?name, float?x, float?y, float?z) ``` 這是一個重載函數。 所謂設置該屬性_name_在目前情況下,以二維矢量(_x_,_y_) 。 **See also** [setUniformValue](qglshaderprogram.html#setUniformValue)( ) 。 ``` QGLShaderProgram.setAttributeValue (self, str?name, float?x, float?y, float?z, float?w) ``` 這是一個重載函數。 所謂設置該屬性_name_在當前上下文中的三維矢量(_x_,_y_,_z_) 。 **See also** [setUniformValue](qglshaderprogram.html#setUniformValue)( ) 。 ``` QGLShaderProgram.setAttributeValue (self, str?name, QVector2D?value) ``` 這是一個重載函數。 所謂設置該屬性_name_在目前情況下的4D向量(_x_,_y_,_z_,_w_) 。 **See also** [setUniformValue](qglshaderprogram.html#setUniformValue)( ) 。 ``` QGLShaderProgram.setAttributeValue (self, str?name, QVector3D?value) ``` 這是一個重載函數。 所謂設置該屬性_name_在目前情況下,以_value_。 **See also** [setUniformValue](qglshaderprogram.html#setUniformValue)( ) 。 ``` QGLShaderProgram.setAttributeValue (self, str?name, QVector4D?value) ``` 這是一個重載函數。 所謂設置該屬性_name_在目前情況下,以_value_。 **See also** [setUniformValue](qglshaderprogram.html#setUniformValue)( ) 。 ``` QGLShaderProgram.setAttributeValue (self, str?name, QColor?value) ``` 這是一個重載函數。 所謂設置該屬性_name_在目前情況下,以_value_。 **See also** [setUniformValue](qglshaderprogram.html#setUniformValue)( ) 。 ``` QGLShaderProgram.setGeometryInputType (self, int?inputType) ``` 設定從輸入型_inputType_。 此參數將在下次程序連動效應。 **See also** [geometryInputType](qglshaderprogram.html#geometryInputType)( ) 。 ``` QGLShaderProgram.setGeometryOutputType (self, int?outputType) ``` 從幾何著色器設置輸出類型,如果活躍,_outputType_。 此參數將在下次程序連動效應。 此功能被引入Qt的4.7 。 **See also** [geometryOutputType](qglshaderprogram.html#geometryOutputType)( ) 。 ``` QGLShaderProgram.setGeometryOutputVertexCount (self, int?count) ``` 設置頂點的當前幾何著色器程序會產生,如果活躍,最大數量_count_。 此參數將在下次程序連動效應。 此功能被引入Qt的4.7 。 **See also** [geometryOutputVertexCount](qglshaderprogram.html#geometryOutputVertexCount)( ) 。 ``` QGLShaderProgram.setUniformValue (self, int?location, int?value) ``` 設置在勻變速_location_在目前情況下,以_value_。 **See also** [setAttributeValue](qglshaderprogram.html#setAttributeValue)( ) 。 ``` QGLShaderProgram.setUniformValue (self, int?location, float?value) ``` 設置在勻變速_location_在目前情況下,以_value_。 **See also** [setAttributeValue](qglshaderprogram.html#setAttributeValue)( ) 。 ``` QGLShaderProgram.setUniformValue (self, int?location, float?x, float?y) ``` 設置在勻變速_location_在目前情況下,以_value_。設置采樣值時,此功能應該被使用。 **See also** [setAttributeValue](qglshaderprogram.html#setAttributeValue)( ) 。 ``` QGLShaderProgram.setUniformValue (self, int?location, float?x, float?y, float?z) ``` 設置在勻變速_location_在目前情況下,以二維矢量(_x_,_y_) 。 **See also** [setAttributeValue](qglshaderprogram.html#setAttributeValue)( ) 。 ``` QGLShaderProgram.setUniformValue (self, int?location, float?x, float?y, float?z, float?w) ``` 設置在勻變速_location_在當前上下文中的三維矢量(_x_,_y_,_z_) 。 **See also** [setAttributeValue](qglshaderprogram.html#setAttributeValue)( ) 。 ``` QGLShaderProgram.setUniformValue (self, int?location, QVector2D?value) ``` 設置在勻變速_location_在目前情況下的4D向量(_x_,_y_,_z_,_w_) 。 **See also** [setAttributeValue](qglshaderprogram.html#setAttributeValue)( ) 。 ``` QGLShaderProgram.setUniformValue (self, int?location, QVector3D?value) ``` 設置在勻變速_location_在目前情況下,以_value_。 **See also** [setAttributeValue](qglshaderprogram.html#setAttributeValue)( ) 。 ``` QGLShaderProgram.setUniformValue (self, int?location, QVector4D?value) ``` 設置在勻變速_location_在目前情況下,以_value_。 **See also** [setAttributeValue](qglshaderprogram.html#setAttributeValue)( ) 。 ``` QGLShaderProgram.setUniformValue (self, int?location, QColor?color) ``` 設置在勻變速_location_在目前情況下,以_value_。 **See also** [setAttributeValue](qglshaderprogram.html#setAttributeValue)( ) 。 ``` QGLShaderProgram.setUniformValue (self, int?location, QPoint?point) ``` 設置在勻變速_location_在當前背景下的紅色,綠色,藍色和alpha分量_color_。 **See also** [setAttributeValue](qglshaderprogram.html#setAttributeValue)( ) 。 ``` QGLShaderProgram.setUniformValue (self, int?location, QPointF?point) ``` 設置在勻變速_location_在當前上下文中的x和y坐標_point_。 **See also** [setAttributeValue](qglshaderprogram.html#setAttributeValue)( ) 。 ``` QGLShaderProgram.setUniformValue (self, int?location, QSize?size) ``` 設置在勻變速_location_在當前上下文中的x和y坐標_point_。 **See also** [setAttributeValue](qglshaderprogram.html#setAttributeValue)( ) 。 ``` QGLShaderProgram.setUniformValue (self, int?location, QSizeF?size) ``` 設置在勻變速_location_在目前情況下,以給定的寬度和高度_size_。 **See also** [setAttributeValue](qglshaderprogram.html#setAttributeValue)( ) 。 ``` QGLShaderProgram.setUniformValue (self, int?location, QMatrix2x2?value) ``` 設置在勻變速_location_在目前情況下,以給定的寬度和高度_size_。 **See also** [setAttributeValue](qglshaderprogram.html#setAttributeValue)( ) 。 ``` QGLShaderProgram.setUniformValue (self, int?location, QMatrix2x3?value) ``` 設置在勻變速_location_在目前情況下,以一個2x2的矩陣_value_。 **See also** [setAttributeValue](qglshaderprogram.html#setAttributeValue)( ) 。 ``` QGLShaderProgram.setUniformValue (self, int?location, QMatrix2x4?value) ``` 設置在勻變速_location_在目前情況下,以一個2×3矩陣_value_。 **See also** [setAttributeValue](qglshaderprogram.html#setAttributeValue)( ) 。 ``` QGLShaderProgram.setUniformValue (self, int?location, QMatrix3x2?value) ``` 設置在勻變速_location_在目前情況下,以一個2x4的矩陣_value_。 **See also** [setAttributeValue](qglshaderprogram.html#setAttributeValue)( ) 。 ``` QGLShaderProgram.setUniformValue (self, int?location, QMatrix3x3?value) ``` 設置在勻變速_location_在目前情況下,以一個3x2的矩陣_value_。 **See also** [setAttributeValue](qglshaderprogram.html#setAttributeValue)( ) 。 ``` QGLShaderProgram.setUniformValue (self, int?location, QMatrix3x4?value) ``` 設置在勻變速_location_在目前情況下,以一個3x3矩陣_value_。 **See also** [setAttributeValue](qglshaderprogram.html#setAttributeValue)( ) 。 ``` QGLShaderProgram.setUniformValue (self, int?location, QMatrix4x2?value) ``` 設置在勻變速_location_在目前情況下,以一個3x4的矩陣_value_。 **See also** [setAttributeValue](qglshaderprogram.html#setAttributeValue)( ) 。 ``` QGLShaderProgram.setUniformValue (self, int?location, QMatrix4x3?value) ``` 設置在勻變速_location_在目前情況下,以一個4×2矩陣_value_。 **See also** [setAttributeValue](qglshaderprogram.html#setAttributeValue)( ) 。 ``` QGLShaderProgram.setUniformValue (self, int?location, QMatrix4x4?value) ``` 設置在勻變速_location_在目前情況下,以一個4x3的矩陣_value_。 **See also** [setAttributeValue](qglshaderprogram.html#setAttributeValue)( ) 。 ``` QGLShaderProgram.setUniformValue (self, int?location, QTransform?value) ``` 設置在勻變速_location_在目前情況下,以一個4x4矩陣_value_。 **See also** [setAttributeValue](qglshaderprogram.html#setAttributeValue)( ) 。 ``` QGLShaderProgram.setUniformValue (self, str?name, int?value) ``` 設置在勻變速_location_在目前情況下,以一個3x3變換矩陣_value_被指定為一個[QTransform](qtransform.html)值。 要設置[QTransform](qtransform.html)值作為著色器,使用一個4x4矩陣`setUniformValue(location, QMatrix4x4(value))`。 ``` QGLShaderProgram.setUniformValue (self, str?name, float?value) ``` 這是一個重載函數。 設置叫做勻變速_name_在目前情況下,以_value_。 **See also** [setAttributeValue](qglshaderprogram.html#setAttributeValue)( ) 。 ``` QGLShaderProgram.setUniformValue (self, str?name, float?x, float?y) ``` 這是一個重載函數。 設置叫做勻變速_name_在目前情況下,以_value_。 **See also** [setAttributeValue](qglshaderprogram.html#setAttributeValue)( ) 。 ``` QGLShaderProgram.setUniformValue (self, str?name, float?x, float?y, float?z) ``` 這是一個重載函數。 設置叫做勻變速_name_在目前情況下,以_value_。設置采樣值時,此功能應該被使用。 **See also** [setAttributeValue](qglshaderprogram.html#setAttributeValue)( ) 。 ``` QGLShaderProgram.setUniformValue (self, str?name, float?x, float?y, float?z, float?w) ``` 這是一個重載函數。 設置叫做勻變速_name_在目前情況下,以二維矢量(_x_,_y_) 。 **See also** [setAttributeValue](qglshaderprogram.html#setAttributeValue)( ) 。 ``` QGLShaderProgram.setUniformValue (self, str?name, QVector2D?value) ``` 這是一個重載函數。 設置叫做勻變速_name_在當前上下文中的三維矢量(_x_,_y_,_z_) 。 **See also** [setAttributeValue](qglshaderprogram.html#setAttributeValue)( ) 。 ``` QGLShaderProgram.setUniformValue (self, str?name, QVector3D?value) ``` 這是一個重載函數。 設置叫做勻變速_name_在目前情況下的4D向量(_x_,_y_,_z_,_w_) 。 **See also** [setAttributeValue](qglshaderprogram.html#setAttributeValue)( ) 。 ``` QGLShaderProgram.setUniformValue (self, str?name, QVector4D?value) ``` 這是一個重載函數。 設置叫做勻變速_name_在目前情況下,以_value_。 **See also** [setAttributeValue](qglshaderprogram.html#setAttributeValue)( ) 。 ``` QGLShaderProgram.setUniformValue (self, str?name, QColor?color) ``` 這是一個重載函數。 設置叫做勻變速_name_在目前情況下,以_value_。 **See also** [setAttributeValue](qglshaderprogram.html#setAttributeValue)( ) 。 ``` QGLShaderProgram.setUniformValue (self, str?name, QPoint?point) ``` 這是一個重載函數。 設置叫做勻變速_name_在目前情況下,以_value_。 **See also** [setAttributeValue](qglshaderprogram.html#setAttributeValue)( ) 。 ``` QGLShaderProgram.setUniformValue (self, str?name, QPointF?point) ``` 這是一個重載函數。 設置叫做勻變速_name_在當前背景下的紅色,綠色,藍色和alpha分量_color_。 **See also** [setAttributeValue](qglshaderprogram.html#setAttributeValue)( ) 。 ``` QGLShaderProgram.setUniformValue (self, str?name, QSize?size) ``` 這是一個重載函數。 設置與統一的變量相關聯_name_在當前上下文中的x和y坐標_point_。 **See also** [setAttributeValue](qglshaderprogram.html#setAttributeValue)( ) 。 ``` QGLShaderProgram.setUniformValue (self, str?name, QSizeF?size) ``` 這是一個重載函數。 設置與統一的變量相關聯_name_在當前上下文中的x和y坐標_point_。 **See also** [setAttributeValue](qglshaderprogram.html#setAttributeValue)( ) 。 ``` QGLShaderProgram.setUniformValue (self, str?name, QMatrix2x2?value) ``` 這是一個重載函數。 設置與統一的變量相關聯_name_在目前情況下,以給定的寬度和高度_size_。 **See also** [setAttributeValue](qglshaderprogram.html#setAttributeValue)( ) 。 ``` QGLShaderProgram.setUniformValue (self, str?name, QMatrix2x3?value) ``` 這是一個重載函數。 設置與統一的變量相關聯_name_在目前情況下,以給定的寬度和高度_size_。 **See also** [setAttributeValue](qglshaderprogram.html#setAttributeValue)( ) 。 ``` QGLShaderProgram.setUniformValue (self, str?name, QMatrix2x4?value) ``` 這是一個重載函數。 設置叫做勻變速_name_在目前情況下,以一個2x2的矩陣_value_。 **See also** [setAttributeValue](qglshaderprogram.html#setAttributeValue)( ) 。 ``` QGLShaderProgram.setUniformValue (self, str?name, QMatrix3x2?value) ``` 這是一個重載函數。 設置叫做勻變速_name_在目前情況下,以一個2×3矩陣_value_。 **See also** [setAttributeValue](qglshaderprogram.html#setAttributeValue)( ) 。 ``` QGLShaderProgram.setUniformValue (self, str?name, QMatrix3x3?value) ``` 這是一個重載函數。 設置叫做勻變速_name_在目前情況下,以一個2x4的矩陣_value_。 **See also** [setAttributeValue](qglshaderprogram.html#setAttributeValue)(). ``` QGLShaderProgram.setUniformValue (self, str?name, QMatrix3x4?value) ``` 這是一個重載函數。 設置叫做勻變速_name_在目前情況下,以一個3x2的矩陣_value_。 **See also** [setAttributeValue](qglshaderprogram.html#setAttributeValue)( ) 。 ``` QGLShaderProgram.setUniformValue (self, str?name, QMatrix4x2?value) ``` 這是一個重載函數。 設置叫做勻變速_name_在目前情況下,以一個3x3矩陣_value_。 **See also** [setAttributeValue](qglshaderprogram.html#setAttributeValue)( ) 。 ``` QGLShaderProgram.setUniformValue (self, str?name, QMatrix4x3?value) ``` 這是一個重載函數。 設置叫做勻變速_name_在目前情況下,以一個3x4的矩陣_value_。 **See also** [setAttributeValue](qglshaderprogram.html#setAttributeValue)( ) 。 ``` QGLShaderProgram.setUniformValue (self, str?name, QMatrix4x4?value) ``` 這是一個重載函數。 設置叫做勻變速_name_在目前情況下,以一個4×2矩陣_value_。 **See also** [setAttributeValue](qglshaderprogram.html#setAttributeValue)( ) 。 ``` QGLShaderProgram.setUniformValue (self, str?name, QTransform?value) ``` 這是一個重載函數。 設置叫做勻變速_name_在目前情況下,以一個4x3的矩陣_value_。 **See also** [setAttributeValue](qglshaderprogram.html#setAttributeValue)( ) 。 ``` QGLShaderProgram.setUniformValueArray (self, int?location, sequence?values) ``` 設置統一的變量數組_location_在目前情況下對_count_元素_values_。每個元素都有_tupleSize_組件。該_tupleSize_必須是1, 2,3,或4。 **See also** [setAttributeValue](qglshaderprogram.html#setAttributeValue)( ) 。 ``` QGLShaderProgram.setUniformValueArray (self, str?name, sequence?values) ``` 設置統一的變量數組_location_在目前情況下對_count_元素_values_。 **See also** [setAttributeValue](qglshaderprogram.html#setAttributeValue)( ) 。 ``` list-of-QGLShader QGLShaderProgram.shaders (self) ``` 返回已被添加到該著色器程序中所有著色器的使用列表[addShader](qglshaderprogram.html#addShader)( ) 。 **See also** [addShader](qglshaderprogram.html#addShader)()和[removeShader](qglshaderprogram.html#removeShader)( ) 。 ``` int QGLShaderProgram.uniformLocation (self, QByteArray?name) ``` 返回均勻的變量的位置_name_在此著色器程序的參數列表。返回-1,如果_name_是不是這個著色器程序一個有效的統一變量。 **See also** [attributeLocation](qglshaderprogram.html#attributeLocation)( ) 。 ``` int QGLShaderProgram.uniformLocation (self, QString?name) ``` 這是一個重載函數。 返回均勻的變量的位置_name_在此著色器程序的參數列表。返回-1,如果_name_是不是這個著色器程序一個有效的統一變量。 **See also** [attributeLocation](qglshaderprogram.html#attributeLocation)( ) 。
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看