diff options
author | Rhys Weatherley <rhys.weatherley@nokia.com> | 2010-02-04 01:18:08 (GMT) |
---|---|---|
committer | Rhys Weatherley <rhys.weatherley@nokia.com> | 2010-02-04 02:53:41 (GMT) |
commit | 5cff63b217118e087a6cbd1f27c2a28be83374bb (patch) | |
tree | 743df018a919a08fcff191ed108c68d359d21a1d /src/opengl/qglshaderprogram.h | |
parent | da6e8e44ea17da669a173c5cca38ccc77e53dd51 (diff) | |
download | Qt-5cff63b217118e087a6cbd1f27c2a28be83374bb.zip Qt-5cff63b217118e087a6cbd1f27c2a28be83374bb.tar.gz Qt-5cff63b217118e087a6cbd1f27c2a28be83374bb.tar.bz2 |
Improvements to the QGLShaderProgram API
GLfloat[2][2] & GLfloat[3][3] uniform setters.
Generic overrides to setAttributeArray() for setting the component
type to something other than GL_FLOAT.
setAttributeBuffer() for specifiying offsets within vertex buffers.
Task-number: QTBUG-7391
Reviewed-By: Sarah Smith
Diffstat (limited to 'src/opengl/qglshaderprogram.h')
-rw-r--r-- | src/opengl/qglshaderprogram.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/opengl/qglshaderprogram.h b/src/opengl/qglshaderprogram.h index 215750e..2500275 100644 --- a/src/opengl/qglshaderprogram.h +++ b/src/opengl/qglshaderprogram.h @@ -165,6 +165,8 @@ public: 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 setAttributeArray (const char *name, const GLfloat *values, int tupleSize, int stride = 0); void setAttributeArray (const char *name, const QVector2D *values, int stride = 0); @@ -172,6 +174,13 @@ public: (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 setAttributeBuffer + (int location, GLenum type, int offset, int tupleSize, int stride = 0); + void setAttributeBuffer + (const char *name, GLenum type, int offset, int tupleSize, int stride = 0); void enableAttributeArray(int location); void enableAttributeArray(const char *name); @@ -216,6 +225,8 @@ public: 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 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 QTransform& value); @@ -242,6 +253,8 @@ public: 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 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 QTransform& value); |