Qt 4.8
|
The QGLShaderProgram class allows OpenGL shader programs to be linked and used. More...
#include <qglshaderprogram.h>
Public Functions | |
bool | addShader (QGLShader *shader) |
Adds a compiled shader to this shader program. More... | |
bool | addShaderFromSourceCode (QGLShader::ShaderType type, const char *source) |
Compiles source as a shader of the specified type and adds it to this shader program. More... | |
bool | addShaderFromSourceCode (QGLShader::ShaderType type, const QByteArray &source) |
Compiles source as a shader of the specified type and adds it to this shader program. More... | |
bool | addShaderFromSourceCode (QGLShader::ShaderType type, const QString &source) |
Compiles source as a shader of the specified type and adds it to this shader program. More... | |
bool | addShaderFromSourceFile (QGLShader::ShaderType type, const QString &fileName) |
Compiles the contents of fileName as a shader of the specified type and adds it to this shader program. More... | |
int | attributeLocation (const char *name) const |
Returns the location of the attribute name within this shader program's parameter list. More... | |
int | attributeLocation (const QByteArray &name) const |
Returns the location of the attribute name within this shader program's parameter list. More... | |
int | attributeLocation (const QString &name) const |
Returns the location of the attribute name within this shader program's parameter list. More... | |
bool | bind () |
Binds this shader program to the active QGLContext and makes it the current shader program. More... | |
void | bindAttributeLocation (const char *name, int location) |
Binds the attribute name to the specified location. More... | |
void | bindAttributeLocation (const QByteArray &name, int location) |
Binds the attribute name to the specified location. More... | |
void | bindAttributeLocation (const QString &name, int location) |
Binds the attribute name to the specified location. More... | |
void | disableAttributeArray (int location) |
Disables the vertex array at location in this shader program that was enabled by a previous call to enableAttributeArray(). More... | |
void | disableAttributeArray (const char *name) |
Disables the vertex array called name in this shader program that was enabled by a previous call to enableAttributeArray(). More... | |
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. More... | |
void | enableAttributeArray (const char *name) |
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. More... | |
GLenum | geometryInputType () const |
Returns the geometry shader input type, if active. More... | |
GLenum | geometryOutputType () const |
Returns the geometry shader output type, if active. More... | |
int | geometryOutputVertexCount () const |
Returns the maximum number of vertices the current geometry shader program will produce, if active. More... | |
bool | isLinked () const |
Returns true if this shader program has been linked; false otherwise. More... | |
virtual bool | link () |
Links together the shaders that were added to this program with addShader(). More... | |
QString | log () const |
Returns the errors and warnings that occurred during the last link() or addShader() with explicitly specified source code. More... | |
int | maxGeometryOutputVertices () const |
Returns the hardware limit for how many vertices a geometry shader can output. More... | |
GLuint | programId () const |
Returns the OpenGL identifier associated with this shader program. More... | |
QGLShaderProgram (QObject *parent=0) | |
Constructs a new shader program and attaches it to parent. More... | |
QGLShaderProgram (const QGLContext *context, QObject *parent=0) | |
Constructs a new shader program and attaches it to parent. More... | |
void | release () |
Releases the active shader program from the current QGLContext. More... | |
void | removeAllShaders () |
Removes all of the shaders that were added to this program previously. More... | |
void | removeShader (QGLShader *shader) |
Removes shader from this shader program. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
void | setAttributeArray (const char *name, const GLfloat *values, int tupleSize, int stride=0) |
Sets an array of vertex values on the attribute called name in this shader program. More... | |
void | setAttributeArray (const char *name, const QVector2D *values, int stride=0) |
Sets an array of 2D vertex values on the attribute called name in this shader program. More... | |
void | setAttributeArray (const char *name, const QVector3D *values, int stride=0) |
Sets an array of 3D vertex values on the attribute called name in this shader program. More... | |
void | setAttributeArray (const char *name, const QVector4D *values, int stride=0) |
Sets an array of 4D vertex values on the attribute called name in this shader program. More... | |
void | setAttributeArray (const char *name, GLenum type, const void *values, int tupleSize, int stride=0) |
Sets an array of vertex values on the attribute called name in this shader program. More... | |
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. More... | |
void | setAttributeBuffer (const char *name, GLenum type, int offset, int tupleSize, int stride=0) |
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. More... | |
void | setAttributeValue (int location, GLfloat value) |
Sets the attribute at location in the current context to value. More... | |
void | setAttributeValue (int location, GLfloat x, GLfloat y) |
Sets the attribute at location in the current context to the 2D vector (x, y). More... | |
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). More... | |
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). More... | |
void | setAttributeValue (int location, const QVector2D &value) |
Sets the attribute at location in the current context to value. More... | |
void | setAttributeValue (int location, const QVector3D &value) |
Sets the attribute at location in the current context to value. More... | |
void | setAttributeValue (int location, const QVector4D &value) |
Sets the attribute at location in the current context to value. More... | |
void | setAttributeValue (int location, const QColor &value) |
Sets the attribute at location in the current context to value. More... | |
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. More... | |
void | setAttributeValue (const char *name, GLfloat value) |
Sets the attribute called name in the current context to value. More... | |
void | setAttributeValue (const char *name, GLfloat x, GLfloat y) |
Sets the attribute called name in the current context to the 2D vector (x, y). More... | |
void | setAttributeValue (const char *name, GLfloat x, GLfloat y, GLfloat z) |
Sets the attribute called name in the current context to the 3D vector (x, y, z). More... | |
void | setAttributeValue (const char *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w) |
Sets the attribute called name in the current context to the 4D vector (x, y, z, w). More... | |
void | setAttributeValue (const char *name, const QVector2D &value) |
Sets the attribute called name in the current context to value. More... | |
void | setAttributeValue (const char *name, const QVector3D &value) |
Sets the attribute called name in the current context to value. More... | |
void | setAttributeValue (const char *name, const QVector4D &value) |
Sets the attribute called name in the current context to value. More... | |
void | setAttributeValue (const char *name, const QColor &value) |
Sets the attribute called name in the current context to value. More... | |
void | setAttributeValue (const char *name, const GLfloat *values, int columns, int rows) |
Sets the attribute called name in the current context to the contents of values, which contains columns elements, each consisting of rows elements. More... | |
void | setGeometryInputType (GLenum inputType) |
Sets the input type from inputType. More... | |
void | setGeometryOutputType (GLenum outputType) |
Sets the output type from the geometry shader, if active, to outputType. More... | |
void | setGeometryOutputVertexCount (int count) |
Sets the maximum number of vertices the current geometry shader program will produce, if active, to count. More... | |
void | setUniformValue (int location, GLfloat value) |
Sets the uniform variable at location in the current context to value. More... | |
void | setUniformValue (int location, GLint value) |
Sets the uniform variable at location in the current context to value. More... | |
void | setUniformValue (int location, GLuint value) |
Sets the uniform variable at location in the current context to value. More... | |
void | setUniformValue (int location, GLfloat x, GLfloat y) |
Sets the uniform variable at location in the current context to the 2D vector (x, y). More... | |
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). More... | |
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). More... | |
void | setUniformValue (int location, const QVector2D &value) |
Sets the uniform variable at location in the current context to value. More... | |
void | setUniformValue (int location, const QVector3D &value) |
Sets the uniform variable at location in the current context to value. More... | |
void | setUniformValue (int location, const QVector4D &value) |
Sets the uniform variable at location in the current context to value. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
void | setUniformValue (int location, const QMatrix2x2 &value) |
Sets the uniform variable at location in the current context to a 2x2 matrix value. More... | |
void | setUniformValue (int location, const QMatrix2x3 &value) |
Sets the uniform variable at location in the current context to a 2x3 matrix value. More... | |
void | setUniformValue (int location, const QMatrix2x4 &value) |
Sets the uniform variable at location in the current context to a 2x4 matrix value. More... | |
void | setUniformValue (int location, const QMatrix3x2 &value) |
Sets the uniform variable at location in the current context to a 3x2 matrix value. More... | |
void | setUniformValue (int location, const QMatrix3x3 &value) |
Sets the uniform variable at location in the current context to a 3x3 matrix value. More... | |
void | setUniformValue (int location, const QMatrix3x4 &value) |
Sets the uniform variable at location in the current context to a 3x4 matrix value. More... | |
void | setUniformValue (int location, const QMatrix4x2 &value) |
Sets the uniform variable at location in the current context to a 4x2 matrix value. More... | |
void | setUniformValue (int location, const QMatrix4x3 &value) |
Sets the uniform variable at location in the current context to a 4x3 matrix value. More... | |
void | setUniformValue (int location, const QMatrix4x4 &value) |
Sets the uniform variable at location in the current context to a 4x4 matrix value. More... | |
void | setUniformValue (int location, const GLfloat value[2][2]) |
Sets the uniform variable at location in the current context to a 2x2 matrix value. More... | |
void | setUniformValue (int location, const GLfloat value[3][3]) |
Sets the uniform variable at location in the current context to a 3x3 matrix value. More... | |
void | setUniformValue (int location, const GLfloat value[4][4]) |
Sets the uniform variable at location in the current context to a 4x4 matrix value. More... | |
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. More... | |
void | setUniformValue (const char *name, GLfloat value) |
Sets the uniform variable called name in the current context to value. More... | |
void | setUniformValue (const char *name, GLint value) |
Sets the uniform variable called name in the current context to value. More... | |
void | setUniformValue (const char *name, GLuint value) |
Sets the uniform variable called name in the current context to value. More... | |
void | setUniformValue (const char *name, GLfloat x, GLfloat y) |
Sets the uniform variable called name in the current context to the 2D vector (x, y). More... | |
void | setUniformValue (const char *name, GLfloat x, GLfloat y, GLfloat z) |
Sets the uniform variable called name in the current context to the 3D vector (x, y, z). More... | |
void | setUniformValue (const char *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w) |
Sets the uniform variable called name in the current context to the 4D vector (x, y, z, w). More... | |
void | setUniformValue (const char *name, const QVector2D &value) |
Sets the uniform variable called name in the current context to value. More... | |
void | setUniformValue (const char *name, const QVector3D &value) |
Sets the uniform variable called name in the current context to value. More... | |
void | setUniformValue (const char *name, const QVector4D &value) |
Sets the uniform variable called name in the current context to value. More... | |
void | setUniformValue (const char *name, const QColor &color) |
Sets the uniform variable called name in the current context to the red, green, blue, and alpha components of color. More... | |
void | setUniformValue (const char *name, const QPoint &point) |
Sets the uniform variable associated with name in the current context to the x and y coordinates of point. More... | |
void | setUniformValue (const char *name, const QPointF &point) |
Sets the uniform variable associated with name in the current context to the x and y coordinates of point. More... | |
void | setUniformValue (const char *name, const QSize &size) |
Sets the uniform variable associated with name in the current context to the width and height of the given size. More... | |
void | setUniformValue (const char *name, const QSizeF &size) |
Sets the uniform variable associated with name in the current context to the width and height of the given size. More... | |
void | setUniformValue (const char *name, const QMatrix2x2 &value) |
Sets the uniform variable called name in the current context to a 2x2 matrix value. More... | |
void | setUniformValue (const char *name, const QMatrix2x3 &value) |
Sets the uniform variable called name in the current context to a 2x3 matrix value. More... | |
void | setUniformValue (const char *name, const QMatrix2x4 &value) |
Sets the uniform variable called name in the current context to a 2x4 matrix value. More... | |
void | setUniformValue (const char *name, const QMatrix3x2 &value) |
Sets the uniform variable called name in the current context to a 3x2 matrix value. More... | |
void | setUniformValue (const char *name, const QMatrix3x3 &value) |
Sets the uniform variable called name in the current context to a 3x3 matrix value. More... | |
void | setUniformValue (const char *name, const QMatrix3x4 &value) |
Sets the uniform variable called name in the current context to a 3x4 matrix value. More... | |
void | setUniformValue (const char *name, const QMatrix4x2 &value) |
Sets the uniform variable called name in the current context to a 4x2 matrix value. More... | |
void | setUniformValue (const char *name, const QMatrix4x3 &value) |
Sets the uniform variable called name in the current context to a 4x3 matrix value. More... | |
void | setUniformValue (const char *name, const QMatrix4x4 &value) |
Sets the uniform variable called name in the current context to a 4x4 matrix value. More... | |
void | setUniformValue (const char *name, const GLfloat value[2][2]) |
Sets the uniform variable called name in the current context to a 2x2 matrix value. More... | |
void | setUniformValue (const char *name, const GLfloat value[3][3]) |
Sets the uniform variable called name in the current context to a 3x3 matrix value. More... | |
void | setUniformValue (const char *name, const GLfloat value[4][4]) |
Sets the uniform variable called name in the current context to a 4x4 matrix value. More... | |
void | setUniformValue (const char *name, const QTransform &value) |
Sets the uniform variable called name in the current context to a 3x3 transformation matrix value that is specified as a QTransform value. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
void | setUniformValueArray (const char *name, const GLfloat *values, int count, int tupleSize) |
Sets the uniform variable array called name in the current context to the count elements of values. More... | |
void | setUniformValueArray (const char *name, const GLint *values, int count) |
Sets the uniform variable array called name in the current context to the count elements of values. More... | |
void | setUniformValueArray (const char *name, const GLuint *values, int count) |
Sets the uniform variable array called name in the current context to the count elements of values. More... | |
void | setUniformValueArray (const char *name, const QVector2D *values, int count) |
Sets the uniform variable array called name in the current context to the count 2D vector elements of values. More... | |
void | setUniformValueArray (const char *name, const QVector3D *values, int count) |
Sets the uniform variable array called name in the current context to the count 3D vector elements of values. More... | |
void | setUniformValueArray (const char *name, const QVector4D *values, int count) |
Sets the uniform variable array called name in the current context to the count 4D vector elements of values. More... | |
void | setUniformValueArray (const char *name, const QMatrix2x2 *values, int count) |
Sets the uniform variable array called name in the current context to the count 2x2 matrix elements of values. More... | |
void | setUniformValueArray (const char *name, const QMatrix2x3 *values, int count) |
Sets the uniform variable array called name in the current context to the count 2x3 matrix elements of values. More... | |
void | setUniformValueArray (const char *name, const QMatrix2x4 *values, int count) |
Sets the uniform variable array called name in the current context to the count 2x4 matrix elements of values. More... | |
void | setUniformValueArray (const char *name, const QMatrix3x2 *values, int count) |
Sets the uniform variable array called name in the current context to the count 3x2 matrix elements of values. More... | |
void | setUniformValueArray (const char *name, const QMatrix3x3 *values, int count) |
Sets the uniform variable array called name in the current context to the count 3x3 matrix elements of values. More... | |
void | setUniformValueArray (const char *name, const QMatrix3x4 *values, int count) |
Sets the uniform variable array called name in the current context to the count 3x4 matrix elements of values. More... | |
void | setUniformValueArray (const char *name, const QMatrix4x2 *values, int count) |
Sets the uniform variable array called name in the current context to the count 4x2 matrix elements of values. More... | |
void | setUniformValueArray (const char *name, const QMatrix4x3 *values, int count) |
Sets the uniform variable array called name in the current context to the count 4x3 matrix elements of values. More... | |
void | setUniformValueArray (const char *name, const QMatrix4x4 *values, int count) |
Sets the uniform variable array called name in the current context to the count 4x4 matrix elements of values. More... | |
QList< QGLShader * > | shaders () const |
Returns a list of all shaders that have been added to this shader program using addShader(). More... | |
int | uniformLocation (const char *name) const |
Returns the location of the uniform variable name within this shader program's parameter list. More... | |
int | uniformLocation (const QByteArray &name) const |
Returns the location of the uniform variable name within this shader program's parameter list. More... | |
int | uniformLocation (const QString &name) const |
Returns the location of the uniform variable name within this shader program's parameter list. More... | |
virtual | ~QGLShaderProgram () |
Deletes this shader program. More... | |
Public Functions inherited from QObject | |
bool | blockSignals (bool b) |
If block is true, signals emitted by this object are blocked (i.e., emitting a signal will not invoke anything connected to it). More... | |
const QObjectList & | children () const |
Returns a list of child objects. More... | |
bool | connect (const QObject *sender, const char *signal, const char *member, Qt::ConnectionType type=Qt::AutoConnection) const |
bool | disconnect (const char *signal=0, const QObject *receiver=0, const char *member=0) |
bool | disconnect (const QObject *receiver, const char *member=0) |
void | dumpObjectInfo () |
Dumps information about signal connections, etc. More... | |
void | dumpObjectTree () |
Dumps a tree of children to the debug output. More... | |
QList< QByteArray > | dynamicPropertyNames () const |
Returns the names of all properties that were dynamically added to the object using setProperty(). More... | |
virtual bool | event (QEvent *) |
This virtual function receives events to an object and should return true if the event e was recognized and processed. More... | |
virtual bool | eventFilter (QObject *, QEvent *) |
Filters events if this object has been installed as an event filter for the watched object. More... | |
template<typename T > | |
T | findChild (const QString &aName=QString()) const |
Returns the child of this object that can be cast into type T and that is called name, or 0 if there is no such object. More... | |
template<typename T > | |
QList< T > | findChildren (const QString &aName=QString()) 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. More... | |
template<typename T > | |
QList< T > | findChildren (const QRegExp &re) const |
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. More... | |
void | installEventFilter (QObject *) |
Installs an event filter filterObj on this object. More... | |
bool | isWidgetType () const |
Returns true if the object is a widget; otherwise returns false. More... | |
void | killTimer (int id) |
Kills the timer with timer identifier, id. More... | |
virtual const QMetaObject * | metaObject () const |
Returns a pointer to the meta-object of this object. More... | |
void | moveToThread (QThread *thread) |
Changes the thread affinity for this object and its children. More... | |
QString | objectName () const |
QObject * | parent () const |
Returns a pointer to the parent object. More... | |
QVariant | property (const char *name) const |
Returns the value of the object's name property. More... | |
Q_INVOKABLE | QObject (QObject *parent=0) |
Constructs an object with parent object parent. More... | |
void | removeEventFilter (QObject *) |
Removes an event filter object obj from this object. More... | |
void | setObjectName (const QString &name) |
void | setParent (QObject *) |
Makes the object a child of parent. More... | |
bool | setProperty (const char *name, const QVariant &value) |
Sets the value of the object's name property to value. More... | |
void | setUserData (uint id, QObjectUserData *data) |
bool | signalsBlocked () const |
Returns true if signals are blocked; otherwise returns false. More... | |
int | startTimer (int interval) |
Starts a timer and returns a timer identifier, or returns zero if it could not start a timer. More... | |
QThread * | thread () const |
Returns the thread in which the object lives. More... | |
QObjectUserData * | userData (uint id) const |
virtual | ~QObject () |
Destroys the object, deleting all its child objects. More... | |
Static Public Functions | |
static bool | hasOpenGLShaderPrograms (const QGLContext *context=0) |
Returns true if shader programs written in the OpenGL Shading Language (GLSL) are supported on this system; false otherwise. More... | |
Static Public Functions inherited from QObject | |
static bool | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection) |
Creates a connection of the given type from the signal in the sender object to the method in the receiver object. More... | |
static bool | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type=Qt::AutoConnection) |
static bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *member) |
Disconnects signal in object sender from method in object receiver. More... | |
static bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &member) |
static uint | registerUserData () |
static QString | tr (const char *sourceText, const char *comment=0, int n=-1) |
static QString | trUtf8 (const char *sourceText, const char *comment=0, int n=-1) |
Private Slots | |
void | shaderDestroyed () |
Private Functions | |
bool | init () |
Additional Inherited Members | |
Public Slots inherited from QObject | |
void | deleteLater () |
Schedules this object for deletion. More... | |
Signals inherited from QObject | |
void | destroyed (QObject *=0) |
This signal is emitted immediately before the object obj is destroyed, and can not be blocked. More... | |
Static Public Variables inherited from QObject | |
static const QMetaObject | staticMetaObject |
This variable stores the meta-object for the class. More... | |
Protected Functions inherited from QObject | |
virtual void | childEvent (QChildEvent *) |
This event handler can be reimplemented in a subclass to receive child events. More... | |
virtual void | connectNotify (const char *signal) |
This virtual function is called when something has been connected to signal in this object. More... | |
virtual void | customEvent (QEvent *) |
This event handler can be reimplemented in a subclass to receive custom events. More... | |
virtual void | disconnectNotify (const char *signal) |
This virtual function is called when something has been disconnected from signal in this object. More... | |
QObject (QObjectPrivate &dd, QObject *parent=0) | |
int | receivers (const char *signal) const |
Returns the number of receivers connected to the signal. More... | |
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 0. More... | |
int | senderSignalIndex () const |
virtual void | timerEvent (QTimerEvent *) |
This event handler can be reimplemented in a subclass to receive timer events for the object. More... | |
Protected Variables inherited from QObject | |
QScopedPointer< QObjectData > | d_ptr |
Static Protected Variables inherited from QObject | |
static const QMetaObject | staticQtMetaObject |
Related Functions inherited from QObject | |
T | qFindChildqFindChildren (const QObject *obj, const QString &name)() |
QList< T > | qFindChildrenqFindChildren (const QObject *obj, const QString &name)() |
QList< T > | qFindChildrenqFindChildren (const QObject *obj, const QRegExp ®Exp)() |
T * | qobject_cast (QObject *object) |
QObjectList | |
void * | qt_find_obj_child (QObject *parent, const char *type, const QString &name) |
Returns a pointer to the object named name that inherits type and with a given parent. More... | |
The QGLShaderProgram class allows OpenGL shader programs to be linked and used.
This class supports shader programs written in the OpenGL Shading Language (GLSL) and in the OpenGL/ES Shading Language (GLSL/ES).
QGLShader and QGLShaderProgram shelter the programmer from the details of compiling and linking vertex and fragment shaders.
The following example creates a vertex shader program using the supplied source code
. Once compiled and linked, the shader program is activated in the current QGLContext by calling QGLShaderProgram::bind():
Shader programs can be difficult to reuse across OpenGL implementations because of varying levels of support for standard vertex attributes and uniform variables. In particular, GLSL/ES lacks all of the standard variables that are present on desktop OpenGL systems: gl_Vertex
, gl_Normal
, gl_Color
, and so on. Desktop OpenGL lacks the variable qualifiers highp
, mediump
, and lowp
.
The QGLShaderProgram class makes the process of writing portable shaders easier by prefixing all shader programs with the following lines on desktop OpenGL:
This makes it possible to run most GLSL/ES shader programs on desktop systems. The programmer should restrict themselves to just features that are present in GLSL/ES, and avoid standard variable names that only work on the desktop.
With the above shader program active, we can draw a green triangle as follows:
Binary shaders may be specified using glShaderBinary()
on the return value from QGLShader::shaderId(). The QGLShader instance containing the binary can then be added to the shader program with addShader() and linked in the usual fashion with link().
Binary programs may be specified using glProgramBinaryOES()
on the return value from programId(). Then the application should call link(), which will notice that the program has already been specified and linked, allowing other operations to be performed on the shader program.
Definition at line 114 of file qglshaderprogram.h.
|
explicit |
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 QGLContext.
Definition at line 615 of file qglshaderprogram.cpp.
|
explicit |
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 context.
Definition at line 628 of file qglshaderprogram.cpp.
|
virtual |
bool QGLShaderProgram::addShader | ( | QGLShader * | 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 QGLShaderProgram instance is deleted. This allows the caller to add the same shader to multiple shader programs.
Definition at line 680 of file qglshaderprogram.cpp.
Referenced by addShaderFromSourceCode(), addShaderFromSourceFile(), QGLEngineSharedShaders::findProgramInCache(), QGLEngineSharedShaders::QGLEngineSharedShaders(), and QGLTextureGlyphCache::resizeTextureData().
bool QGLShaderProgram::addShaderFromSourceCode | ( | QGLShader::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 QGLShader first.
Definition at line 718 of file qglshaderprogram.cpp.
Referenced by addShaderFromSourceCode(), and ShaderEffectItem::updateShaderProgram().
bool QGLShaderProgram::addShaderFromSourceCode | ( | QGLShader::ShaderType | type, |
const QByteArray & | source | ||
) |
Compiles source as a shader of the specified type and adds it to this shader program.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
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 QGLShader first.
Definition at line 751 of file qglshaderprogram.cpp.
bool QGLShaderProgram::addShaderFromSourceCode | ( | QGLShader::ShaderType | type, |
const QString & | source | ||
) |
Compiles source as a shader of the specified type and adds it to this shader program.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
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 QGLShader first.
Definition at line 774 of file qglshaderprogram.cpp.
bool QGLShaderProgram::addShaderFromSourceFile | ( | QGLShader::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 QGLShader first.
Definition at line 792 of file qglshaderprogram.cpp.
Referenced by addShaderFromSourceCode().
int QGLShaderProgram::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 1103 of file qglshaderprogram.cpp.
Referenced by attributeLocation(), disableAttributeArray(), enableAttributeArray(), setAttributeArray(), setAttributeBuffer(), and setAttributeValue().
int QGLShaderProgram::attributeLocation | ( | const QByteArray & | name | ) | const |
Returns the location of the attribute name within this shader program's parameter list.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Returns -1 if name is not a valid attribute for this shader program.
Definition at line 1127 of file qglshaderprogram.cpp.
int QGLShaderProgram::attributeLocation | ( | const QString & | name | ) | const |
Returns the location of the attribute name within this shader program's parameter list.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Returns -1 if name is not a valid attribute for this shader program.
Definition at line 1144 of file qglshaderprogram.cpp.
bool QGLShaderProgram::bind | ( | ) |
Binds this shader program to the active QGLContext 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 969 of file qglshaderprogram.cpp.
Referenced by blitTexture(), QGLEngineSharedShaders::findProgramInCache(), ShaderEffectItem::renderEffect(), QGLTextureGlyphCache::resizeTextureData(), ShaderEffectItem::updateShaderProgram(), QGLEngineShaderManager::useBlitProgram(), and QGLEngineShaderManager::useSimpleProgram().
void QGLShaderProgram::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 1045 of file qglshaderprogram.cpp.
Referenced by bindAttributeLocation(), QGLEngineSharedShaders::findProgramInCache(), QGLEngineSharedShaders::QGLEngineSharedShaders(), QGLTextureGlyphCache::resizeTextureData(), and ShaderEffectItem::updateShaderProgram().
void QGLShaderProgram::bindAttributeLocation | ( | const QByteArray & | name, |
int | location | ||
) |
Binds the attribute name to the specified location.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
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 1070 of file qglshaderprogram.cpp.
void QGLShaderProgram::bindAttributeLocation | ( | const QString & | name, |
int | location | ||
) |
Binds the attribute name to the specified location.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
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 1091 of file qglshaderprogram.cpp.
void QGLShaderProgram::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 1805 of file qglshaderprogram.cpp.
Referenced by disableAttributeArray(), ShaderEffectItem::renderEffect(), and QGLTextureGlyphCache::resizeTextureData().
void QGLShaderProgram::disableAttributeArray | ( | const char * | name | ) |
Disables the vertex array called name in this shader program that was enabled by a previous call to enableAttributeArray().
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 1825 of file qglshaderprogram.cpp.
void QGLShaderProgram::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 1772 of file qglshaderprogram.cpp.
Referenced by enableAttributeArray(), ShaderEffectItem::renderEffect(), and QGLTextureGlyphCache::resizeTextureData().
void QGLShaderProgram::enableAttributeArray | ( | const char * | name | ) |
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.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 1793 of file qglshaderprogram.cpp.
GLenum QGLShaderProgram::geometryInputType | ( | ) | const |
Returns the geometry shader input type, if active.
This parameter takes effect the next time the program is linked.
Definition at line 3399 of file qglshaderprogram.cpp.
GLenum QGLShaderProgram::geometryOutputType | ( | ) | const |
Returns the geometry shader output type, if active.
This parameter takes effect the next time the program is linked.
Definition at line 3426 of file qglshaderprogram.cpp.
int QGLShaderProgram::geometryOutputVertexCount | ( | ) | const |
Returns the maximum number of vertices the current geometry shader program will produce, if active.
This parameter takes effect the ntext time the program is linked.
Definition at line 3374 of file qglshaderprogram.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 null, then QGLContext::currentContext() is used.
Definition at line 3439 of file qglshaderprogram.cpp.
Referenced by ShaderEffectItem::paint().
|
private |
Definition at line 640 of file qglshaderprogram.cpp.
Referenced by addShader(), addShaderFromSourceCode(), addShaderFromSourceFile(), bindAttributeLocation(), and programId().
bool QGLShaderProgram::isLinked | ( | ) | const |
Returns true if this shader program has been linked; false otherwise.
Definition at line 941 of file qglshaderprogram.cpp.
Referenced by QGLEngineSharedShaders::findProgramInCache(), QGLEngineSharedShaders::QGLEngineSharedShaders(), ShaderEffectItem::renderEffect(), and ShaderEffectItem::updateShaderProgram().
|
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.
Definition at line 879 of file qglshaderprogram.cpp.
Referenced by bind(), QGLEngineSharedShaders::findProgramInCache(), QGLEngineSharedShaders::QGLEngineSharedShaders(), QGLTextureGlyphCache::resizeTextureData(), and ShaderEffectItem::updateShaderProgram().
QString QGLShaderProgram::log | ( | ) | const |
Returns the errors and warnings that occurred during the last link() or addShader() with explicitly specified source code.
Definition at line 953 of file qglshaderprogram.cpp.
Referenced by QGLEngineSharedShaders::findProgramInCache(), QGLEngineSharedShaders::QGLEngineSharedShaders(), and ShaderEffectItem::updateShaderProgram().
int QGLShaderProgram::maxGeometryOutputVertices | ( | ) | const |
Returns the hardware limit for how many vertices a geometry shader can output.
Definition at line 3338 of file qglshaderprogram.cpp.
Referenced by setGeometryOutputVertexCount().
GLuint QGLShaderProgram::programId | ( | ) | const |
Returns the OpenGL identifier associated with this shader program.
Definition at line 1019 of file qglshaderprogram.cpp.
Referenced by ShaderEffectItem::renderEffect().
void QGLShaderProgram::release | ( | ) |
Releases the active shader program from the current QGLContext.
This is equivalent to calling glUseProgram(0)
.
Definition at line 996 of file qglshaderprogram.cpp.
void QGLShaderProgram::removeAllShaders | ( | ) |
Removes all of the shaders that were added to this program previously.
The QGLShader objects for the shaders will not be deleted if they were constructed externally. QGLShader objects that are constructed internally by QGLShaderProgram will be deleted.
Definition at line 847 of file qglshaderprogram.cpp.
Referenced by ShaderEffectItem::reset().
void QGLShaderProgram::removeShader | ( | QGLShader * | shader | ) |
Removes shader from this shader program.
The object is not deleted.
Definition at line 812 of file qglshaderprogram.cpp.
Referenced by shaderDestroyed().
void QGLShaderProgram::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 1461 of file qglshaderprogram.cpp.
Referenced by ShaderEffectItem::bindGeometry(), QGLShader::hasOpenGLShaders(), setAttributeArray(), and setAttributeValue().
void QGLShaderProgram::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 1485 of file qglshaderprogram.cpp.
void QGLShaderProgram::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 1509 of file qglshaderprogram.cpp.
void QGLShaderProgram::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 1533 of file qglshaderprogram.cpp.
void QGLShaderProgram::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 1565 of file qglshaderprogram.cpp.
void QGLShaderProgram::setAttributeArray | ( | const char * | name, |
const GLfloat * | values, | ||
int | tupleSize, | ||
int | stride = 0 |
||
) |
Sets an array of vertex values on the attribute called name in this shader program.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
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 1595 of file qglshaderprogram.cpp.
void QGLShaderProgram::setAttributeArray | ( | const char * | name, |
const QVector2D * | values, | ||
int | stride = 0 |
||
) |
Sets an array of 2D vertex values on the attribute called name in this shader program.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
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 1619 of file qglshaderprogram.cpp.
void QGLShaderProgram::setAttributeArray | ( | const char * | name, |
const QVector3D * | values, | ||
int | stride = 0 |
||
) |
Sets an array of 3D vertex values on the attribute called name in this shader program.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
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 1643 of file qglshaderprogram.cpp.
void QGLShaderProgram::setAttributeArray | ( | const char * | name, |
const QVector4D * | values, | ||
int | stride = 0 |
||
) |
Sets an array of 4D vertex values on the attribute called name in this shader program.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
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 1667 of file qglshaderprogram.cpp.
void QGLShaderProgram::setAttributeArray | ( | const char * | name, |
GLenum | type, | ||
const void * | values, | ||
int | tupleSize, | ||
int | stride = 0 |
||
) |
Sets an array of vertex values on the attribute called name in this shader program.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
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 1699 of file qglshaderprogram.cpp.
void QGLShaderProgram::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 1724 of file qglshaderprogram.cpp.
Referenced by QGLShader::hasOpenGLShaders(), setAttributeArray(), and setAttributeBuffer().
void QGLShaderProgram::setAttributeBuffer | ( | const char * | name, |
GLenum | type, | ||
int | offset, | ||
int | tupleSize, | ||
int | stride = 0 |
||
) |
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.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
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 1759 of file qglshaderprogram.cpp.
void QGLShaderProgram::setAttributeValue | ( | int | location, |
GLfloat | value | ||
) |
Sets the attribute at location in the current context to value.
Definition at line 1154 of file qglshaderprogram.cpp.
Referenced by setAttributeValue().
void QGLShaderProgram::setAttributeValue | ( | int | location, |
GLfloat | x, | ||
GLfloat | y | ||
) |
Sets the attribute at location in the current context to the 2D vector (x, y).
Definition at line 1183 of file qglshaderprogram.cpp.
void QGLShaderProgram::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).
Definition at line 1216 of file qglshaderprogram.cpp.
void QGLShaderProgram::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 1250 of file qglshaderprogram.cpp.
void QGLShaderProgram::setAttributeValue | ( | int | location, |
const QVector2D & | value | ||
) |
Sets the attribute at location in the current context to value.
Definition at line 1282 of file qglshaderprogram.cpp.
void QGLShaderProgram::setAttributeValue | ( | int | location, |
const QVector3D & | value | ||
) |
Sets the attribute at location in the current context to value.
Definition at line 1310 of file qglshaderprogram.cpp.
void QGLShaderProgram::setAttributeValue | ( | int | location, |
const QVector4D & | value | ||
) |
Sets the attribute at location in the current context to value.
Definition at line 1338 of file qglshaderprogram.cpp.
void QGLShaderProgram::setAttributeValue | ( | int | location, |
const QColor & | value | ||
) |
Sets the attribute at location in the current context to value.
Definition at line 1366 of file qglshaderprogram.cpp.
void QGLShaderProgram::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 1402 of file qglshaderprogram.cpp.
void QGLShaderProgram::setAttributeValue | ( | const char * | name, |
GLfloat | value | ||
) |
Sets the attribute called name in the current context to value.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 1172 of file qglshaderprogram.cpp.
void QGLShaderProgram::setAttributeValue | ( | const char * | name, |
GLfloat | x, | ||
GLfloat | y | ||
) |
Sets the attribute called name in the current context to the 2D vector (x, y).
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 1204 of file qglshaderprogram.cpp.
void QGLShaderProgram::setAttributeValue | ( | const char * | name, |
GLfloat | x, | ||
GLfloat | y, | ||
GLfloat | z | ||
) |
Sets the attribute called name in the current context to the 3D vector (x, y, z).
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 1238 of file qglshaderprogram.cpp.
void QGLShaderProgram::setAttributeValue | ( | const char * | name, |
GLfloat | x, | ||
GLfloat | y, | ||
GLfloat | z, | ||
GLfloat | w | ||
) |
Sets the attribute called name in the current context to the 4D vector (x, y, z, w).
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 1272 of file qglshaderprogram.cpp.
void QGLShaderProgram::setAttributeValue | ( | const char * | name, |
const QVector2D & | value | ||
) |
Sets the attribute called name in the current context to value.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 1300 of file qglshaderprogram.cpp.
void QGLShaderProgram::setAttributeValue | ( | const char * | name, |
const QVector3D & | value | ||
) |
Sets the attribute called name in the current context to value.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 1328 of file qglshaderprogram.cpp.
void QGLShaderProgram::setAttributeValue | ( | const char * | name, |
const QVector4D & | value | ||
) |
Sets the attribute called name in the current context to value.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 1356 of file qglshaderprogram.cpp.
void QGLShaderProgram::setAttributeValue | ( | const char * | name, |
const QColor & | value | ||
) |
Sets the attribute called name in the current context to value.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 1387 of file qglshaderprogram.cpp.
void QGLShaderProgram::setAttributeValue | ( | const char * | name, |
const GLfloat * | values, | ||
int | columns, | ||
int | rows | ||
) |
Sets the attribute called name in the current context to the contents of values, which contains columns elements, each consisting of rows elements.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
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 1441 of file qglshaderprogram.cpp.
void QGLShaderProgram::setGeometryInputType | ( | GLenum | inputType | ) |
Sets the input type from inputType.
This parameter takes effect the next time the program is linked.
Definition at line 3385 of file qglshaderprogram.cpp.
void QGLShaderProgram::setGeometryOutputType | ( | GLenum | outputType | ) |
Sets the output type from the geometry shader, if active, to outputType.
This parameter takes effect the next time the program is linked.
Definition at line 3413 of file qglshaderprogram.cpp.
void QGLShaderProgram::setGeometryOutputVertexCount | ( | int | count | ) |
Sets the maximum number of vertices the current geometry shader program will produce, if active, to count.
This parameter takes effect the next time the program is linked.
Definition at line 3353 of file qglshaderprogram.cpp.
void QGLShaderProgram::setUniformValue | ( | int | location, |
GLfloat | value | ||
) |
Sets the uniform variable at location in the current context to value.
Definition at line 1889 of file qglshaderprogram.cpp.
Referenced by QGL2PaintEngineExPrivate::drawTexture(), QGLEngineSharedShaders::findProgramInCache(), QGLShader::hasOpenGLShaders(), QGL2PaintEngineExPrivate::prepareForDraw(), QGLTextureGlyphCache::resizeTextureData(), QGLPixmapColorizeFilter::setUniforms(), QGLPixmapConvolutionFilter::setUniforms(), QGLPixmapDropShadowFilter::setUniforms(), setUniformValue(), QGL2PaintEngineExPrivate::updateBrushUniforms(), ShaderEffectItem::updateEffectState(), and ShaderEffectItem::updateShaderProgram().
void QGLShaderProgram::setUniformValue | ( | int | location, |
GLint | value | ||
) |
Sets the uniform variable at location in the current context to value.
Definition at line 1918 of file qglshaderprogram.cpp.
void QGLShaderProgram::setUniformValue | ( | int | location, |
GLuint | value | ||
) |
Sets the uniform variable at location in the current context to value.
This function should be used when setting sampler values.
Definition at line 1948 of file qglshaderprogram.cpp.
void QGLShaderProgram::setUniformValue | ( | int | location, |
GLfloat | x, | ||
GLfloat | y | ||
) |
Sets the uniform variable at location in the current context to the 2D vector (x, y).
Definition at line 1978 of file qglshaderprogram.cpp.
void QGLShaderProgram::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).
Definition at line 2011 of file qglshaderprogram.cpp.
void QGLShaderProgram::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 2045 of file qglshaderprogram.cpp.
void QGLShaderProgram::setUniformValue | ( | int | location, |
const QVector2D & | value | ||
) |
Sets the uniform variable at location in the current context to value.
Definition at line 2077 of file qglshaderprogram.cpp.
void QGLShaderProgram::setUniformValue | ( | int | location, |
const QVector3D & | value | ||
) |
Sets the uniform variable at location in the current context to value.
Definition at line 2106 of file qglshaderprogram.cpp.
void QGLShaderProgram::setUniformValue | ( | int | location, |
const QVector4D & | value | ||
) |
Sets the uniform variable at location in the current context to value.
Definition at line 2135 of file qglshaderprogram.cpp.
void QGLShaderProgram::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.
Definition at line 2165 of file qglshaderprogram.cpp.
void QGLShaderProgram::setUniformValue | ( | int | location, |
const QPoint & | point | ||
) |
Sets the uniform variable at location in the current context to the x and y coordinates of point.
Definition at line 2198 of file qglshaderprogram.cpp.
void QGLShaderProgram::setUniformValue | ( | int | location, |
const QPointF & | point | ||
) |
Sets the uniform variable at location in the current context to the x and y coordinates of point.
Definition at line 2230 of file qglshaderprogram.cpp.
void QGLShaderProgram::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.
Definition at line 2262 of file qglshaderprogram.cpp.
void QGLShaderProgram::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.
Definition at line 2294 of file qglshaderprogram.cpp.
void QGLShaderProgram::setUniformValue | ( | int | location, |
const QMatrix2x2 & | value | ||
) |
Sets the uniform variable at location in the current context to a 2x2 matrix value.
Definition at line 2378 of file qglshaderprogram.cpp.
void QGLShaderProgram::setUniformValue | ( | int | location, |
const QMatrix2x3 & | value | ||
) |
Sets the uniform variable at location in the current context to a 2x3 matrix value.
Definition at line 2407 of file qglshaderprogram.cpp.
void QGLShaderProgram::setUniformValue | ( | int | location, |
const QMatrix2x4 & | value | ||
) |
Sets the uniform variable at location in the current context to a 2x4 matrix value.
Definition at line 2437 of file qglshaderprogram.cpp.
void QGLShaderProgram::setUniformValue | ( | int | location, |
const QMatrix3x2 & | value | ||
) |
Sets the uniform variable at location in the current context to a 3x2 matrix value.
Definition at line 2467 of file qglshaderprogram.cpp.
void QGLShaderProgram::setUniformValue | ( | int | location, |
const QMatrix3x3 & | value | ||
) |
Sets the uniform variable at location in the current context to a 3x3 matrix value.
Definition at line 2497 of file qglshaderprogram.cpp.
void QGLShaderProgram::setUniformValue | ( | int | location, |
const QMatrix3x4 & | value | ||
) |
Sets the uniform variable at location in the current context to a 3x4 matrix value.
Definition at line 2526 of file qglshaderprogram.cpp.
void QGLShaderProgram::setUniformValue | ( | int | location, |
const QMatrix4x2 & | value | ||
) |
Sets the uniform variable at location in the current context to a 4x2 matrix value.
Definition at line 2556 of file qglshaderprogram.cpp.
void QGLShaderProgram::setUniformValue | ( | int | location, |
const QMatrix4x3 & | value | ||
) |
Sets the uniform variable at location in the current context to a 4x3 matrix value.
Definition at line 2586 of file qglshaderprogram.cpp.
void QGLShaderProgram::setUniformValue | ( | int | location, |
const QMatrix4x4 & | value | ||
) |
Sets the uniform variable at location in the current context to a 4x4 matrix value.
Definition at line 2616 of file qglshaderprogram.cpp.
void QGLShaderProgram::setUniformValue | ( | int | location, |
const GLfloat | value[2][2] | ||
) |
Sets the uniform variable at location in the current context to a 2x2 matrix value.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
The matrix elements must be specified in column-major order.
Definition at line 2652 of file qglshaderprogram.cpp.
void QGLShaderProgram::setUniformValue | ( | int | location, |
const GLfloat | value[3][3] | ||
) |
Sets the uniform variable at location in the current context to a 3x3 matrix value.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
The matrix elements must be specified in column-major order.
Definition at line 2673 of file qglshaderprogram.cpp.
void QGLShaderProgram::setUniformValue | ( | int | location, |
const GLfloat | value[4][4] | ||
) |
Sets the uniform variable at location in the current context to a 4x4 matrix value.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
The matrix elements must be specified in column-major order.
Definition at line 2693 of file qglshaderprogram.cpp.
void QGLShaderProgram::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 2762 of file qglshaderprogram.cpp.
void QGLShaderProgram::setUniformValue | ( | const char * | name, |
GLfloat | value | ||
) |
Sets the uniform variable called name in the current context to value.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 1908 of file qglshaderprogram.cpp.
void QGLShaderProgram::setUniformValue | ( | const char * | name, |
GLint | value | ||
) |
Sets the uniform variable called name in the current context to value.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 1937 of file qglshaderprogram.cpp.
void QGLShaderProgram::setUniformValue | ( | const char * | name, |
GLuint | value | ||
) |
Sets the uniform variable called name in the current context to value.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
This function should be used when setting sampler values.
Definition at line 1967 of file qglshaderprogram.cpp.
void QGLShaderProgram::setUniformValue | ( | const char * | name, |
GLfloat | x, | ||
GLfloat | y | ||
) |
Sets the uniform variable called name in the current context to the 2D vector (x, y).
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 1999 of file qglshaderprogram.cpp.
void QGLShaderProgram::setUniformValue | ( | const char * | name, |
GLfloat | x, | ||
GLfloat | y, | ||
GLfloat | z | ||
) |
Sets the uniform variable called name in the current context to the 3D vector (x, y, z).
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 2033 of file qglshaderprogram.cpp.
void QGLShaderProgram::setUniformValue | ( | const char * | name, |
GLfloat | x, | ||
GLfloat | y, | ||
GLfloat | z, | ||
GLfloat | w | ||
) |
Sets the uniform variable called name in the current context to the 4D vector (x, y, z, w).
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 2067 of file qglshaderprogram.cpp.
void QGLShaderProgram::setUniformValue | ( | const char * | name, |
const QVector2D & | value | ||
) |
Sets the uniform variable called name in the current context to value.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 2096 of file qglshaderprogram.cpp.
void QGLShaderProgram::setUniformValue | ( | const char * | name, |
const QVector3D & | value | ||
) |
Sets the uniform variable called name in the current context to value.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 2125 of file qglshaderprogram.cpp.
void QGLShaderProgram::setUniformValue | ( | const char * | name, |
const QVector4D & | value | ||
) |
Sets the uniform variable called name in the current context to value.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 2154 of file qglshaderprogram.cpp.
void QGLShaderProgram::setUniformValue | ( | const char * | name, |
const QColor & | color | ||
) |
Sets the uniform variable called name in the current context to the red, green, blue, and alpha components of color.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 2187 of file qglshaderprogram.cpp.
void QGLShaderProgram::setUniformValue | ( | const char * | name, |
const QPoint & | point | ||
) |
Sets the uniform variable associated with name in the current context to the x and y coordinates of point.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 2219 of file qglshaderprogram.cpp.
void QGLShaderProgram::setUniformValue | ( | const char * | name, |
const QPointF & | point | ||
) |
Sets the uniform variable associated with name in the current context to the x and y coordinates of point.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 2251 of file qglshaderprogram.cpp.
void QGLShaderProgram::setUniformValue | ( | const char * | name, |
const QSize & | size | ||
) |
Sets the uniform variable associated with name in the current context to the width and height of the given size.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 2283 of file qglshaderprogram.cpp.
void QGLShaderProgram::setUniformValue | ( | const char * | name, |
const QSizeF & | size | ||
) |
Sets the uniform variable associated with name in the current context to the width and height of the given size.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 2315 of file qglshaderprogram.cpp.
void QGLShaderProgram::setUniformValue | ( | const char * | name, |
const QMatrix2x2 & | value | ||
) |
Sets the uniform variable called name in the current context to a 2x2 matrix value.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 2396 of file qglshaderprogram.cpp.
void QGLShaderProgram::setUniformValue | ( | const char * | name, |
const QMatrix2x3 & | value | ||
) |
Sets the uniform variable called name in the current context to a 2x3 matrix value.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 2426 of file qglshaderprogram.cpp.
void QGLShaderProgram::setUniformValue | ( | const char * | name, |
const QMatrix2x4 & | value | ||
) |
Sets the uniform variable called name in the current context to a 2x4 matrix value.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 2456 of file qglshaderprogram.cpp.
void QGLShaderProgram::setUniformValue | ( | const char * | name, |
const QMatrix3x2 & | value | ||
) |
Sets the uniform variable called name in the current context to a 3x2 matrix value.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 2486 of file qglshaderprogram.cpp.
void QGLShaderProgram::setUniformValue | ( | const char * | name, |
const QMatrix3x3 & | value | ||
) |
Sets the uniform variable called name in the current context to a 3x3 matrix value.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 2515 of file qglshaderprogram.cpp.
void QGLShaderProgram::setUniformValue | ( | const char * | name, |
const QMatrix3x4 & | value | ||
) |
Sets the uniform variable called name in the current context to a 3x4 matrix value.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 2545 of file qglshaderprogram.cpp.
void QGLShaderProgram::setUniformValue | ( | const char * | name, |
const QMatrix4x2 & | value | ||
) |
Sets the uniform variable called name in the current context to a 4x2 matrix value.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 2575 of file qglshaderprogram.cpp.
void QGLShaderProgram::setUniformValue | ( | const char * | name, |
const QMatrix4x3 & | value | ||
) |
Sets the uniform variable called name in the current context to a 4x3 matrix value.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 2605 of file qglshaderprogram.cpp.
void QGLShaderProgram::setUniformValue | ( | const char * | name, |
const QMatrix4x4 & | value | ||
) |
Sets the uniform variable called name in the current context to a 4x4 matrix value.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 2634 of file qglshaderprogram.cpp.
void QGLShaderProgram::setUniformValue | ( | const char * | name, |
const GLfloat | value[2][2] | ||
) |
Sets the uniform variable called name in the current context to a 2x2 matrix value.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
The matrix elements must be specified in column-major order.
Definition at line 2715 of file qglshaderprogram.cpp.
void QGLShaderProgram::setUniformValue | ( | const char * | name, |
const GLfloat | value[3][3] | ||
) |
Sets the uniform variable called name in the current context to a 3x3 matrix value.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
The matrix elements must be specified in column-major order.
Definition at line 2733 of file qglshaderprogram.cpp.
void QGLShaderProgram::setUniformValue | ( | const char * | name, |
const GLfloat | value[4][4] | ||
) |
Sets the uniform variable called name in the current context to a 4x4 matrix value.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
The matrix elements must be specified in column-major order.
Definition at line 2750 of file qglshaderprogram.cpp.
void QGLShaderProgram::setUniformValue | ( | const char * | name, |
const QTransform & | value | ||
) |
Sets the uniform variable called name in the current context to a 3x3 transformation matrix value that is specified as a QTransform value.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
To set a QTransform value as a 4x4 matrix in a shader, use setUniformValue(name, QMatrix4x4(value))
.
Definition at line 2789 of file qglshaderprogram.cpp.
void QGLShaderProgram::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 2865 of file qglshaderprogram.cpp.
Referenced by QGLShader::hasOpenGLShaders(), QGLPixmapConvolutionFilter::setUniforms(), and setUniformValueArray().
void QGLShaderProgram::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.
Definition at line 2800 of file qglshaderprogram.cpp.
void QGLShaderProgram::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.
This overload should be used when setting an array of sampler values.
Definition at line 2832 of file qglshaderprogram.cpp.
void QGLShaderProgram::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 2907 of file qglshaderprogram.cpp.
void QGLShaderProgram::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 2937 of file qglshaderprogram.cpp.
void QGLShaderProgram::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 2967 of file qglshaderprogram.cpp.
void QGLShaderProgram::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 3058 of file qglshaderprogram.cpp.
void QGLShaderProgram::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 3088 of file qglshaderprogram.cpp.
void QGLShaderProgram::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 3119 of file qglshaderprogram.cpp.
void QGLShaderProgram::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 3150 of file qglshaderprogram.cpp.
void QGLShaderProgram::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 3181 of file qglshaderprogram.cpp.
void QGLShaderProgram::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 3211 of file qglshaderprogram.cpp.
void QGLShaderProgram::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 3242 of file qglshaderprogram.cpp.
void QGLShaderProgram::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 3273 of file qglshaderprogram.cpp.
void QGLShaderProgram::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 3304 of file qglshaderprogram.cpp.
void QGLShaderProgram::setUniformValueArray | ( | const char * | name, |
const GLfloat * | values, | ||
int | count, | ||
int | tupleSize | ||
) |
Sets the uniform variable array called name in the current context to the count elements of values.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Each element has tupleSize components. The tupleSize must be 1, 2, 3, or 4.
Definition at line 2896 of file qglshaderprogram.cpp.
void QGLShaderProgram::setUniformValueArray | ( | const char * | name, |
const GLint * | values, | ||
int | count | ||
) |
Sets the uniform variable array called name in the current context to the count elements of values.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 2820 of file qglshaderprogram.cpp.
void QGLShaderProgram::setUniformValueArray | ( | const char * | name, |
const GLuint * | values, | ||
int | count | ||
) |
Sets the uniform variable array called name in the current context to the count elements of values.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
This overload should be used when setting an array of sampler values.
Definition at line 2853 of file qglshaderprogram.cpp.
void QGLShaderProgram::setUniformValueArray | ( | const char * | name, |
const QVector2D * | values, | ||
int | count | ||
) |
Sets the uniform variable array called name in the current context to the count 2D vector elements of values.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 2926 of file qglshaderprogram.cpp.
void QGLShaderProgram::setUniformValueArray | ( | const char * | name, |
const QVector3D * | values, | ||
int | count | ||
) |
Sets the uniform variable array called name in the current context to the count 3D vector elements of values.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 2956 of file qglshaderprogram.cpp.
void QGLShaderProgram::setUniformValueArray | ( | const char * | name, |
const QVector4D * | values, | ||
int | count | ||
) |
Sets the uniform variable array called name in the current context to the count 4D vector elements of values.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 2986 of file qglshaderprogram.cpp.
void QGLShaderProgram::setUniformValueArray | ( | const char * | name, |
const QMatrix2x2 * | values, | ||
int | count | ||
) |
Sets the uniform variable array called name in the current context to the count 2x2 matrix elements of values.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 3077 of file qglshaderprogram.cpp.
void QGLShaderProgram::setUniformValueArray | ( | const char * | name, |
const QMatrix2x3 * | values, | ||
int | count | ||
) |
Sets the uniform variable array called name in the current context to the count 2x3 matrix elements of values.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 3108 of file qglshaderprogram.cpp.
void QGLShaderProgram::setUniformValueArray | ( | const char * | name, |
const QMatrix2x4 * | values, | ||
int | count | ||
) |
Sets the uniform variable array called name in the current context to the count 2x4 matrix elements of values.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 3139 of file qglshaderprogram.cpp.
void QGLShaderProgram::setUniformValueArray | ( | const char * | name, |
const QMatrix3x2 * | values, | ||
int | count | ||
) |
Sets the uniform variable array called name in the current context to the count 3x2 matrix elements of values.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 3170 of file qglshaderprogram.cpp.
void QGLShaderProgram::setUniformValueArray | ( | const char * | name, |
const QMatrix3x3 * | values, | ||
int | count | ||
) |
Sets the uniform variable array called name in the current context to the count 3x3 matrix elements of values.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 3200 of file qglshaderprogram.cpp.
void QGLShaderProgram::setUniformValueArray | ( | const char * | name, |
const QMatrix3x4 * | values, | ||
int | count | ||
) |
Sets the uniform variable array called name in the current context to the count 3x4 matrix elements of values.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 3231 of file qglshaderprogram.cpp.
void QGLShaderProgram::setUniformValueArray | ( | const char * | name, |
const QMatrix4x2 * | values, | ||
int | count | ||
) |
Sets the uniform variable array called name in the current context to the count 4x2 matrix elements of values.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 3262 of file qglshaderprogram.cpp.
void QGLShaderProgram::setUniformValueArray | ( | const char * | name, |
const QMatrix4x3 * | values, | ||
int | count | ||
) |
Sets the uniform variable array called name in the current context to the count 4x3 matrix elements of values.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 3293 of file qglshaderprogram.cpp.
void QGLShaderProgram::setUniformValueArray | ( | const char * | name, |
const QMatrix4x4 * | values, | ||
int | count | ||
) |
Sets the uniform variable array called name in the current context to the count 4x4 matrix elements of values.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 3323 of file qglshaderprogram.cpp.
|
privateslot |
Definition at line 3456 of file qglshaderprogram.cpp.
Referenced by addShader(), and removeShader().
Returns a list of all shaders that have been added to this shader program using addShader().
Definition at line 833 of file qglshaderprogram.cpp.
Referenced by QGLEngineSharedShaders::findProgramInCache().
int QGLShaderProgram::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 1837 of file qglshaderprogram.cpp.
Referenced by QGLEngineSharedShaders::findProgramInCache(), QGLEngineShaderManager::getUniformLocation(), setUniformValue(), setUniformValueArray(), and uniformLocation().
int QGLShaderProgram::uniformLocation | ( | const QByteArray & | name | ) | const |
Returns the location of the uniform variable name within this shader program's parameter list.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Returns -1 if name is not a valid uniform variable for this shader program.
Definition at line 1862 of file qglshaderprogram.cpp.
int QGLShaderProgram::uniformLocation | ( | const QString & | name | ) | const |
Returns the location of the uniform variable name within this shader program's parameter list.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Returns -1 if name is not a valid uniform variable for this shader program.
Definition at line 1879 of file qglshaderprogram.cpp.