![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
The QOpenGLShaderProgram class allows OpenGL shader programs to be linked and used. More...
#include <qopenglshaderprogram.h>
Public Member Functions | |
| QOpenGLShaderProgram (QObject *parent=nullptr) | |
| Constructs a new shader program and attaches it to parent. | |
| ~QOpenGLShaderProgram () | |
| Deletes this shader program. | |
| bool | addShader (QOpenGLShader *shader) |
| Adds a compiled shader to this shader program. | |
| void | removeShader (QOpenGLShader *shader) |
| Removes shader from this shader program. | |
| QList< QOpenGLShader * > | shaders () const |
| Returns a list of all shaders that have been added to this shader program using addShader(). | |
| bool | addShaderFromSourceCode (QOpenGLShader::ShaderType type, const char *source) |
| Compiles source as a shader of the specified type and adds it to this shader program. | |
| bool | addShaderFromSourceCode (QOpenGLShader::ShaderType type, const QByteArray &source) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Compiles source as a shader of the specified type and adds it to this shader program. | |
| bool | addShaderFromSourceCode (QOpenGLShader::ShaderType type, const QString &source) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Compiles source as a shader of the specified type and adds it to this shader program. | |
| bool | addShaderFromSourceFile (QOpenGLShader::ShaderType type, const QString &fileName) |
| Compiles the contents of fileName as a shader of the specified type and adds it to this shader program. | |
| bool | addCacheableShaderFromSourceCode (QOpenGLShader::ShaderType type, const char *source) |
| Registers the shader of the specified type and source to this program. | |
| bool | addCacheableShaderFromSourceCode (QOpenGLShader::ShaderType type, const QByteArray &source) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Registers the shader of the specified type and source to this program. | |
| bool | addCacheableShaderFromSourceCode (QOpenGLShader::ShaderType type, const QString &source) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Registers the shader of the specified type and source to this program. | |
| bool | addCacheableShaderFromSourceFile (QOpenGLShader::ShaderType type, const QString &fileName) |
| Registers the shader of the specified type and fileName to this program. | |
| void | removeAllShaders () |
| Removes all of the shaders that were added to this program previously. | |
| virtual bool | link () |
| Links together the shaders that were added to this program with addShader(). | |
| bool | isLinked () const |
Returns true if this shader program has been linked; false otherwise. | |
| QString | log () const |
| Returns the errors and warnings that occurred during the last link() or addShader() with explicitly specified source code. | |
| bool | bind () |
| Binds this shader program to the active QOpenGLContext and makes it the current shader program. | |
| void | release () |
| Releases the active shader program from the current QOpenGLContext. | |
| bool | create () |
| Requests the shader program's id to be created immediately. | |
| GLuint | programId () const |
| Returns the OpenGL identifier associated with this shader program. | |
| int | maxGeometryOutputVertices () const |
| Returns the hardware limit for how many vertices a geometry shader can output. | |
| void | setPatchVertexCount (int count) |
| Use this function to specify to OpenGL the number of vertices in a patch to count. | |
| int | patchVertexCount () const |
| Returns the number of vertices per-patch to be used when rendering. | |
| void | setDefaultOuterTessellationLevels (const QList< float > &levels) |
| Sets the default outer tessellation levels to be used by the tessellation primitive generator in the event that the tessellation control shader does not output them to levels. | |
| QList< float > | defaultOuterTessellationLevels () const |
| Returns the default outer tessellation levels to be used by the tessellation primitive generator in the event that the tessellation control shader does not output them. | |
| void | setDefaultInnerTessellationLevels (const QList< float > &levels) |
| Sets the default outer tessellation levels to be used by the tessellation primitive generator in the event that the tessellation control shader does not output them to levels. | |
| QList< float > | defaultInnerTessellationLevels () const |
| Returns the default inner tessellation levels to be used by the tessellation primitive generator in the event that the tessellation control shader does not output them. | |
| void | bindAttributeLocation (const char *name, int location) |
| Binds the attribute name to the specified location. | |
| void | bindAttributeLocation (const QByteArray &name, int location) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Binds the attribute name to the specified location. | |
| void | bindAttributeLocation (const QString &name, int location) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Binds the attribute name to the specified location. | |
| int | attributeLocation (const char *name) const |
| Returns the location of the attribute name within this shader program's parameter list. | |
| int | attributeLocation (const QByteArray &name) const |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Returns the location of the attribute name within this shader program's parameter list. | |
| int | attributeLocation (const QString &name) const |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Returns the location of the attribute name within this shader program's parameter list. | |
| void | setAttributeValue (int location, GLfloat value) |
| Sets the attribute at location in the current context to value. | |
| void | setAttributeValue (int location, GLfloat x, GLfloat y) |
| Sets the attribute at location in the current context to the 2D vector (x, y). | |
| void | setAttributeValue (int location, GLfloat x, GLfloat y, GLfloat z) |
| Sets the attribute at location in the current context to the 3D vector (x, y, z). | |
| void | setAttributeValue (int location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) |
| Sets the attribute at location in the current context to the 4D vector (x, y, z, w). | |
| void | setAttributeValue (int location, const QVector2D &value) |
| Sets the attribute at location in the current context to value. | |
| void | setAttributeValue (int location, const QVector3D &value) |
| Sets the attribute at location in the current context to value. | |
| void | setAttributeValue (int location, const QVector4D &value) |
| Sets the attribute at location in the current context to value. | |
| void | setAttributeValue (int location, const QColor &value) |
| Sets the attribute at location in the current context to value. | |
| void | setAttributeValue (int location, const GLfloat *values, int columns, int rows) |
| Sets the attribute at location in the current context to the contents of values, which contains columns elements, each consisting of rows elements. | |
| void | setAttributeValue (const char *name, GLfloat value) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the attribute called name in the current context to value. | |
| void | setAttributeValue (const char *name, GLfloat x, GLfloat y) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the attribute called name in the current context to the 2D vector (x, y). | |
| void | setAttributeValue (const char *name, GLfloat x, GLfloat y, GLfloat z) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the attribute called name in the current context to the 3D vector (x, y, z). | |
| void | setAttributeValue (const char *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the attribute called name in the current context to the 4D vector (x, y, z, w). | |
| void | setAttributeValue (const char *name, const QVector2D &value) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the attribute called name in the current context to value. | |
| void | setAttributeValue (const char *name, const QVector3D &value) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the attribute called name in the current context to value. | |
| void | setAttributeValue (const char *name, const QVector4D &value) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the attribute called name in the current context to value. | |
| void | setAttributeValue (const char *name, const QColor &value) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the attribute called name in the current context to value. | |
| void | setAttributeValue (const char *name, const GLfloat *values, int columns, int rows) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the attribute called name in the current context to the contents of values, which contains columns elements, each consisting of rows elements. | |
| void | setAttributeArray (int location, const GLfloat *values, int tupleSize, int stride=0) |
| Sets an array of vertex values on the attribute at location in this shader program. | |
| void | setAttributeArray (int location, const QVector2D *values, int stride=0) |
| Sets an array of 2D vertex values on the attribute at location in this shader program. | |
| void | setAttributeArray (int location, const QVector3D *values, int stride=0) |
| Sets an array of 3D vertex values on the attribute at location in this shader program. | |
| void | setAttributeArray (int location, const QVector4D *values, int stride=0) |
| Sets an array of 4D vertex values on the attribute at location in this shader program. | |
| void | setAttributeArray (int location, GLenum type, const void *values, int tupleSize, int stride=0) |
| Sets an array of vertex values on the attribute at location in this shader program. | |
| void | setAttributeArray (const char *name, const GLfloat *values, int tupleSize, int stride=0) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets an array of vertex values on the attribute called name in this shader program. | |
| void | setAttributeArray (const char *name, const QVector2D *values, int stride=0) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets an array of 2D vertex values on the attribute called name in this shader program. | |
| void | setAttributeArray (const char *name, const QVector3D *values, int stride=0) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets an array of 3D vertex values on the attribute called name in this shader program. | |
| void | setAttributeArray (const char *name, const QVector4D *values, int stride=0) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets an array of 4D vertex values on the attribute called name in this shader program. | |
| void | setAttributeArray (const char *name, GLenum type, const void *values, int tupleSize, int stride=0) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets an array of vertex values on the attribute called name in this shader program. | |
| void | setAttributeBuffer (int location, GLenum type, int offset, int tupleSize, int stride=0) |
| Sets an array of vertex values on the attribute at location in this shader program, starting at a specific offset in the currently bound vertex buffer. | |
| void | setAttributeBuffer (const char *name, GLenum type, int offset, int tupleSize, int stride=0) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets an array of vertex values on the attribute called name in this shader program, starting at a specific offset in the currently bound vertex buffer. | |
| void | enableAttributeArray (int location) |
| Enables the vertex array at location in this shader program so that the value set by setAttributeArray() on location will be used by the shader program. | |
| void | enableAttributeArray (const char *name) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Enables the vertex array called name in this shader program so that the value set by setAttributeArray() on name will be used by the shader program. | |
| void | disableAttributeArray (int location) |
| Disables the vertex array at location in this shader program that was enabled by a previous call to enableAttributeArray(). | |
| void | disableAttributeArray (const char *name) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Disables the vertex array called name in this shader program that was enabled by a previous call to enableAttributeArray(). | |
| int | uniformLocation (const char *name) const |
| Returns the location of the uniform variable name within this shader program's parameter list. | |
| int | uniformLocation (const QByteArray &name) const |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Returns the location of the uniform variable name within this shader program's parameter list. | |
| int | uniformLocation (const QString &name) const |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Returns the location of the uniform variable name within this shader program's parameter list. | |
| void | setUniformValue (int location, GLfloat value) |
| Sets the uniform variable at location in the current context to value. | |
| void | setUniformValue (int location, GLint value) |
| Sets the uniform variable at location in the current context to value. | |
| void | setUniformValue (int location, GLuint value) |
| Sets the uniform variable at location in the current context to value. | |
| void | setUniformValue (int location, GLfloat x, GLfloat y) |
| Sets the uniform variable at location in the current context to the 2D vector (x, y). | |
| void | setUniformValue (int location, GLfloat x, GLfloat y, GLfloat z) |
| Sets the uniform variable at location in the current context to the 3D vector (x, y, z). | |
| void | setUniformValue (int location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) |
| Sets the uniform variable at location in the current context to the 4D vector (x, y, z, w). | |
| void | setUniformValue (int location, const QVector2D &value) |
| Sets the uniform variable at location in the current context to value. | |
| void | setUniformValue (int location, const QVector3D &value) |
| Sets the uniform variable at location in the current context to value. | |
| void | setUniformValue (int location, const QVector4D &value) |
| Sets the uniform variable at location in the current context to value. | |
| void | setUniformValue (int location, const QColor &color) |
| Sets the uniform variable at location in the current context to the red, green, blue, and alpha components of color. | |
| void | setUniformValue (int location, const QPoint &point) |
| Sets the uniform variable at location in the current context to the x and y coordinates of point. | |
| void | setUniformValue (int location, const QPointF &point) |
| Sets the uniform variable at location in the current context to the x and y coordinates of point. | |
| void | setUniformValue (int location, const QSize &size) |
| Sets the uniform variable at location in the current context to the width and height of the given size. | |
| void | setUniformValue (int location, const QSizeF &size) |
| Sets the uniform variable at location in the current context to the width and height of the given size. | |
| void | setUniformValue (int location, const QMatrix2x2 &value) |
| Sets the uniform variable at location in the current context to a 2x2 matrix value. | |
| void | setUniformValue (int location, const QMatrix2x3 &value) |
| Sets the uniform variable at location in the current context to a 2x3 matrix value. | |
| void | setUniformValue (int location, const QMatrix2x4 &value) |
| Sets the uniform variable at location in the current context to a 2x4 matrix value. | |
| void | setUniformValue (int location, const QMatrix3x2 &value) |
| Sets the uniform variable at location in the current context to a 3x2 matrix value. | |
| void | setUniformValue (int location, const QMatrix3x3 &value) |
| Sets the uniform variable at location in the current context to a 3x3 matrix value. | |
| void | setUniformValue (int location, const QMatrix3x4 &value) |
| Sets the uniform variable at location in the current context to a 3x4 matrix value. | |
| void | setUniformValue (int location, const QMatrix4x2 &value) |
| Sets the uniform variable at location in the current context to a 4x2 matrix value. | |
| void | setUniformValue (int location, const QMatrix4x3 &value) |
| Sets the uniform variable at location in the current context to a 4x3 matrix value. | |
| void | setUniformValue (int location, const QMatrix4x4 &value) |
| Sets the uniform variable at location in the current context to a 4x4 matrix value. | |
| void | setUniformValue (int location, const GLfloat value[2][2]) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable at location in the current context to a 2x2 matrix value. | |
| void | setUniformValue (int location, const GLfloat value[3][3]) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable at location in the current context to a 3x3 matrix value. | |
| void | setUniformValue (int location, const GLfloat value[4][4]) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable at location in the current context to a 4x4 matrix value. | |
| void | setUniformValue (int location, const QTransform &value) |
| Sets the uniform variable at location in the current context to a 3x3 transformation matrix value that is specified as a QTransform value. | |
| void | setUniformValue (const char *name, GLfloat value) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable called name in the current context to value. | |
| void | setUniformValue (const char *name, GLint value) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable called name in the current context to value. | |
| void | setUniformValue (const char *name, GLuint value) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable called name in the current context to value. | |
| void | setUniformValue (const char *name, GLfloat x, GLfloat y) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable called name in the current context to the 2D vector (x, y). | |
| void | setUniformValue (const char *name, GLfloat x, GLfloat y, GLfloat z) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable called name in the current context to the 3D vector (x, y, z). | |
| void | setUniformValue (const char *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable called name in the current context to the 4D vector (x, y, z, w). | |
| void | setUniformValue (const char *name, const QVector2D &value) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable called name in the current context to value. | |
| void | setUniformValue (const char *name, const QVector3D &value) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable called name in the current context to value. | |
| void | setUniformValue (const char *name, const QVector4D &value) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable called name in the current context to value. | |
| void | setUniformValue (const char *name, const QColor &color) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable called name in the current context to the red, green, blue, and alpha components of color. | |
| void | setUniformValue (const char *name, const QPoint &point) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable associated with name in the current context to the x and y coordinates of point. | |
| void | setUniformValue (const char *name, const QPointF &point) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable associated with name in the current context to the x and y coordinates of point. | |
| void | setUniformValue (const char *name, const QSize &size) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable associated with name in the current context to the width and height of the given size. | |
| void | setUniformValue (const char *name, const QSizeF &size) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable associated with name in the current context to the width and height of the given size. | |
| void | setUniformValue (const char *name, const QMatrix2x2 &value) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable called name in the current context to a 2x2 matrix value. | |
| void | setUniformValue (const char *name, const QMatrix2x3 &value) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable called name in the current context to a 2x3 matrix value. | |
| void | setUniformValue (const char *name, const QMatrix2x4 &value) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable called name in the current context to a 2x4 matrix value. | |
| void | setUniformValue (const char *name, const QMatrix3x2 &value) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable called name in the current context to a 3x2 matrix value. | |
| void | setUniformValue (const char *name, const QMatrix3x3 &value) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable called name in the current context to a 3x3 matrix value. | |
| void | setUniformValue (const char *name, const QMatrix3x4 &value) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable called name in the current context to a 3x4 matrix value. | |
| void | setUniformValue (const char *name, const QMatrix4x2 &value) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable called name in the current context to a 4x2 matrix value. | |
| void | setUniformValue (const char *name, const QMatrix4x3 &value) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable called name in the current context to a 4x3 matrix value. | |
| void | setUniformValue (const char *name, const QMatrix4x4 &value) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable called name in the current context to a 4x4 matrix value. | |
| void | setUniformValue (const char *name, const GLfloat value[2][2]) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable called name in the current context to a 2x2 matrix value. | |
| void | setUniformValue (const char *name, const GLfloat value[3][3]) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable called name in the current context to a 3x3 matrix value. | |
| void | setUniformValue (const char *name, const GLfloat value[4][4]) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable called name in the current context to a 4x4 matrix value. | |
| void | setUniformValue (const char *name, const QTransform &value) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable called name in the current context to a 3x3 transformation matrix value that is specified as a QTransform value. | |
| void | setUniformValueArray (int location, const GLfloat *values, int count, int tupleSize) |
| Sets the uniform variable array at location in the current context to the count elements of values. | |
| void | setUniformValueArray (int location, const GLint *values, int count) |
| Sets the uniform variable array at location in the current context to the count elements of values. | |
| void | setUniformValueArray (int location, const GLuint *values, int count) |
| Sets the uniform variable array at location in the current context to the count elements of values. | |
| void | setUniformValueArray (int location, const QVector2D *values, int count) |
| Sets the uniform variable array at location in the current context to the count 2D vector elements of values. | |
| void | setUniformValueArray (int location, const QVector3D *values, int count) |
| Sets the uniform variable array at location in the current context to the count 3D vector elements of values. | |
| void | setUniformValueArray (int location, const QVector4D *values, int count) |
| Sets the uniform variable array at location in the current context to the count 4D vector elements of values. | |
| void | setUniformValueArray (int location, const QMatrix2x2 *values, int count) |
| Sets the uniform variable array at location in the current context to the count 2x2 matrix elements of values. | |
| void | setUniformValueArray (int location, const QMatrix2x3 *values, int count) |
| Sets the uniform variable array at location in the current context to the count 2x3 matrix elements of values. | |
| void | setUniformValueArray (int location, const QMatrix2x4 *values, int count) |
| Sets the uniform variable array at location in the current context to the count 2x4 matrix elements of values. | |
| void | setUniformValueArray (int location, const QMatrix3x2 *values, int count) |
| Sets the uniform variable array at location in the current context to the count 3x2 matrix elements of values. | |
| void | setUniformValueArray (int location, const QMatrix3x3 *values, int count) |
| Sets the uniform variable array at location in the current context to the count 3x3 matrix elements of values. | |
| void | setUniformValueArray (int location, const QMatrix3x4 *values, int count) |
| Sets the uniform variable array at location in the current context to the count 3x4 matrix elements of values. | |
| void | setUniformValueArray (int location, const QMatrix4x2 *values, int count) |
| Sets the uniform variable array at location in the current context to the count 4x2 matrix elements of values. | |
| void | setUniformValueArray (int location, const QMatrix4x3 *values, int count) |
| Sets the uniform variable array at location in the current context to the count 4x3 matrix elements of values. | |
| void | setUniformValueArray (int location, const QMatrix4x4 *values, int count) |
| Sets the uniform variable array at location in the current context to the count 4x4 matrix elements of values. | |
| void | setUniformValueArray (const char *name, const GLfloat *values, int count, int tupleSize) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable array called name in the current context to the count elements of values. | |
| void | setUniformValueArray (const char *name, const GLint *values, int count) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable array called name in the current context to the count elements of values. | |
| void | setUniformValueArray (const char *name, const GLuint *values, int count) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable array called name in the current context to the count elements of values. | |
| void | setUniformValueArray (const char *name, const QVector2D *values, int count) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable array called name in the current context to the count 2D vector elements of values. | |
| void | setUniformValueArray (const char *name, const QVector3D *values, int count) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable array called name in the current context to the count 3D vector elements of values. | |
| void | setUniformValueArray (const char *name, const QVector4D *values, int count) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable array called name in the current context to the count 4D vector elements of values. | |
| void | setUniformValueArray (const char *name, const QMatrix2x2 *values, int count) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable array called name in the current context to the count 2x2 matrix elements of values. | |
| void | setUniformValueArray (const char *name, const QMatrix2x3 *values, int count) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable array called name in the current context to the count 2x3 matrix elements of values. | |
| void | setUniformValueArray (const char *name, const QMatrix2x4 *values, int count) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable array called name in the current context to the count 2x4 matrix elements of values. | |
| void | setUniformValueArray (const char *name, const QMatrix3x2 *values, int count) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable array called name in the current context to the count 3x2 matrix elements of values. | |
| void | setUniformValueArray (const char *name, const QMatrix3x3 *values, int count) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable array called name in the current context to the count 3x3 matrix elements of values. | |
| void | setUniformValueArray (const char *name, const QMatrix3x4 *values, int count) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable array called name in the current context to the count 3x4 matrix elements of values. | |
| void | setUniformValueArray (const char *name, const QMatrix4x2 *values, int count) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable array called name in the current context to the count 4x2 matrix elements of values. | |
| void | setUniformValueArray (const char *name, const QMatrix4x3 *values, int count) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable array called name in the current context to the count 4x3 matrix elements of values. | |
| void | setUniformValueArray (const char *name, const QMatrix4x4 *values, int count) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable array called name in the current context to the count 4x4 matrix elements of values. | |
| Public Member Functions inherited from QObject | |
| Q_INVOKABLE | QObject (QObject *parent=nullptr) |
| Constructs an object with parent object parent. | |
| virtual | ~QObject () |
| Destroys the object, deleting all its child objects. | |
| virtual bool | event (QEvent *event) |
| This virtual function receives events to an object and should return true if the event e was recognized and processed. | |
| virtual bool | eventFilter (QObject *watched, QEvent *event) |
| Filters events if this object has been installed as an event filter for the watched object. | |
| QString | objectName () const |
| Q_WEAK_OVERLOAD void | setObjectName (const QString &name) |
| Sets the object's name to name. | |
| void | setObjectName (QAnyStringView name) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| QBindable< QString > | bindableObjectName () |
| bool | isWidgetType () const |
Returns true if the object is a widget; otherwise returns false. | |
| bool | isWindowType () const |
Returns true if the object is a window; otherwise returns false. | |
| bool | isQuickItemType () const |
Returns true if the object is a QQuickItem; otherwise returns false. | |
| bool | isQmlExposed () const noexcept |
| Returns whether the object has been created by the QML engine or ownership has been explicitly set via QJSEngine::setObjectOwnership(). | |
| bool | signalsBlocked () const noexcept |
Returns true if signals are blocked; otherwise returns false. | |
| bool | blockSignals (bool b) noexcept |
| If block is true, signals emitted by this object are blocked (i.e., emitting a signal will not invoke anything connected to it). | |
| QThread * | thread () const |
| Returns the thread in which the object lives. | |
| bool | moveToThread (QThread *thread QT6_DECL_NEW_OVERLOAD_TAIL) |
Changes the thread affinity for this object and its children and returns true on success. | |
| int | startTimer (int interval, Qt::TimerType timerType=Qt::CoarseTimer) |
| This is an overloaded function that will start a timer of type timerType and a timeout of interval milliseconds. | |
| int | startTimer (std::chrono::nanoseconds time, Qt::TimerType timerType=Qt::CoarseTimer) |
| void | killTimer (int id) |
| Kills the timer with timer identifier, id. | |
| void | killTimer (Qt::TimerId id) |
| template<typename T> | |
| T | findChild (QAnyStringView aName, Qt::FindChildOptions options=Qt::FindChildrenRecursively) const |
| Returns the child of this object that can be cast into type T and that is called name, or \nullptr if there is no such object. | |
| template<typename T> | |
| QList< T > | findChildren (QAnyStringView aName, Qt::FindChildOptions options=Qt::FindChildrenRecursively) const |
| Returns all children of this object with the given name that can be cast to type T, or an empty list if there are no such objects. | |
| template<typename T> | |
| T | findChild (Qt::FindChildOptions options=Qt::FindChildrenRecursively) const |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| template<typename T> | |
| QList< T > | findChildren (Qt::FindChildOptions options=Qt::FindChildrenRecursively) const |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| const QObjectList & | children () const |
| Returns a list of child objects. | |
| void | setParent (QObject *parent) |
| Makes the object a child of parent. | |
| void | installEventFilter (QObject *filterObj) |
| Installs an event filter filterObj on this object. | |
| void | removeEventFilter (QObject *obj) |
| Removes an event filter object obj from this object. | |
| QMetaObject::Connection | connect (const QObject *sender, const char *signal, const char *member, Qt::ConnectionType type=Qt::AutoConnection) const |
| bool | disconnect (const char *signal=nullptr, const QObject *receiver=nullptr, const char *member=nullptr) const |
| bool | disconnect (const QObject *receiver, const char *member=nullptr) const |
| void | dumpObjectTree () const |
| Dumps a tree of children to the debug output. | |
| void | dumpObjectInfo () const |
| Dumps information about signal connections, etc. | |
| bool | setProperty (const char *name, const QVariant &value) |
| Sets the value of the object's name property to value. | |
| bool | setProperty (const char *name, QVariant &&value) |
| QVariant | property (const char *name) const |
| Returns the value of the object's name property. | |
| QList< QByteArray > | dynamicPropertyNames () const |
| QBindingStorage * | bindingStorage () |
| const QBindingStorage * | bindingStorage () const |
| QObject * | parent () const |
| Returns a pointer to the parent object. | |
| bool | inherits (const char *classname) const |
Returns true if this object is an instance of a class that inherits className or a QObject subclass that inherits className; otherwise returns false. | |
Static Public Member Functions | |
| static bool | hasOpenGLShaderPrograms (QOpenGLContext *context=nullptr) |
Returns true if shader programs written in the OpenGL Shading Language (GLSL) are supported on this system; false otherwise. | |
| Static Public Member Functions inherited from QObject | |
| static QMetaObject::Connection | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection) |
| \threadsafe | |
| static QMetaObject::Connection | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type=Qt::AutoConnection) |
| template<typename Func1, typename Func2> | |
| static QMetaObject::Connection | connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::ContextTypeForFunctor< Func2 >::ContextType *context, Func2 &&slot, Qt::ConnectionType type=Qt::AutoConnection) |
| template<typename Func1, typename Func2> | |
| static QMetaObject::Connection | connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, Func2 &&slot) |
| static bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *member) |
| \threadsafe | |
| static bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &member) |
| static bool | disconnect (const QMetaObject::Connection &) |
| Disconnect a connection. | |
| template<typename Func1, typename Func2> | |
| static bool | disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiver, Func2 slot) |
| template<typename Func1> | |
| static bool | disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const QObject *receiver, void **zero) |
Additional Inherited Members | |
| Public Slots inherited from QObject | |
| void | deleteLater () |
| \threadsafe | |
| Signals inherited from QObject | |
| void | destroyed (QObject *=nullptr) |
| This signal is emitted immediately before the object obj is destroyed, after any instances of QPointer have been notified, and cannot be blocked. | |
| void | objectNameChanged (const QString &objectName, QPrivateSignal) |
| This signal is emitted after the object's name has been changed. | |
| Protected Member Functions inherited from QObject | |
| QObject * | sender () const |
| Returns a pointer to the object that sent the signal, if called in a slot activated by a signal; otherwise it returns \nullptr. | |
| int | senderSignalIndex () const |
| int | receivers (const char *signal) const |
| Returns the number of receivers connected to the signal. | |
| bool | isSignalConnected (const QMetaMethod &signal) const |
| virtual void | timerEvent (QTimerEvent *event) |
| This event handler can be reimplemented in a subclass to receive timer events for the object. | |
| virtual void | childEvent (QChildEvent *event) |
| This event handler can be reimplemented in a subclass to receive child events. | |
| virtual void | customEvent (QEvent *event) |
| This event handler can be reimplemented in a subclass to receive custom events. | |
| virtual void | connectNotify (const QMetaMethod &signal) |
| virtual void | disconnectNotify (const QMetaMethod &signal) |
| QObject (QObjectPrivate &dd, QObject *parent=nullptr) | |
| Protected Attributes inherited from QObject | |
| QScopedPointer< QObjectData > | d_ptr |
| Properties inherited from QObject | |
| QString | objectName |
| the name of this object | |
| Related Symbols inherited from QObject | |
| template< class T > T | qobject_cast (const QObject *object) |
| Returns the given object cast to type T if the object is of type T (or of a subclass); otherwise returns \nullptr. | |
| template< typename T > T | qFindChildqFindChildren (const QObject *obj, const QString &name)() |
| template< typename T > QList< T > | qFindChildrenqFindChildren (const QObject *obj, const QString &name)() |
| QObjectList | |
| \macro Q_CLASSINFO(Name, Value) | |
The QOpenGLShaderProgram class allows OpenGL shader programs to be linked and used.
\inmodule QtOpenGL
Definition at line 70 of file qopenglshaderprogram.h.
Constructs a new shader program and attaches it to parent.
The program will be invalid until addShader() is called.
The shader program will be associated with the current QOpenGLContext.
Definition at line 843 of file qopenglshaderprogram.cpp.
| QOpenGLShaderProgram::~QOpenGLShaderProgram | ( | ) |
Deletes this shader program.
Definition at line 851 of file qopenglshaderprogram.cpp.
| bool QOpenGLShaderProgram::addCacheableShaderFromSourceCode | ( | QOpenGLShader::ShaderType | type, |
| const char * | source ) |
Registers the shader of the specified type and source to this program.
Unlike addShaderFromSourceCode(), this function does not perform compilation. Compilation is deferred to link(), and may not happen at all, because link() may potentially use a program binary from Qt's shader disk cache. This will typically lead to a significant increase in performance.
When the disk cache is disabled, via Qt::AA_DisableShaderDiskCache for example, or the OpenGL context has no support for context binaries, calling this function is equivalent to addShaderFromSourceCode().
Definition at line 1054 of file qopenglshaderprogram.cpp.
| bool QOpenGLShaderProgram::addCacheableShaderFromSourceCode | ( | QOpenGLShader::ShaderType | type, |
| const QByteArray & | source ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Registers the shader of the specified type and source to this program.
Unlike addShaderFromSourceCode(), this function does not perform compilation. Compilation is deferred to link(), and may not happen at all, because link() may potentially use a program binary from Qt's shader disk cache. This will typically lead to a significant increase in performance.
When the disk cache is disabled, via Qt::AA_DisableShaderDiskCache for example, or the OpenGL context has no support for context binaries, calling this function is equivalent to addShaderFromSourceCode().
Definition at line 1123 of file qopenglshaderprogram.cpp.
| bool QOpenGLShaderProgram::addCacheableShaderFromSourceCode | ( | QOpenGLShader::ShaderType | type, |
| const QString & | source ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Registers the shader of the specified type and source to this program.
Unlike addShaderFromSourceCode(), this function does not perform compilation. Compilation is deferred to link(), and may not happen at all, because link() may potentially use a program binary from Qt's shader disk cache. This will typically lead to a significant increase in performance.
When the disk cache is disabled, via Qt::AA_DisableShaderDiskCache for example, or the OpenGL context has no support for context binaries, calling this function is equivalent to addShaderFromSourceCode().
Definition at line 1151 of file qopenglshaderprogram.cpp.
| bool QOpenGLShaderProgram::addCacheableShaderFromSourceFile | ( | QOpenGLShader::ShaderType | type, |
| const QString & | fileName ) |
Registers the shader of the specified type and fileName to this program.
Unlike addShaderFromSourceFile(), this function does not perform compilation. Compilation is deferred to link(), and may not happen at all, because link() may potentially use a program binary from Qt's shader disk cache. This will typically lead to a significant increase in performance.
When the disk cache is disabled, via Qt::AA_DisableShaderDiskCache for example, or the OpenGL context has no support for context binaries, calling this function is equivalent to addShaderFromSourceFile().
Definition at line 1180 of file qopenglshaderprogram.cpp.
| bool QOpenGLShaderProgram::addShader | ( | QOpenGLShader * | shader | ) |
Adds a compiled shader to this shader program.
Returns true if the shader could be added, or false otherwise.
Ownership of the shader object remains with the caller. It will not be deleted when this QOpenGLShaderProgram instance is deleted. This allows the caller to add the same shader to multiple shader programs.
Definition at line 916 of file qopenglshaderprogram.cpp.
| bool QOpenGLShaderProgram::addShaderFromSourceCode | ( | QOpenGLShader::ShaderType | type, |
| const char * | source ) |
Compiles source as a shader of the specified type and adds it to this shader program.
Returns true if compilation was successful, false otherwise. The compilation errors and warnings will be made available via log().
This function is intended to be a short-cut for quickly adding vertex and fragment shaders to a shader program without creating an instance of QOpenGLShader first.
Definition at line 953 of file qopenglshaderprogram.cpp.
| bool QOpenGLShaderProgram::addShaderFromSourceCode | ( | QOpenGLShader::ShaderType | type, |
| const QByteArray & | source ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Compiles source as a shader of the specified type and adds it to this shader program.
Returns true if compilation was successful, false otherwise. The compilation errors and warnings will be made available via log().
This function is intended to be a short-cut for quickly adding vertex and fragment shaders to a shader program without creating an instance of QOpenGLShader first.
Definition at line 983 of file qopenglshaderprogram.cpp.
| bool QOpenGLShaderProgram::addShaderFromSourceCode | ( | QOpenGLShader::ShaderType | type, |
| const QString & | source ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Compiles source as a shader of the specified type and adds it to this shader program.
Returns true if compilation was successful, false otherwise. The compilation errors and warnings will be made available via log().
This function is intended to be a short-cut for quickly adding vertex and fragment shaders to a shader program without creating an instance of QOpenGLShader first.
Definition at line 1003 of file qopenglshaderprogram.cpp.
| bool QOpenGLShaderProgram::addShaderFromSourceFile | ( | QOpenGLShader::ShaderType | type, |
| const QString & | fileName ) |
Compiles the contents of fileName as a shader of the specified type and adds it to this shader program.
Returns true if compilation was successful, false otherwise. The compilation errors and warnings will be made available via log().
This function is intended to be a short-cut for quickly adding vertex and fragment shaders to a shader program without creating an instance of QOpenGLShader first.
Definition at line 1020 of file qopenglshaderprogram.cpp.
| int QOpenGLShaderProgram::attributeLocation | ( | const char * | name | ) | const |
Returns the location of the attribute name within this shader program's parameter list.
Returns -1 if name is not a valid attribute for this shader program.
Definition at line 1493 of file qopenglshaderprogram.cpp.
| int QOpenGLShaderProgram::attributeLocation | ( | const QByteArray & | name | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Returns the location of the attribute name within this shader program's parameter list.
Returns -1 if name is not a valid attribute for this shader program.
Definition at line 1513 of file qopenglshaderprogram.cpp.
| int QOpenGLShaderProgram::attributeLocation | ( | const QString & | name | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Returns the location of the attribute name within this shader program's parameter list.
Returns -1 if name is not a valid attribute for this shader program.
Definition at line 1527 of file qopenglshaderprogram.cpp.
| bool QOpenGLShaderProgram::bind | ( | ) |
Binds this shader program to the active QOpenGLContext and makes it the current shader program.
Any previously bound shader program is released. This is equivalent to calling {glUseProgram()} on programId(). Returns true if the program was successfully bound; false otherwise. If the shader program has not yet been linked, or it needs to be re-linked, this function will call link().
Definition at line 1376 of file qopenglshaderprogram.cpp.
| void QOpenGLShaderProgram::bindAttributeLocation | ( | const char * | name, |
| int | location ) |
Binds the attribute name to the specified location.
This function can be called before or after the program has been linked. Any attributes that have not been explicitly bound when the program is linked will be assigned locations automatically.
When this function is called after the program has been linked, the program will need to be relinked for the change to take effect.
Definition at line 1441 of file qopenglshaderprogram.cpp.
| void QOpenGLShaderProgram::bindAttributeLocation | ( | const QByteArray & | name, |
| int | location ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Binds the attribute name to the specified location.
This function can be called before or after the program has been linked. Any attributes that have not been explicitly bound when the program is linked will be assigned locations automatically.
When this function is called after the program has been linked, the program will need to be relinked for the change to take effect.
Definition at line 1463 of file qopenglshaderprogram.cpp.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Binds the attribute name to the specified location.
This function can be called before or after the program has been linked. Any attributes that have not been explicitly bound when the program is linked will be assigned locations automatically.
When this function is called after the program has been linked, the program will need to be relinked for the change to take effect.
Definition at line 1481 of file qopenglshaderprogram.cpp.
| bool QOpenGLShaderProgram::create | ( | ) |
Requests the shader program's id to be created immediately.
Returns true if successful; false otherwise.
This function is primarily useful when combining QOpenGLShaderProgram with other OpenGL functions that operate directly on the shader program id, like {GL_OES_get_program_binary}.
When the shader program is used normally, the shader program's id will be created on demand.
Definition at line 870 of file qopenglshaderprogram.cpp.
| QList< float > QOpenGLShaderProgram::defaultInnerTessellationLevels | ( | ) | const |
Returns the default inner tessellation levels to be used by the tessellation primitive generator in the event that the tessellation control shader does not output them.
For more details on OpenGL and Tessellation shaders see \l{OpenGL Tessellation Shaders}.
Returns a QList of floats describing the inner tessellation levels. The vector will always have two elements but not all of them make sense for every mode of tessellation.
Definition at line 3670 of file qopenglshaderprogram.cpp.
| QList< float > QOpenGLShaderProgram::defaultOuterTessellationLevels | ( | ) | const |
Returns the default outer tessellation levels to be used by the tessellation primitive generator in the event that the tessellation control shader does not output them.
For more details on OpenGL and Tessellation shaders see \l{OpenGL Tessellation Shaders}.
Returns a QList of floats describing the outer tessellation levels. The vector will always have four elements but not all of them make sense for every mode of tessellation.
Definition at line 3597 of file qopenglshaderprogram.cpp.
| void QOpenGLShaderProgram::disableAttributeArray | ( | const char * | name | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Disables the vertex array called name in this shader program that was enabled by a previous call to enableAttributeArray().
Definition at line 2155 of file qopenglshaderprogram.cpp.
| void QOpenGLShaderProgram::disableAttributeArray | ( | int | location | ) |
Disables the vertex array at location in this shader program that was enabled by a previous call to enableAttributeArray().
Definition at line 2138 of file qopenglshaderprogram.cpp.
| void QOpenGLShaderProgram::enableAttributeArray | ( | const char * | name | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Enables the vertex array called name in this shader program so that the value set by setAttributeArray() on name will be used by the shader program.
Definition at line 2126 of file qopenglshaderprogram.cpp.
| void QOpenGLShaderProgram::enableAttributeArray | ( | int | location | ) |
Enables the vertex array at location in this shader program so that the value set by setAttributeArray() on location will be used by the shader program.
Definition at line 2108 of file qopenglshaderprogram.cpp.
|
static |
Returns true if shader programs written in the OpenGL Shading Language (GLSL) are supported on this system; false otherwise.
The context is used to resolve the GLSL extensions. If context is \nullptr, then QOpenGLContext::currentContext() is used.
Definition at line 3692 of file qopenglshaderprogram.cpp.
| bool QOpenGLShaderProgram::isLinked | ( | ) | const |
Returns true if this shader program has been linked; false otherwise.
Definition at line 1348 of file qopenglshaderprogram.cpp.
|
virtual |
Links together the shaders that were added to this program with addShader().
Returns true if the link was successful or false otherwise. If the link failed, the error messages can be retrieved with log().
Subclasses can override this function to initialize attributes and uniform variables for use in specific shader programs.
If the shader program was already linked, calling this function again will force it to be re-linked.
When shaders were added to this program via addCacheableShaderFromSourceCode() or addCacheableShaderFromSourceFile(), program binaries are supported, and a cached binary is available on disk, actual compilation and linking are skipped. Instead, link() will initialize the program with the binary blob via glProgramBinary(). If there is no cached version of the program or it was generated with a different driver version, the shaders will be compiled from source and the program will get linked normally. This allows seamless upgrading of the graphics drivers, without having to worry about potentially incompatible binary formats.
Definition at line 1294 of file qopenglshaderprogram.cpp.
| QString QOpenGLShaderProgram::log | ( | ) | const |
Returns the errors and warnings that occurred during the last link() or addShader() with explicitly specified source code.
Definition at line 1360 of file qopenglshaderprogram.cpp.
| int QOpenGLShaderProgram::maxGeometryOutputVertices | ( | ) | const |
Returns the hardware limit for how many vertices a geometry shader can output.
Definition at line 3489 of file qopenglshaderprogram.cpp.
| int QOpenGLShaderProgram::patchVertexCount | ( | ) | const |
Returns the number of vertices per-patch to be used when rendering.
Definition at line 3529 of file qopenglshaderprogram.cpp.
| GLuint QOpenGLShaderProgram::programId | ( | ) | const |
Returns the OpenGL identifier associated with this shader program.
Definition at line 1415 of file qopenglshaderprogram.cpp.
| void QOpenGLShaderProgram::release | ( | ) |
Releases the active shader program from the current QOpenGLContext.
This is equivalent to calling {glUseProgram(0)}.
Definition at line 1400 of file qopenglshaderprogram.cpp.
| void QOpenGLShaderProgram::removeAllShaders | ( | ) |
Removes all of the shaders that were added to this program previously.
The QOpenGLShader objects for the shaders will not be deleted if they were constructed externally. QOpenGLShader objects that are constructed internally by QOpenGLShaderProgram will be deleted.
Definition at line 1250 of file qopenglshaderprogram.cpp.
| void QOpenGLShaderProgram::removeShader | ( | QOpenGLShader * | shader | ) |
Removes shader from this shader program.
The object is not deleted.
The shader program must be valid in the current QOpenGLContext.
Definition at line 1214 of file qopenglshaderprogram.cpp.
| void QOpenGLShaderProgram::setAttributeArray | ( | const char * | name, |
| const GLfloat * | values, | ||
| int | tupleSize, | ||
| int | stride = 0 ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets an array of vertex values on the attribute called name in this shader program.
The tupleSize indicates the number of components per vertex (1, 2, 3, or 4), and the stride indicates the number of bytes between vertices. A default stride value of zero indicates that the vertices are densely packed in values.
The array will become active when enableAttributeArray() is called on name. Otherwise the value specified with setAttributeValue() for name will be used.
Definition at line 1945 of file qopenglshaderprogram.cpp.
| void QOpenGLShaderProgram::setAttributeArray | ( | const char * | name, |
| const QVector2D * | values, | ||
| int | stride = 0 ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets an array of 2D vertex values on the attribute called name in this shader program.
The stride indicates the number of bytes between vertices. A default stride value of zero indicates that the vertices are densely packed in values.
The array will become active when enableAttributeArray() is called on name. Otherwise the value specified with setAttributeValue() for name will be used.
Definition at line 1966 of file qopenglshaderprogram.cpp.
| void QOpenGLShaderProgram::setAttributeArray | ( | const char * | name, |
| const QVector3D * | values, | ||
| int | stride = 0 ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets an array of 3D vertex values on the attribute called name in this shader program.
The stride indicates the number of bytes between vertices. A default stride value of zero indicates that the vertices are densely packed in values.
The array will become active when enableAttributeArray() is called on name. Otherwise the value specified with setAttributeValue() for name will be used.
Definition at line 1987 of file qopenglshaderprogram.cpp.
| void QOpenGLShaderProgram::setAttributeArray | ( | const char * | name, |
| const QVector4D * | values, | ||
| int | stride = 0 ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets an array of 4D vertex values on the attribute called name in this shader program.
The stride indicates the number of bytes between vertices. A default stride value of zero indicates that the vertices are densely packed in values.
The array will become active when enableAttributeArray() is called on name. Otherwise the value specified with setAttributeValue() for name will be used.
Definition at line 2008 of file qopenglshaderprogram.cpp.
| void QOpenGLShaderProgram::setAttributeArray | ( | const char * | name, |
| GLenum | type, | ||
| const void * | values, | ||
| int | tupleSize, | ||
| int | stride = 0 ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets an array of vertex values on the attribute called name in this shader program.
The stride indicates the number of bytes between vertices. A default stride value of zero indicates that the vertices are densely packed in values.
The type indicates the type of elements in the values array, usually {GL_FLOAT}, {GL_UNSIGNED_BYTE}, etc. The tupleSize indicates the number of components per vertex: 1, 2, 3, or 4.
The array will become active when enableAttributeArray() is called on the name. Otherwise the value specified with setAttributeValue() for name will be used.
The setAttributeBuffer() function can be used to set the attribute array to an offset within a vertex buffer.
Definition at line 2036 of file qopenglshaderprogram.cpp.
| void QOpenGLShaderProgram::setAttributeArray | ( | int | location, |
| const GLfloat * | values, | ||
| int | tupleSize, | ||
| int | stride = 0 ) |
Sets an array of vertex values on the attribute at location in this shader program.
The tupleSize indicates the number of components per vertex (1, 2, 3, or 4), and the stride indicates the number of bytes between vertices. A default stride value of zero indicates that the vertices are densely packed in values.
The array will become active when enableAttributeArray() is called on the location. Otherwise the value specified with setAttributeValue() for location will be used.
Definition at line 1812 of file qopenglshaderprogram.cpp.
| void QOpenGLShaderProgram::setAttributeArray | ( | int | location, |
| const QVector2D * | values, | ||
| int | stride = 0 ) |
Sets an array of 2D vertex values on the attribute at location in this shader program.
The stride indicates the number of bytes between vertices. A default stride value of zero indicates that the vertices are densely packed in values.
The array will become active when enableAttributeArray() is called on the location. Otherwise the value specified with setAttributeValue() for location will be used.
Definition at line 1836 of file qopenglshaderprogram.cpp.
| void QOpenGLShaderProgram::setAttributeArray | ( | int | location, |
| const QVector3D * | values, | ||
| int | stride = 0 ) |
Sets an array of 3D vertex values on the attribute at location in this shader program.
The stride indicates the number of bytes between vertices. A default stride value of zero indicates that the vertices are densely packed in values.
The array will become active when enableAttributeArray() is called on the location. Otherwise the value specified with setAttributeValue() for location will be used.
Definition at line 1860 of file qopenglshaderprogram.cpp.
| void QOpenGLShaderProgram::setAttributeArray | ( | int | location, |
| const QVector4D * | values, | ||
| int | stride = 0 ) |
Sets an array of 4D vertex values on the attribute at location in this shader program.
The stride indicates the number of bytes between vertices. A default stride value of zero indicates that the vertices are densely packed in values.
The array will become active when enableAttributeArray() is called on the location. Otherwise the value specified with setAttributeValue() for location will be used.
Definition at line 1884 of file qopenglshaderprogram.cpp.
| void QOpenGLShaderProgram::setAttributeArray | ( | int | location, |
| GLenum | type, | ||
| const void * | values, | ||
| int | tupleSize, | ||
| int | stride = 0 ) |
Sets an array of vertex values on the attribute at location in this shader program.
The stride indicates the number of bytes between vertices. A default stride value of zero indicates that the vertices are densely packed in values.
The type indicates the type of elements in the values array, usually {GL_FLOAT}, {GL_UNSIGNED_BYTE}, etc. The tupleSize indicates the number of components per vertex: 1, 2, 3, or 4.
The array will become active when enableAttributeArray() is called on the location. Otherwise the value specified with setAttributeValue() for location will be used.
The setAttributeBuffer() function can be used to set the attribute array to an offset within a vertex buffer.
Definition at line 1918 of file qopenglshaderprogram.cpp.
| void QOpenGLShaderProgram::setAttributeBuffer | ( | const char * | name, |
| GLenum | type, | ||
| int | offset, | ||
| int | tupleSize, | ||
| int | stride = 0 ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets an array of vertex values on the attribute called name in this shader program, starting at a specific offset in the currently bound vertex buffer.
The stride indicates the number of bytes between vertices. A default stride value of zero indicates that the vertices are densely packed in the value array.
The type indicates the type of elements in the vertex value array, usually {GL_FLOAT}, {GL_UNSIGNED_BYTE}, etc. The tupleSize indicates the number of components per vertex: 1, 2, 3, or 4.
The array will become active when enableAttributeArray() is called on the name. Otherwise the value specified with setAttributeValue() for name will be used.
Definition at line 2094 of file qopenglshaderprogram.cpp.
| void QOpenGLShaderProgram::setAttributeBuffer | ( | int | location, |
| GLenum | type, | ||
| int | offset, | ||
| int | tupleSize, | ||
| int | stride = 0 ) |
Sets an array of vertex values on the attribute at location in this shader program, starting at a specific offset in the currently bound vertex buffer.
The stride indicates the number of bytes between vertices. A default stride value of zero indicates that the vertices are densely packed in the value array.
The type indicates the type of elements in the vertex value array, usually {GL_FLOAT}, {GL_UNSIGNED_BYTE}, etc. The tupleSize indicates the number of components per vertex: 1, 2, 3, or 4.
The array will become active when enableAttributeArray() is called on the location. Otherwise the value specified with setAttributeValue() for location will be used.
Definition at line 2063 of file qopenglshaderprogram.cpp.
| void QOpenGLShaderProgram::setAttributeValue | ( | const char * | name, |
| const GLfloat * | values, | ||
| int | columns, | ||
| int | rows ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the attribute called name in the current context to the contents of values, which contains columns elements, each consisting of rows elements.
The rows value should be 1, 2, 3, or 4. This function is typically used to set matrix values and column vectors.
Definition at line 1792 of file qopenglshaderprogram.cpp.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the attribute called name in the current context to value.
Definition at line 1742 of file qopenglshaderprogram.cpp.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the attribute called name in the current context to value.
Definition at line 1664 of file qopenglshaderprogram.cpp.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the attribute called name in the current context to value.
Definition at line 1689 of file qopenglshaderprogram.cpp.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the attribute called name in the current context to value.
Definition at line 1714 of file qopenglshaderprogram.cpp.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the attribute called name in the current context to value.
Definition at line 1551 of file qopenglshaderprogram.cpp.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the attribute called name in the current context to the 2D vector (x, y).
Definition at line 1579 of file qopenglshaderprogram.cpp.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the attribute called name in the current context to the 3D vector (x, y, z).
Definition at line 1609 of file qopenglshaderprogram.cpp.
| void QOpenGLShaderProgram::setAttributeValue | ( | const char * | name, |
| GLfloat | x, | ||
| GLfloat | y, | ||
| GLfloat | z, | ||
| GLfloat | w ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the attribute called name in the current context to the 4D vector (x, y, z, w).
Definition at line 1639 of file qopenglshaderprogram.cpp.
| void QOpenGLShaderProgram::setAttributeValue | ( | int | location, |
| const GLfloat * | values, | ||
| int | columns, | ||
| int | rows ) |
Sets the attribute at location in the current context to the contents of values, which contains columns elements, each consisting of rows elements.
The rows value should be 1, 2, 3, or 4. This function is typically used to set matrix values and column vectors.
Definition at line 1756 of file qopenglshaderprogram.cpp.
Sets the attribute at location in the current context to value.
Definition at line 1724 of file qopenglshaderprogram.cpp.
Sets the attribute at location in the current context to value.
Definition at line 1650 of file qopenglshaderprogram.cpp.
Sets the attribute at location in the current context to value.
Definition at line 1674 of file qopenglshaderprogram.cpp.
Sets the attribute at location in the current context to value.
Definition at line 1699 of file qopenglshaderprogram.cpp.
Sets the attribute at location in the current context to value.
Definition at line 1537 of file qopenglshaderprogram.cpp.
Sets the attribute at location in the current context to the 2D vector (x, y).
Definition at line 1562 of file qopenglshaderprogram.cpp.
Sets the attribute at location in the current context to the 3D vector (x, y, z).
Definition at line 1590 of file qopenglshaderprogram.cpp.
| void QOpenGLShaderProgram::setAttributeValue | ( | int | location, |
| GLfloat | x, | ||
| GLfloat | y, | ||
| GLfloat | z, | ||
| GLfloat | w ) |
Sets the attribute at location in the current context to the 4D vector (x, y, z, w).
Definition at line 1621 of file qopenglshaderprogram.cpp.
Sets the default outer tessellation levels to be used by the tessellation primitive generator in the event that the tessellation control shader does not output them to levels.
For more details on OpenGL and Tessellation shaders see \l{OpenGL Tessellation Shaders}.
The levels argument should be a QList consisting of 2 floats. Not all of the values make sense for all tessellation modes. If you specify a vector with fewer than 2 elements, the remaining elements will be given a default value of 1.
Definition at line 3630 of file qopenglshaderprogram.cpp.
Sets the default outer tessellation levels to be used by the tessellation primitive generator in the event that the tessellation control shader does not output them to levels.
For more details on OpenGL and Tessellation shaders see \l{OpenGL Tessellation Shaders}.
The levels argument should be a QList consisting of 4 floats. Not all of the values make sense for all tessellation modes. If you specify a vector with fewer than 4 elements, the remaining elements will be given a default value of 1.
Definition at line 3557 of file qopenglshaderprogram.cpp.
| void QOpenGLShaderProgram::setPatchVertexCount | ( | int | count | ) |
Use this function to specify to OpenGL the number of vertices in a patch to count.
A patch is a custom OpenGL primitive whose interpretation is entirely defined by the tessellation shader stages. Therefore, calling this function only makes sense when using a QOpenGLShaderProgram containing tessellation stage shaders. When using OpenGL tessellation, the only primitive that can be rendered with {glDraw*()} functions is {GL_PATCHES}.
This is equivalent to calling glPatchParameteri(GL_PATCH_VERTICES, count).
Definition at line 3515 of file qopenglshaderprogram.cpp.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable called name in the current context to a 2x2 matrix value.
The matrix elements must be specified in column-major order.
Definition at line 2950 of file qopenglshaderprogram.cpp.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable called name in the current context to a 3x3 matrix value.
The matrix elements must be specified in column-major order.
Definition at line 2964 of file qopenglshaderprogram.cpp.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable called name in the current context to a 4x4 matrix value.
The matrix elements must be specified in column-major order.
Definition at line 2978 of file qopenglshaderprogram.cpp.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable called name in the current context to the red, green, blue, and alpha components of color.
Definition at line 2486 of file qopenglshaderprogram.cpp.
| void QOpenGLShaderProgram::setUniformValue | ( | const char * | name, |
| const QMatrix2x2 & | value ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable called name in the current context to a 2x2 matrix value.
Definition at line 2628 of file qopenglshaderprogram.cpp.
| void QOpenGLShaderProgram::setUniformValue | ( | const char * | name, |
| const QMatrix2x3 & | value ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable called name in the current context to a 2x3 matrix value.
Definition at line 2662 of file qopenglshaderprogram.cpp.
| void QOpenGLShaderProgram::setUniformValue | ( | const char * | name, |
| const QMatrix2x4 & | value ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable called name in the current context to a 2x4 matrix value.
Definition at line 2696 of file qopenglshaderprogram.cpp.
| void QOpenGLShaderProgram::setUniformValue | ( | const char * | name, |
| const QMatrix3x2 & | value ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable called name in the current context to a 3x2 matrix value.
Definition at line 2730 of file qopenglshaderprogram.cpp.
| void QOpenGLShaderProgram::setUniformValue | ( | const char * | name, |
| const QMatrix3x3 & | value ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable called name in the current context to a 3x3 matrix value.
Definition at line 2756 of file qopenglshaderprogram.cpp.
| void QOpenGLShaderProgram::setUniformValue | ( | const char * | name, |
| const QMatrix3x4 & | value ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable called name in the current context to a 3x4 matrix value.
Definition at line 2790 of file qopenglshaderprogram.cpp.
| void QOpenGLShaderProgram::setUniformValue | ( | const char * | name, |
| const QMatrix4x2 & | value ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable called name in the current context to a 4x2 matrix value.
Definition at line 2824 of file qopenglshaderprogram.cpp.
| void QOpenGLShaderProgram::setUniformValue | ( | const char * | name, |
| const QMatrix4x3 & | value ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable called name in the current context to a 4x3 matrix value.
Definition at line 2858 of file qopenglshaderprogram.cpp.
| void QOpenGLShaderProgram::setUniformValue | ( | const char * | name, |
| const QMatrix4x4 & | value ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable called name in the current context to a 4x4 matrix value.
Definition at line 2884 of file qopenglshaderprogram.cpp.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable associated with name in the current context to the x and y coordinates of point.
Definition at line 2515 of file qopenglshaderprogram.cpp.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable associated with name in the current context to the x and y coordinates of point.
Definition at line 2544 of file qopenglshaderprogram.cpp.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable associated with name in the current context to the width and height of the given size.
Definition at line 2573 of file qopenglshaderprogram.cpp.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable associated with name in the current context to the width and height of the given size.
Definition at line 2602 of file qopenglshaderprogram.cpp.
| void QOpenGLShaderProgram::setUniformValue | ( | const char * | name, |
| const QTransform & | value ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable called name in the current context to a 3x3 transformation matrix value that is specified as a QTransform value.
To set a QTransform value as a 4x4 matrix in a shader, use {setUniformValue(name, QMatrix4x4(value))}.
Definition at line 3013 of file qopenglshaderprogram.cpp.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable called name in the current context to value.
Definition at line 2404 of file qopenglshaderprogram.cpp.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable called name in the current context to value.
Definition at line 2430 of file qopenglshaderprogram.cpp.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable called name in the current context to value.
Definition at line 2456 of file qopenglshaderprogram.cpp.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable called name in the current context to value.
Definition at line 2228 of file qopenglshaderprogram.cpp.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable called name in the current context to the 2D vector (x, y).
Definition at line 2316 of file qopenglshaderprogram.cpp.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable called name in the current context to the 3D vector (x, y, z).
Definition at line 2346 of file qopenglshaderprogram.cpp.
| void QOpenGLShaderProgram::setUniformValue | ( | const char * | name, |
| GLfloat | x, | ||
| GLfloat | y, | ||
| GLfloat | z, | ||
| GLfloat | w ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable called name in the current context to the 4D vector (x, y, z, w).
Definition at line 2377 of file qopenglshaderprogram.cpp.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable called name in the current context to value.
Definition at line 2254 of file qopenglshaderprogram.cpp.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable called name in the current context to value.
This function should be used when setting sampler values.
Definition at line 2287 of file qopenglshaderprogram.cpp.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable at location in the current context to a 2x2 matrix value.
The matrix elements must be specified in column-major order.
Definition at line 2898 of file qopenglshaderprogram.cpp.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable at location in the current context to a 3x3 matrix value.
The matrix elements must be specified in column-major order.
Definition at line 2915 of file qopenglshaderprogram.cpp.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable at location in the current context to a 4x4 matrix value.
The matrix elements must be specified in column-major order.
Definition at line 2932 of file qopenglshaderprogram.cpp.
Sets the uniform variable at location in the current context to the red, green, blue, and alpha components of color.
Definition at line 2467 of file qopenglshaderprogram.cpp.
| void QOpenGLShaderProgram::setUniformValue | ( | int | location, |
| const QMatrix2x2 & | value ) |
Sets the uniform variable at location in the current context to a 2x2 matrix value.
Definition at line 2613 of file qopenglshaderprogram.cpp.
| void QOpenGLShaderProgram::setUniformValue | ( | int | location, |
| const QMatrix2x3 & | value ) |
Sets the uniform variable at location in the current context to a 2x3 matrix value.
Definition at line 2643 of file qopenglshaderprogram.cpp.
| void QOpenGLShaderProgram::setUniformValue | ( | int | location, |
| const QMatrix2x4 & | value ) |
Sets the uniform variable at location in the current context to a 2x4 matrix value.
Definition at line 2677 of file qopenglshaderprogram.cpp.
| void QOpenGLShaderProgram::setUniformValue | ( | int | location, |
| const QMatrix3x2 & | value ) |
Sets the uniform variable at location in the current context to a 3x2 matrix value.
Definition at line 2711 of file qopenglshaderprogram.cpp.
| void QOpenGLShaderProgram::setUniformValue | ( | int | location, |
| const QMatrix3x3 & | value ) |
Sets the uniform variable at location in the current context to a 3x3 matrix value.
Definition at line 2741 of file qopenglshaderprogram.cpp.
| void QOpenGLShaderProgram::setUniformValue | ( | int | location, |
| const QMatrix3x4 & | value ) |
Sets the uniform variable at location in the current context to a 3x4 matrix value.
Definition at line 2771 of file qopenglshaderprogram.cpp.
| void QOpenGLShaderProgram::setUniformValue | ( | int | location, |
| const QMatrix4x2 & | value ) |
Sets the uniform variable at location in the current context to a 4x2 matrix value.
Definition at line 2805 of file qopenglshaderprogram.cpp.
| void QOpenGLShaderProgram::setUniformValue | ( | int | location, |
| const QMatrix4x3 & | value ) |
Sets the uniform variable at location in the current context to a 4x3 matrix value.
Definition at line 2839 of file qopenglshaderprogram.cpp.
| void QOpenGLShaderProgram::setUniformValue | ( | int | location, |
| const QMatrix4x4 & | value ) |
Sets the uniform variable at location in the current context to a 4x4 matrix value.
Definition at line 2869 of file qopenglshaderprogram.cpp.
Sets the uniform variable at location in the current context to the x and y coordinates of point.
Definition at line 2497 of file qopenglshaderprogram.cpp.
Sets the uniform variable at location in the current context to the x and y coordinates of point.
Definition at line 2526 of file qopenglshaderprogram.cpp.
Sets the uniform variable at location in the current context to the width and height of the given size.
Definition at line 2555 of file qopenglshaderprogram.cpp.
Sets the uniform variable at location in the current context to the width and height of the given size.
Definition at line 2584 of file qopenglshaderprogram.cpp.
| void QOpenGLShaderProgram::setUniformValue | ( | int | location, |
| const QTransform & | value ) |
Sets the uniform variable at location in the current context to a 3x3 transformation matrix value that is specified as a QTransform value.
To set a QTransform value as a 4x4 matrix in a shader, use {setUniformValue(location, QMatrix4x4(value))}.
Definition at line 2990 of file qopenglshaderprogram.cpp.
Sets the uniform variable at location in the current context to value.
Definition at line 2388 of file qopenglshaderprogram.cpp.
Sets the uniform variable at location in the current context to value.
Definition at line 2414 of file qopenglshaderprogram.cpp.
Sets the uniform variable at location in the current context to value.
Definition at line 2440 of file qopenglshaderprogram.cpp.
Sets the uniform variable at location in the current context to value.
Definition at line 2212 of file qopenglshaderprogram.cpp.
Sets the uniform variable at location in the current context to the 2D vector (x, y).
Definition at line 2298 of file qopenglshaderprogram.cpp.
Sets the uniform variable at location in the current context to the 3D vector (x, y, z).
Definition at line 2327 of file qopenglshaderprogram.cpp.
| void QOpenGLShaderProgram::setUniformValue | ( | int | location, |
| GLfloat | x, | ||
| GLfloat | y, | ||
| GLfloat | z, | ||
| GLfloat | w ) |
Sets the uniform variable at location in the current context to the 4D vector (x, y, z, w).
Definition at line 2358 of file qopenglshaderprogram.cpp.
Sets the uniform variable at location in the current context to value.
Definition at line 2238 of file qopenglshaderprogram.cpp.
Sets the uniform variable at location in the current context to value.
This function should be used when setting sampler values.
Definition at line 2268 of file qopenglshaderprogram.cpp.
| void QOpenGLShaderProgram::setUniformValueArray | ( | const char * | name, |
| const GLfloat * | values, | ||
| int | count, | ||
| int | tupleSize ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable array called name in the current context to the count elements of values.
Each element has tupleSize components. The tupleSize must be 1, 2, 3, or 4.
Definition at line 3114 of file qopenglshaderprogram.cpp.
| void QOpenGLShaderProgram::setUniformValueArray | ( | const char * | name, |
| const GLint * | values, | ||
| int | count ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable array called name in the current context to the count elements of values.
Definition at line 3041 of file qopenglshaderprogram.cpp.
| void QOpenGLShaderProgram::setUniformValueArray | ( | const char * | name, |
| const GLuint * | values, | ||
| int | count ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable array called name in the current context to the count elements of values.
This overload should be used when setting an array of sampler values.
Definition at line 3074 of file qopenglshaderprogram.cpp.
| void QOpenGLShaderProgram::setUniformValueArray | ( | const char * | name, |
| const QMatrix2x2 * | values, | ||
| int | count ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable array called name in the current context to the count 2x2 matrix elements of values.
Definition at line 3258 of file qopenglshaderprogram.cpp.
| void QOpenGLShaderProgram::setUniformValueArray | ( | const char * | name, |
| const QMatrix2x3 * | values, | ||
| int | count ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable array called name in the current context to the count 2x3 matrix elements of values.
Definition at line 3286 of file qopenglshaderprogram.cpp.
| void QOpenGLShaderProgram::setUniformValueArray | ( | const char * | name, |
| const QMatrix2x4 * | values, | ||
| int | count ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable array called name in the current context to the count 2x4 matrix elements of values.
Definition at line 3314 of file qopenglshaderprogram.cpp.
| void QOpenGLShaderProgram::setUniformValueArray | ( | const char * | name, |
| const QMatrix3x2 * | values, | ||
| int | count ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable array called name in the current context to the count 3x2 matrix elements of values.
Definition at line 3342 of file qopenglshaderprogram.cpp.
| void QOpenGLShaderProgram::setUniformValueArray | ( | const char * | name, |
| const QMatrix3x3 * | values, | ||
| int | count ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable array called name in the current context to the count 3x3 matrix elements of values.
Definition at line 3369 of file qopenglshaderprogram.cpp.
| void QOpenGLShaderProgram::setUniformValueArray | ( | const char * | name, |
| const QMatrix3x4 * | values, | ||
| int | count ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable array called name in the current context to the count 3x4 matrix elements of values.
Definition at line 3397 of file qopenglshaderprogram.cpp.
| void QOpenGLShaderProgram::setUniformValueArray | ( | const char * | name, |
| const QMatrix4x2 * | values, | ||
| int | count ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable array called name in the current context to the count 4x2 matrix elements of values.
Definition at line 3425 of file qopenglshaderprogram.cpp.
| void QOpenGLShaderProgram::setUniformValueArray | ( | const char * | name, |
| const QMatrix4x3 * | values, | ||
| int | count ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable array called name in the current context to the count 4x3 matrix elements of values.
Definition at line 3453 of file qopenglshaderprogram.cpp.
| void QOpenGLShaderProgram::setUniformValueArray | ( | const char * | name, |
| const QMatrix4x4 * | values, | ||
| int | count ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable array called name in the current context to the count 4x4 matrix elements of values.
Definition at line 3480 of file qopenglshaderprogram.cpp.
| void QOpenGLShaderProgram::setUniformValueArray | ( | const char * | name, |
| const QVector2D * | values, | ||
| int | count ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable array called name in the current context to the count 2D vector elements of values.
Definition at line 3142 of file qopenglshaderprogram.cpp.
| void QOpenGLShaderProgram::setUniformValueArray | ( | const char * | name, |
| const QVector3D * | values, | ||
| int | count ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable array called name in the current context to the count 3D vector elements of values.
Definition at line 3169 of file qopenglshaderprogram.cpp.
| void QOpenGLShaderProgram::setUniformValueArray | ( | const char * | name, |
| const QVector4D * | values, | ||
| int | count ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the uniform variable array called name in the current context to the count 4D vector elements of values.
Definition at line 3196 of file qopenglshaderprogram.cpp.
| void QOpenGLShaderProgram::setUniformValueArray | ( | int | location, |
| const GLfloat * | values, | ||
| int | count, | ||
| int | tupleSize ) |
Sets the uniform variable array at location in the current context to the count elements of values.
Each element has tupleSize components. The tupleSize must be 1, 2, 3, or 4.
Definition at line 3087 of file qopenglshaderprogram.cpp.
Sets the uniform variable array at location in the current context to the count elements of values.
Definition at line 3025 of file qopenglshaderprogram.cpp.
Sets the uniform variable array at location in the current context to the count elements of values.
This overload should be used when setting an array of sampler values.
Definition at line 3057 of file qopenglshaderprogram.cpp.
| void QOpenGLShaderProgram::setUniformValueArray | ( | int | location, |
| const QMatrix2x2 * | values, | ||
| int | count ) |
Sets the uniform variable array at location in the current context to the count 2x2 matrix elements of values.
Definition at line 3242 of file qopenglshaderprogram.cpp.
| void QOpenGLShaderProgram::setUniformValueArray | ( | int | location, |
| const QMatrix2x3 * | values, | ||
| int | count ) |
Sets the uniform variable array at location in the current context to the count 2x3 matrix elements of values.
Definition at line 3269 of file qopenglshaderprogram.cpp.
| void QOpenGLShaderProgram::setUniformValueArray | ( | int | location, |
| const QMatrix2x4 * | values, | ||
| int | count ) |
Sets the uniform variable array at location in the current context to the count 2x4 matrix elements of values.
Definition at line 3297 of file qopenglshaderprogram.cpp.
| void QOpenGLShaderProgram::setUniformValueArray | ( | int | location, |
| const QMatrix3x2 * | values, | ||
| int | count ) |
Sets the uniform variable array at location in the current context to the count 3x2 matrix elements of values.
Definition at line 3325 of file qopenglshaderprogram.cpp.
| void QOpenGLShaderProgram::setUniformValueArray | ( | int | location, |
| const QMatrix3x3 * | values, | ||
| int | count ) |
Sets the uniform variable array at location in the current context to the count 3x3 matrix elements of values.
Definition at line 3353 of file qopenglshaderprogram.cpp.
| void QOpenGLShaderProgram::setUniformValueArray | ( | int | location, |
| const QMatrix3x4 * | values, | ||
| int | count ) |
Sets the uniform variable array at location in the current context to the count 3x4 matrix elements of values.
Definition at line 3380 of file qopenglshaderprogram.cpp.
| void QOpenGLShaderProgram::setUniformValueArray | ( | int | location, |
| const QMatrix4x2 * | values, | ||
| int | count ) |
Sets the uniform variable array at location in the current context to the count 4x2 matrix elements of values.
Definition at line 3408 of file qopenglshaderprogram.cpp.
| void QOpenGLShaderProgram::setUniformValueArray | ( | int | location, |
| const QMatrix4x3 * | values, | ||
| int | count ) |
Sets the uniform variable array at location in the current context to the count 4x3 matrix elements of values.
Definition at line 3436 of file qopenglshaderprogram.cpp.
| void QOpenGLShaderProgram::setUniformValueArray | ( | int | location, |
| const QMatrix4x4 * | values, | ||
| int | count ) |
Sets the uniform variable array at location in the current context to the count 4x4 matrix elements of values.
Definition at line 3464 of file qopenglshaderprogram.cpp.
| void QOpenGLShaderProgram::setUniformValueArray | ( | int | location, |
| const QVector2D * | values, | ||
| int | count ) |
Sets the uniform variable array at location in the current context to the count 2D vector elements of values.
Definition at line 3126 of file qopenglshaderprogram.cpp.
| void QOpenGLShaderProgram::setUniformValueArray | ( | int | location, |
| const QVector3D * | values, | ||
| int | count ) |
Sets the uniform variable array at location in the current context to the count 3D vector elements of values.
Definition at line 3153 of file qopenglshaderprogram.cpp.
| void QOpenGLShaderProgram::setUniformValueArray | ( | int | location, |
| const QVector4D * | values, | ||
| int | count ) |
Sets the uniform variable array at location in the current context to the count 4D vector elements of values.
Definition at line 3180 of file qopenglshaderprogram.cpp.
| QList< QOpenGLShader * > QOpenGLShaderProgram::shaders | ( | ) | const |
Returns a list of all shaders that have been added to this shader program using addShader().
Definition at line 1236 of file qopenglshaderprogram.cpp.
| int QOpenGLShaderProgram::uniformLocation | ( | const char * | name | ) | const |
Returns the location of the uniform variable name within this shader program's parameter list.
Returns -1 if name is not a valid uniform variable for this shader program.
Definition at line 2167 of file qopenglshaderprogram.cpp.
| int QOpenGLShaderProgram::uniformLocation | ( | const QByteArray & | name | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Returns the location of the uniform variable name within this shader program's parameter list.
Returns -1 if name is not a valid uniform variable for this shader program.
Definition at line 2188 of file qopenglshaderprogram.cpp.
| int QOpenGLShaderProgram::uniformLocation | ( | const QString & | name | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Returns the location of the uniform variable name within this shader program's parameter list.
Returns -1 if name is not a valid uniform variable for this shader program.
Definition at line 2202 of file qopenglshaderprogram.cpp.