summaryrefslogtreecommitdiffstats
path: root/src/opengl/qglshaderprogram.h
diff options
context:
space:
mode:
authorRhys Weatherley <rhys.weatherley@nokia.com>2010-02-04 01:18:08 (GMT)
committerRhys Weatherley <rhys.weatherley@nokia.com>2010-02-04 02:53:41 (GMT)
commit5cff63b217118e087a6cbd1f27c2a28be83374bb (patch)
tree743df018a919a08fcff191ed108c68d359d21a1d /src/opengl/qglshaderprogram.h
parentda6e8e44ea17da669a173c5cca38ccc77e53dd51 (diff)
downloadQt-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.h13
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);