# QGLShaderProgram Class Reference

### [com.trolltech.qt.opengl package]

Inherits QObject.

### Constructor

- void QGLShaderProgram(QObject parent)
- void QGLShaderProgram(QGLContext context, QObject parent)

### Constructor Properties

- prototype: The QGLShaderProgram prototype object
- bool hasOpenGLShaderPrograms(QGLContext context)

### Prototype Object Properties

The QGLShaderProgram prototype object inherits properties from the QObject prototype object and also has the following properties.

- bool addShader(QGLShader shader)
- bool addShaderFromSourceCode(ShaderType type, QByteArray source)
- bool addShaderFromSourceFile(ShaderType type, String fileName)
- int attributeLocation(QByteArray name)
- bool bind()
- void bindAttributeLocation(QByteArray name, int location)
- void disableAttributeArray(char name)
- void enableAttributeArray(char name)
- int geometryOutputVertexCount()
- bool isLinked()
- bool link()
- String log()
- int maxGeometryOutputVertices()
- void release()
- void removeAllShaders()
- void removeShader(QGLShader shader)
- void setAttributeArray_QVector2D(char name, QVector2D values, int stride)
- void setAttributeArray_QVector3D(char name, QVector3D values, int stride)
- void setAttributeArray_QVector4D(char name, QVector4D values, int stride)
- void setAttributeValue(char name, QColor value)
- void setGeometryOutputVertexCount(int count)
- void setUniformValue(char name, QColor color)
- void setUniformValueArray(char name, QMatrix3x3 values, int count)
- void setUniformValueArray_QVector2D(char name, QVector2D values, int count)
- void setUniformValueArray_QVector3D(char name, QVector3D values, int count)
- void setUniformValueArray_QVector4D(char name, QVector4D values, int count)
- List shaders()
- int uniformLocation(QByteArray name)

### Instance Properties

QGLShaderProgram objects have no special properties beyond those inherited from the QGLShaderProgram prototype object.