CopperSpice API
1.9.2
|
The QGLShaderProgram class allows OpenGL shader programs to be linked and used. More...
Public Methods | |
QGLShaderProgram (const QGLContext *context, QObject *parent=nullptr) | |
QGLShaderProgram (QObject *parent=nullptr) | |
virtual | ~QGLShaderProgram () |
bool | addShader (QGLShader *shader) |
bool | addShaderFromSourceCode (QGLShader::ShaderType type, const char *source) |
bool | addShaderFromSourceCode (QGLShader::ShaderType type, const QByteArray &source) |
bool | addShaderFromSourceCode (QGLShader::ShaderType type, const QString &source) |
bool | addShaderFromSourceFile (QGLShader::ShaderType type, const QString &fileName) |
int | attributeLocation (const char *name) const |
int | attributeLocation (const QByteArray &name) const |
int | attributeLocation (const QString &name) const |
bool | bind () |
void | bindAttributeLocation (const char *name, int location) |
void | bindAttributeLocation (const QByteArray &name, int location) |
void | bindAttributeLocation (const QString &name, int location) |
void | disableAttributeArray (const char *name) |
void | disableAttributeArray (int location) |
void | enableAttributeArray (const char *name) |
void | enableAttributeArray (int location) |
GLenum | geometryInputType () const |
GLenum | geometryOutputType () const |
int | geometryOutputVertexCount () const |
bool | isLinked () const |
virtual bool | link () |
QString | log () const |
int | maxGeometryOutputVertices () const |
GLuint | programId () const |
void | release () |
void | removeAllShaders () |
void | removeShader (QGLShader *shader) |
void | setAttributeArray (const char *name, const GLfloat *values, int tupleSize, int stride=0) |
void | setAttributeArray (const char *name, const QVector2D *values, int stride=0) |
void | setAttributeArray (const char *name, const QVector3D *values, int stride=0) |
void | setAttributeArray (const char *name, const QVector4D *values, int stride=0) |
void | setAttributeArray (const char *name, GLenum type, const void *values, int tupleSize, int stride=0) |
void | setAttributeArray (int location, const GLfloat *values, int tupleSize, int stride=0) |
void | setAttributeArray (int location, const QVector2D *values, int stride=0) |
void | setAttributeArray (int location, const QVector3D *values, int stride=0) |
void | setAttributeArray (int location, const QVector4D *values, int stride=0) |
void | setAttributeArray (int location, GLenum type, const void *values, int tupleSize, int stride=0) |
void | setAttributeBuffer (const char *name, GLenum type, int offset, int tupleSize, int stride=0) |
void | setAttributeBuffer (int location, GLenum type, int offset, int tupleSize, int stride=0) |
void | setAttributeValue (const char *name, const GLfloat *values, int columns, int rows) |
void | setAttributeValue (const char *name, const QColor &value) |
void | setAttributeValue (const char *name, const QVector2D &value) |
void | setAttributeValue (const char *name, const QVector3D &value) |
void | setAttributeValue (const char *name, const QVector4D &value) |
void | setAttributeValue (const char *name, GLfloat value) |
void | setAttributeValue (const char *name, GLfloat x, GLfloat y) |
void | setAttributeValue (const char *name, GLfloat x, GLfloat y, GLfloat z) |
void | setAttributeValue (const char *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w) |
void | setAttributeValue (int location, const GLfloat *values, int columns, int rows) |
void | setAttributeValue (int location, const QColor &value) |
void | setAttributeValue (int location, const QVector2D &value) |
void | setAttributeValue (int location, const QVector3D &value) |
void | setAttributeValue (int location, const QVector4D &value) |
void | setAttributeValue (int location, GLfloat value) |
void | setAttributeValue (int location, GLfloat x, GLfloat y) |
void | setAttributeValue (int location, GLfloat x, GLfloat y, GLfloat z) |
void | setAttributeValue (int location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) |
void | setGeometryInputType (GLenum inputType) |
void | setGeometryOutputType (GLenum outputType) |
void | setGeometryOutputVertexCount (int count) |
void | setUniformValue (const char *name, const GLfloat value[2][2]) |
void | setUniformValue (const char *name, const GLfloat value[3][3]) |
void | setUniformValue (const char *name, const GLfloat value[4][4]) |
void | setUniformValue (const char *name, const QColor &color) |
void | setUniformValue (const char *name, const QMatrix2x2 &value) |
void | setUniformValue (const char *name, const QMatrix2x3 &value) |
void | setUniformValue (const char *name, const QMatrix2x4 &value) |
void | setUniformValue (const char *name, const QMatrix3x2 &value) |
void | setUniformValue (const char *name, const QMatrix3x3 &value) |
void | setUniformValue (const char *name, const QMatrix3x4 &value) |
void | setUniformValue (const char *name, const QMatrix4x2 &value) |
void | setUniformValue (const char *name, const QMatrix4x3 &value) |
void | setUniformValue (const char *name, const QMatrix4x4 &value) |
void | setUniformValue (const char *name, const QPoint &point) |
void | setUniformValue (const char *name, const QPointF &point) |
void | setUniformValue (const char *name, const QSize &size) |
void | setUniformValue (const char *name, const QSizeF &size) |
void | setUniformValue (const char *name, const QTransform &value) |
void | setUniformValue (const char *name, const QVector2D &value) |
void | setUniformValue (const char *name, const QVector3D &value) |
void | setUniformValue (const char *name, const QVector4D &value) |
void | setUniformValue (const char *name, GLfloat value) |
void | setUniformValue (const char *name, GLfloat x, GLfloat y) |
void | setUniformValue (const char *name, GLfloat x, GLfloat y, GLfloat z) |
void | setUniformValue (const char *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w) |
void | setUniformValue (const char *name, GLint value) |
void | setUniformValue (const char *name, GLuint value) |
void | setUniformValue (int location, const GLfloat value[2][2]) |
void | setUniformValue (int location, const GLfloat value[3][3]) |
void | setUniformValue (int location, const GLfloat value[4][4]) |
void | setUniformValue (int location, const QColor &color) |
void | setUniformValue (int location, const QMatrix2x2 &value) |
void | setUniformValue (int location, const QMatrix2x3 &value) |
void | setUniformValue (int location, const QMatrix2x4 &value) |
void | setUniformValue (int location, const QMatrix3x2 &value) |
void | setUniformValue (int location, const QMatrix3x3 &value) |
void | setUniformValue (int location, const QMatrix3x4 &value) |
void | setUniformValue (int location, const QMatrix4x2 &value) |
void | setUniformValue (int location, const QMatrix4x3 &value) |
void | setUniformValue (int location, const QMatrix4x4 &value) |
void | setUniformValue (int location, const QPoint &point) |
void | setUniformValue (int location, const QPointF &point) |
void | setUniformValue (int location, const QSize &size) |
void | setUniformValue (int location, const QSizeF &size) |
void | setUniformValue (int location, const QTransform &value) |
void | setUniformValue (int location, const QVector2D &value) |
void | setUniformValue (int location, const QVector3D &value) |
void | setUniformValue (int location, const QVector4D &value) |
void | setUniformValue (int location, GLfloat value) |
void | setUniformValue (int location, GLfloat x, GLfloat y) |
void | setUniformValue (int location, GLfloat x, GLfloat y, GLfloat z) |
void | setUniformValue (int location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) |
void | setUniformValue (int location, GLint value) |
void | setUniformValue (int location, GLuint value) |
void | setUniformValueArray (const char *name, const GLfloat *values, int count, int tupleSize) |
void | setUniformValueArray (const char *name, const GLint *values, int count) |
void | setUniformValueArray (const char *name, const GLuint *values, int count) |
void | setUniformValueArray (const char *name, const QMatrix2x2 *values, int count) |
void | setUniformValueArray (const char *name, const QMatrix2x3 *values, int count) |
void | setUniformValueArray (const char *name, const QMatrix2x4 *values, int count) |
void | setUniformValueArray (const char *name, const QMatrix3x2 *values, int count) |
void | setUniformValueArray (const char *name, const QMatrix3x3 *values, int count) |
void | setUniformValueArray (const char *name, const QMatrix3x4 *values, int count) |
void | setUniformValueArray (const char *name, const QMatrix4x2 *values, int count) |
void | setUniformValueArray (const char *name, const QMatrix4x3 *values, int count) |
void | setUniformValueArray (const char *name, const QMatrix4x4 *values, int count) |
void | setUniformValueArray (const char *name, const QVector2D *values, int count) |
void | setUniformValueArray (const char *name, const QVector3D *values, int count) |
void | setUniformValueArray (const char *name, const QVector4D *values, int count) |
void | setUniformValueArray (int location, const GLfloat *values, int count, int tupleSize) |
void | setUniformValueArray (int location, const GLint *values, int count) |
void | setUniformValueArray (int location, const GLuint *values, int count) |
void | setUniformValueArray (int location, const QMatrix2x2 *values, int count) |
void | setUniformValueArray (int location, const QMatrix2x3 *values, int count) |
void | setUniformValueArray (int location, const QMatrix2x4 *values, int count) |
void | setUniformValueArray (int location, const QMatrix3x2 *values, int count) |
void | setUniformValueArray (int location, const QMatrix3x3 *values, int count) |
void | setUniformValueArray (int location, const QMatrix3x4 *values, int count) |
void | setUniformValueArray (int location, const QMatrix4x2 *values, int count) |
void | setUniformValueArray (int location, const QMatrix4x3 *values, int count) |
void | setUniformValueArray (int location, const QMatrix4x4 *values, int count) |
void | setUniformValueArray (int location, const QVector2D *values, int count) |
void | setUniformValueArray (int location, const QVector3D *values, int count) |
void | setUniformValueArray (int location, const QVector4D *values, int count) |
QList< QGLShader * > | shaders () const |
int | uniformLocation (const char *name) const |
int | uniformLocation (const QByteArray &name) const |
int | uniformLocation (const QString &name) const |
Public Methods inherited from QObject | |
QObject (QObject *parent=nullptr) | |
~QObject () | |
bool | blockSignals (bool block) |
const QList< QObject * > & | children () const |
bool | connect (const QObject *sender, const QString &signalMethod, const QString &location, const QString &slotMethod, Qt::ConnectionType type=Qt::AutoConnection) |
bool | connect (const QObject *sender, const QString &signalMethod, const QString &slotMethod, Qt::ConnectionType type=Qt::AutoConnection) |
bool | disconnect (const QObject *receiver, const QString &slotMethod=QString ()) const |
bool | disconnect (const QString &signalMethod, const QString &location, const QObject *receiver=nullptr, const QString &slotMethod=QString ()) const |
bool | disconnect (const QString &signalMethod=QString (), const QObject *receiver=nullptr, const QString &slotMethod=QString ()) const |
void | dumpObjectInfo () |
void | dumpObjectTree () |
QList< QString > | dynamicPropertyNames () const |
virtual bool | event (QEvent *event) |
virtual bool | eventFilter (QObject *watched, QEvent *event) |
template<typename T > | |
T | findChild (const QString &childName=QString ()) const |
template<class T > | |
QList< T > | findChildren (const QRegularExpression ®Exp, Qt::FindChildOptions options=Qt::FindChildrenRecursively) const |
template<class T > | |
QList< T > | findChildren (const QString &childName=QString (), Qt::FindChildOptions options=Qt::FindChildrenRecursively) const |
bool | inherits (const QString &className) const |
void | installEventFilter (QObject *filterObj) |
bool | isWidgetType () const |
bool | isWindowType () const |
void | killTimer (int id) |
const QMetaObject * | metaObject () const |
void | moveToThread (QThread *targetThread) |
QString | objectName () const |
QObject * | parent () const |
template<class T = QVariant> | |
T | property (const QString &name) const |
void | removeEventFilter (QObject *obj) |
void | setObjectName (const QString &name) |
void | setParent (QObject *parent) |
bool | setProperty (const QString &name, const QVariant &value) |
bool | signalsBlocked () const |
int | startTimer (int interval, Qt::TimerType timerType=Qt::CoarseTimer) |
QThread * | thread () const |
Static Public Methods | |
static bool | hasOpenGLShaderPrograms (const QGLContext *context=nullptr) |
Static Public Methods inherited from QObject | |
static bool | connect (const QObject *sender, const QMetaMethod &signalMethod, const QObject *receiver, const QMetaMethod &slotMethod, Qt::ConnectionType type=Qt::AutoConnection) |
static bool | connect (const QObject *sender, const QString &signalMethod, const QObject *receiver, const QString &slotMethod, Qt::ConnectionType type=Qt::AutoConnection, const QString &location=QString ()) |
static bool | connect (const QObject *sender, const QString &signalMethod, const QString &location, const QObject *receiver, const QString &slotMethod, Qt::ConnectionType type=Qt::AutoConnection) |
template<class Sender , class SignalClass , class... SignalArgs, class Receiver , class SlotClass , class... SlotArgs, class SlotReturn > | |
static bool | connect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, SlotReturn (SlotClass::*slotMethod)(SlotArgs...), Qt::ConnectionType type=Qt::AutoConnection) |
template<class Sender , class SignalClass , class... SignalArgs, class Receiver , class T > | |
static bool | connect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, T slotLambda, Qt::ConnectionType type=Qt::AutoConnection) |
static bool | disconnect (const QObject *sender, const QMetaMethod &signalMethod, const QObject *receiver, const QMetaMethod &slotMethod) |
static bool | disconnect (const QObject *sender, const QString &signalMethod, const QObject *receiver, const QString &slotMethod) |
static bool | disconnect (const QObject *sender, const QString &signalMethod, const QString &location, const QObject *receiver, const QString &slotMethod) |
static bool | disconnect (const QObject *sender, std::nullptr_t, const QObject *receiver, std::nullptr_t) |
template<class Sender , class SignalClass , class... SignalArgs, class Receiver , class SlotClass , class... SlotArgs, class SlotReturn > | |
static bool | disconnect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, SlotReturn (SlotClass::*slotMethod)(SlotArgs...)) |
template<class Sender , class SignalClass , class... SignalArgs, class Receiver > | |
static bool | disconnect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, std::nullptr_t slotMethod=nullptr) |
template<class Sender , class SignalClass , class... SignalArgs, class Receiver , class T > | |
static bool | disconnect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, T slotMethod) |
static QMetaObject & | staticMetaObject () |
static QString | tr (const char *text, const char *comment=nullptr, std::optional< int > numArg=std::optional< int >()) |
Additional Inherited Members | |
Public Signals inherited from QObject | |
void | destroyed (QObject *obj=nullptr) |
void | objectNameChanged (const QString &objectName) |
Public Slots inherited from QObject | |
void | deleteLater () |
Protected Methods inherited from QObject | |
virtual void | childEvent (QChildEvent *event) |
virtual void | connectNotify (const QMetaMethod &signalMethod) const |
virtual void | customEvent (QEvent *event) |
virtual void | disconnectNotify (const QMetaMethod &signalMethod) const |
bool | isSignalConnected (const QMetaMethod &signalMethod) const |
int | receivers (const QString &signal) const |
QObject * | sender () const |
int | senderSignalIndex () const |
virtual void | timerEvent (QTimerEvent *event) |
Properties inherited from QObject | |
objectName | |
Related Functions inherited from QObject | |
T | qobject_cast (QObject *object) |
QObjectList | |
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.
|
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.
|
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.
|
virtual |
Deletes this shader program.
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.
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.
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. 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.
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. 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.
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.
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.
int QGLShaderProgram::attributeLocation | ( | const QByteArray & | 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.
int QGLShaderProgram::attributeLocation | ( | const QString & | 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.
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().
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.
void QGLShaderProgram::bindAttributeLocation | ( | const QByteArray & | 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.
void QGLShaderProgram::bindAttributeLocation | ( | const QString & | 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.
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().
void QGLShaderProgram::disableAttributeArray | ( | int | location | ) |
Disables the vertex array at location in this shader program that was enabled by a previous call to enableAttributeArray().
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.
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.
GLenum QGLShaderProgram::geometryInputType | ( | ) | const |
Returns the geometry shader input type, if active.
This parameter takes effect the next time the program is linked.
GLenum QGLShaderProgram::geometryOutputType | ( | ) | const |
Returns the geometry shader output type, if active.
This parameter takes effect the next time the program is linked.
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.
|
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.
bool QGLShaderProgram::isLinked | ( | ) | const |
Returns true if this shader program has been linked; false otherwise.
|
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.
QString QGLShaderProgram::log | ( | ) | const |
Returns the errors and warnings that occurred during the last link() or addShader() with explicitly specified source code.
int QGLShaderProgram::maxGeometryOutputVertices | ( | ) | const |
Returns the hardware limit for how many vertices a geometry shader can output.
GLuint QGLShaderProgram::programId | ( | ) | const |
Returns the OpenGL identifier associated with this shader program.
void QGLShaderProgram::release | ( | ) |
Releases the active shader program from the current QGLContext. This is equivalent to calling glUseProgram(0)
.
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.
void QGLShaderProgram::removeShader | ( | QGLShader * | shader | ) |
Removes shader from this shader program. The object is not deleted.
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. 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.
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. 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.
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. 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.
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. 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.
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. 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.
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.
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.
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.
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.
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.
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. 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.
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.
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. The rows value should be 1, 2, 3, or 4. This function is typically used to set matrix values and column vectors.
void QGLShaderProgram::setAttributeValue | ( | const char * | name, |
const QColor & | value | ||
) |
Sets the attribute called name in the current context to value.
void QGLShaderProgram::setAttributeValue | ( | const char * | name, |
const QVector2D & | value | ||
) |
Sets the attribute called name in the current context to value.
void QGLShaderProgram::setAttributeValue | ( | const char * | name, |
const QVector3D & | value | ||
) |
Sets the attribute called name in the current context to value.
void QGLShaderProgram::setAttributeValue | ( | const char * | name, |
const QVector4D & | value | ||
) |
Sets the attribute called name in the current context to value.
void QGLShaderProgram::setAttributeValue | ( | const char * | name, |
GLfloat | value | ||
) |
Sets the attribute called name in the current context to value.
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).
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).
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).
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.
void QGLShaderProgram::setAttributeValue | ( | int | location, |
const QColor & | value | ||
) |
Sets the attribute at location in the current context to value.
void QGLShaderProgram::setAttributeValue | ( | int | location, |
const QVector2D & | value | ||
) |
Sets the attribute at location in the current context to value.
void QGLShaderProgram::setAttributeValue | ( | int | location, |
const QVector3D & | value | ||
) |
Sets the attribute at location in the current context to value.
void QGLShaderProgram::setAttributeValue | ( | int | location, |
const QVector4D & | value | ||
) |
Sets the attribute at location in the current context to value.
void QGLShaderProgram::setAttributeValue | ( | int | location, |
GLfloat | value | ||
) |
Sets the attribute at location in the current context to value.
void QGLShaderProgram::setAttributeValue | ( | int | location, |
GLfloat | x, | ||
GLfloat | y | ||
) |
Sets the attribute at location in the current context to the 2D vector (x, y).
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).
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).
void QGLShaderProgram::setGeometryInputType | ( | GLenum | inputType | ) |
Sets the input type from inputType.
This parameter takes effect the next time the program is linked.
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.
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.
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. The matrix elements must be specified in column-major order.
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. The matrix elements must be specified in column-major order.
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. The matrix elements must be specified in column-major order.
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.
void QGLShaderProgram::setUniformValue | ( | const char * | name, |
const QMatrix2x2 & | value | ||
) |
Sets the uniform variable called name in the current context to a 2x2 matrix value.
void QGLShaderProgram::setUniformValue | ( | const char * | name, |
const QMatrix2x3 & | value | ||
) |
Sets the uniform variable called name in the current context to a 2x3 matrix value.
void QGLShaderProgram::setUniformValue | ( | const char * | name, |
const QMatrix2x4 & | value | ||
) |
Sets the uniform variable called name in the current context to a 2x4 matrix value.
void QGLShaderProgram::setUniformValue | ( | const char * | name, |
const QMatrix3x2 & | value | ||
) |
Sets the uniform variable called name in the current context to a 3x2 matrix value.
void QGLShaderProgram::setUniformValue | ( | const char * | name, |
const QMatrix3x3 & | value | ||
) |
Sets the uniform variable called name in the current context to a 3x3 matrix value.
void QGLShaderProgram::setUniformValue | ( | const char * | name, |
const QMatrix3x4 & | value | ||
) |
Sets the uniform variable called name in the current context to a 3x4 matrix value.
void QGLShaderProgram::setUniformValue | ( | const char * | name, |
const QMatrix4x2 & | value | ||
) |
Sets the uniform variable called name in the current context to a 4x2 matrix value.
void QGLShaderProgram::setUniformValue | ( | const char * | name, |
const QMatrix4x3 & | value | ||
) |
Sets the uniform variable called name in the current context to a 4x3 matrix value.
void QGLShaderProgram::setUniformValue | ( | const char * | name, |
const QMatrix4x4 & | value | ||
) |
Sets the uniform variable called name in the current context to a 4x4 matrix value.
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.
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.
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.
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.
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.
To set a QTransform value as a 4x4 matrix in a shader, use setUniformValue(name, QMatrix4x4(value))
.
void QGLShaderProgram::setUniformValue | ( | const char * | name, |
const QVector2D & | value | ||
) |
Sets the uniform variable called name in the current context to value.
void QGLShaderProgram::setUniformValue | ( | const char * | name, |
const QVector3D & | value | ||
) |
Sets the uniform variable called name in the current context to value.
void QGLShaderProgram::setUniformValue | ( | const char * | name, |
const QVector4D & | value | ||
) |
Sets the uniform variable called name in the current context to value.
void QGLShaderProgram::setUniformValue | ( | const char * | name, |
GLfloat | value | ||
) |
Sets the uniform variable called name in the current context to value.
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).
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).
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).
void QGLShaderProgram::setUniformValue | ( | const char * | name, |
GLint | value | ||
) |
Sets the uniform variable called name in the current context to value.
void QGLShaderProgram::setUniformValue | ( | const char * | name, |
GLuint | value | ||
) |
Sets the uniform variable called name in the current context to value. This function should be used when setting sampler values.
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. The matrix elements must be specified in column-major order.
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. The matrix elements must be specified in column-major order.
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. The matrix elements must be specified in column-major order.
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.
void QGLShaderProgram::setUniformValue | ( | int | location, |
const QMatrix2x2 & | value | ||
) |
Sets the uniform variable at location in the current context to a 2x2 matrix value.
void QGLShaderProgram::setUniformValue | ( | int | location, |
const QMatrix2x3 & | value | ||
) |
Sets the uniform variable at location in the current context to a 2x3 matrix value.
void QGLShaderProgram::setUniformValue | ( | int | location, |
const QMatrix2x4 & | value | ||
) |
Sets the uniform variable at location in the current context to a 2x4 matrix value.
void QGLShaderProgram::setUniformValue | ( | int | location, |
const QMatrix3x2 & | value | ||
) |
Sets the uniform variable at location in the current context to a 3x2 matrix value.
void QGLShaderProgram::setUniformValue | ( | int | location, |
const QMatrix3x3 & | value | ||
) |
Sets the uniform variable at location in the current context to a 3x3 matrix value.
void QGLShaderProgram::setUniformValue | ( | int | location, |
const QMatrix3x4 & | value | ||
) |
Sets the uniform variable at location in the current context to a 3x4 matrix value.
void QGLShaderProgram::setUniformValue | ( | int | location, |
const QMatrix4x2 & | value | ||
) |
Sets the uniform variable at location in the current context to a 4x2 matrix value.
void QGLShaderProgram::setUniformValue | ( | int | location, |
const QMatrix4x3 & | value | ||
) |
Sets the uniform variable at location in the current context to a 4x3 matrix value.
void QGLShaderProgram::setUniformValue | ( | int | location, |
const QMatrix4x4 & | value | ||
) |
Sets the uniform variable at location in the current context to a 4x4 matrix value.
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.
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.
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.
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.
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))
.
void QGLShaderProgram::setUniformValue | ( | int | location, |
const QVector2D & | value | ||
) |
Sets the uniform variable at location in the current context to value.
void QGLShaderProgram::setUniformValue | ( | int | location, |
const QVector3D & | value | ||
) |
Sets the uniform variable at location in the current context to value.
void QGLShaderProgram::setUniformValue | ( | int | location, |
const QVector4D & | value | ||
) |
Sets the uniform variable at location in the current context to value.
void QGLShaderProgram::setUniformValue | ( | int | location, |
GLfloat | value | ||
) |
Sets the uniform variable at location in the current context to value.
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).
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).
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).
void QGLShaderProgram::setUniformValue | ( | int | location, |
GLint | value | ||
) |
Sets the uniform variable at location in the current context to value.
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.
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. Each element has tupleSize components. The tupleSize must be 1, 2, 3, or 4.
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.
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 overload should be used when setting an array of sampler values.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
Returns a list of all shaders that have been added to this shader program using addShader().
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.
int QGLShaderProgram::uniformLocation | ( | const QByteArray & | 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.
int QGLShaderProgram::uniformLocation | ( | const QString & | 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.