diff options
author | Rhys Weatherley <rhys.weatherley@nokia.com> | 2010-02-05 05:17:16 (GMT) |
---|---|---|
committer | Rhys Weatherley <rhys.weatherley@nokia.com> | 2010-02-05 05:17:54 (GMT) |
commit | 622446fdd8b6ac14287b65fc640e07819e136a3c (patch) | |
tree | 2a4a7133083128b3335f282c3d7237c9196e4448 /src | |
parent | 7a413f40f8db4f20277f153c1e771da478a5e991 (diff) | |
download | Qt-622446fdd8b6ac14287b65fc640e07819e136a3c.zip Qt-622446fdd8b6ac14287b65fc640e07819e136a3c.tar.gz Qt-622446fdd8b6ac14287b65fc640e07819e136a3c.tar.bz2 |
Add QMacCompatGLenum overrides for new QGLShaderProgram functions
Task-number: QTBUG-7391
Reviewed-by: Sarah Smith
Diffstat (limited to 'src')
-rw-r--r-- | src/opengl/qglshaderprogram.cpp | 28 | ||||
-rw-r--r-- | src/opengl/qglshaderprogram.h | 11 |
2 files changed, 39 insertions, 0 deletions
diff --git a/src/opengl/qglshaderprogram.cpp b/src/opengl/qglshaderprogram.cpp index 80b4872..255d51a 100644 --- a/src/opengl/qglshaderprogram.cpp +++ b/src/opengl/qglshaderprogram.cpp @@ -3078,6 +3078,34 @@ void QGLShaderProgram::shaderDestroyed() #ifdef Q_MAC_COMPAT_GL_FUNCTIONS /*! \internal */ +void QGLShaderProgram::setAttributeArray + (int location, QMacCompatGLenum type, const void *values, int tupleSize, int stride) +{ + setAttributeArray(location, GLenum(type), values, tupleSize, stride); +} + +/*! \internal */ +void QGLShaderProgram::setAttributeArray + (const char *name, QMacCompatGLenum type, const void *values, int tupleSize, int stride) +{ + setAttributeArray(name, GLenum(type), values, tupleSize, stride); +} + +/*! \internal */ +void QGLShaderProgram::setAttributeBuffer + (int location, QMacCompatGLenum type, int offset, int tupleSize, int stride) +{ + setAttributeBuffer(location, GLenum(type), offset, tupleSize, stride); +} + +/*! \internal */ +void QGLShaderProgram::setAttributeBuffer + (const char *name, QMacCompatGLenum type, int offset, int tupleSize, int stride) +{ + setAttributeBuffer(name, GLenum(type), offset, tupleSize, stride); +} + +/*! \internal */ void QGLShaderProgram::setUniformValue(int location, QMacCompatGLint value) { setUniformValue(location, GLint(value)); diff --git a/src/opengl/qglshaderprogram.h b/src/opengl/qglshaderprogram.h index 2500275..19ce9f2 100644 --- a/src/opengl/qglshaderprogram.h +++ b/src/opengl/qglshaderprogram.h @@ -182,6 +182,17 @@ public: void setAttributeBuffer (const char *name, GLenum type, int offset, int tupleSize, int stride = 0); +#ifdef Q_MAC_COMPAT_GL_FUNCTIONS + void setAttributeArray + (int location, QMacCompatGLenum type, const void *values, int tupleSize, int stride = 0); + void setAttributeArray + (const char *name, QMacCompatGLenum type, const void *values, int tupleSize, int stride = 0); + void setAttributeBuffer + (int location, QMacCompatGLenum type, int offset, int tupleSize, int stride = 0); + void setAttributeBuffer + (const char *name, QMacCompatGLenum type, int offset, int tupleSize, int stride = 0); +#endif + void enableAttributeArray(int location); void enableAttributeArray(const char *name); void disableAttributeArray(int location); |