From 4ff4935ed49650141dc6cd788bf774cfc7ea945c Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Tue, 22 Apr 2014 16:57:42 +0200 Subject: Document setUniformValue limitations wrt non square matrices MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Task-number: QTBUG-37012 Change-Id: Ife4f16eef22090ae4f6fdc24b69a45142a10d9c9 Reviewed-by: Jørgen Lind Reviewed-by: Gunnar Sletta --- src/gui/opengl/qopenglshaderprogram.cpp | 48 +++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) (limited to 'src') diff --git a/src/gui/opengl/qopenglshaderprogram.cpp b/src/gui/opengl/qopenglshaderprogram.cpp index bfde270446..58cb60ed92 100644 --- a/src/gui/opengl/qopenglshaderprogram.cpp +++ b/src/gui/opengl/qopenglshaderprogram.cpp @@ -2236,6 +2236,10 @@ void QOpenGLShaderProgram::setUniformValue(const char *name, const QMatrix2x2& v Sets the uniform variable at \a location in the current context to a 2x3 matrix \a value. + \note This function is not aware of non square matrix support, + that is, GLSL types like mat2x3, that is present in modern OpenGL + versions. Instead, it treats the uniform as an array of vec3. + \sa setAttributeValue() */ void QOpenGLShaderProgram::setUniformValue(int location, const QMatrix2x3& value) @@ -2251,6 +2255,10 @@ void QOpenGLShaderProgram::setUniformValue(int location, const QMatrix2x3& value Sets the uniform variable called \a name in the current context to a 2x3 matrix \a value. + \note This function is not aware of non square matrix support, + that is, GLSL types like mat2x3, that is present in modern OpenGL + versions. Instead, it treats the uniform as an array of vec3. + \sa setAttributeValue() */ void QOpenGLShaderProgram::setUniformValue(const char *name, const QMatrix2x3& value) @@ -2262,6 +2270,10 @@ void QOpenGLShaderProgram::setUniformValue(const char *name, const QMatrix2x3& v Sets the uniform variable at \a location in the current context to a 2x4 matrix \a value. + \note This function is not aware of non square matrix support, + that is, GLSL types like mat2x4, that is present in modern OpenGL + versions. Instead, it treats the uniform as an array of vec4. + \sa setAttributeValue() */ void QOpenGLShaderProgram::setUniformValue(int location, const QMatrix2x4& value) @@ -2277,6 +2289,10 @@ void QOpenGLShaderProgram::setUniformValue(int location, const QMatrix2x4& value Sets the uniform variable called \a name in the current context to a 2x4 matrix \a value. + \note This function is not aware of non square matrix support, + that is, GLSL types like mat2x4, that is present in modern OpenGL + versions. Instead, it treats the uniform as an array of vec4. + \sa setAttributeValue() */ void QOpenGLShaderProgram::setUniformValue(const char *name, const QMatrix2x4& value) @@ -2288,6 +2304,10 @@ void QOpenGLShaderProgram::setUniformValue(const char *name, const QMatrix2x4& v Sets the uniform variable at \a location in the current context to a 3x2 matrix \a value. + \note This function is not aware of non square matrix support, + that is, GLSL types like mat3x2, that is present in modern OpenGL + versions. Instead, it treats the uniform as an array of vec2. + \sa setAttributeValue() */ void QOpenGLShaderProgram::setUniformValue(int location, const QMatrix3x2& value) @@ -2303,6 +2323,10 @@ void QOpenGLShaderProgram::setUniformValue(int location, const QMatrix3x2& value Sets the uniform variable called \a name in the current context to a 3x2 matrix \a value. + \note This function is not aware of non square matrix support, + that is, GLSL types like mat3x2, that is present in modern OpenGL + versions. Instead, it treats the uniform as an array of vec2. + \sa setAttributeValue() */ void QOpenGLShaderProgram::setUniformValue(const char *name, const QMatrix3x2& value) @@ -2340,6 +2364,10 @@ void QOpenGLShaderProgram::setUniformValue(const char *name, const QMatrix3x3& v Sets the uniform variable at \a location in the current context to a 3x4 matrix \a value. + \note This function is not aware of non square matrix support, + that is, GLSL types like mat3x4, that is present in modern OpenGL + versions. Instead, it treats the uniform as an array of vec4. + \sa setAttributeValue() */ void QOpenGLShaderProgram::setUniformValue(int location, const QMatrix3x4& value) @@ -2355,6 +2383,10 @@ void QOpenGLShaderProgram::setUniformValue(int location, const QMatrix3x4& value Sets the uniform variable called \a name in the current context to a 3x4 matrix \a value. + \note This function is not aware of non square matrix support, + that is, GLSL types like mat3x4, that is present in modern OpenGL + versions. Instead, it treats the uniform as an array of vec4. + \sa setAttributeValue() */ void QOpenGLShaderProgram::setUniformValue(const char *name, const QMatrix3x4& value) @@ -2366,6 +2398,10 @@ void QOpenGLShaderProgram::setUniformValue(const char *name, const QMatrix3x4& v Sets the uniform variable at \a location in the current context to a 4x2 matrix \a value. + \note This function is not aware of non square matrix support, + that is, GLSL types like mat4x2, that is present in modern OpenGL + versions. Instead, it treats the uniform as an array of vec2. + \sa setAttributeValue() */ void QOpenGLShaderProgram::setUniformValue(int location, const QMatrix4x2& value) @@ -2381,6 +2417,10 @@ void QOpenGLShaderProgram::setUniformValue(int location, const QMatrix4x2& value Sets the uniform variable called \a name in the current context to a 4x2 matrix \a value. + \note This function is not aware of non square matrix support, + that is, GLSL types like mat4x2, that is present in modern OpenGL + versions. Instead, it treats the uniform as an array of vec2. + \sa setAttributeValue() */ void QOpenGLShaderProgram::setUniformValue(const char *name, const QMatrix4x2& value) @@ -2392,6 +2432,10 @@ void QOpenGLShaderProgram::setUniformValue(const char *name, const QMatrix4x2& v Sets the uniform variable at \a location in the current context to a 4x3 matrix \a value. + \note This function is not aware of non square matrix support, + that is, GLSL types like mat4x3, that is present in modern OpenGL + versions. Instead, it treats the uniform as an array of vec3. + \sa setAttributeValue() */ void QOpenGLShaderProgram::setUniformValue(int location, const QMatrix4x3& value) @@ -2407,6 +2451,10 @@ void QOpenGLShaderProgram::setUniformValue(int location, const QMatrix4x3& value Sets the uniform variable called \a name in the current context to a 4x3 matrix \a value. + \note This function is not aware of non square matrix support, + that is, GLSL types like mat4x3, that is present in modern OpenGL + versions. Instead, it treats the uniform as an array of vec3. + \sa setAttributeValue() */ void QOpenGLShaderProgram::setUniformValue(const char *name, const QMatrix4x3& value) -- cgit v1.2.3