Add more notes regarding the uniform setters
Having overloads for GLuint that call glUniformNi was a mistake to begin with, and it has only been made worse when later OpenGL versions introduced unsigned int support and glUniformNui. Note this in the docs. Task-number: QTBUG-37012 Change-Id: Icc867221d0fbced8c4ff769deee66effa022f1b5 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
This commit is contained in:
parent
c2f26d6d0b
commit
d12f65a66a
@ -1970,6 +1970,9 @@ void QOpenGLShaderProgram::setUniformValue(const char *name, GLint value)
|
||||
Sets the uniform variable at \a location in the current context to \a value.
|
||||
This function should be used when setting sampler values.
|
||||
|
||||
\note This function is not aware of unsigned int support in modern OpenGL
|
||||
versions and therefore treats \a value as a GLint and calls glUniform1i.
|
||||
|
||||
\sa setAttributeValue()
|
||||
*/
|
||||
void QOpenGLShaderProgram::setUniformValue(int location, GLuint value)
|
||||
@ -1986,6 +1989,9 @@ void QOpenGLShaderProgram::setUniformValue(int location, GLuint value)
|
||||
Sets the uniform variable called \a name in the current context
|
||||
to \a value. This function should be used when setting sampler values.
|
||||
|
||||
\note This function is not aware of unsigned int support in modern OpenGL
|
||||
versions and therefore treats \a value as a GLint and calls glUniform1i.
|
||||
|
||||
\sa setAttributeValue()
|
||||
*/
|
||||
void QOpenGLShaderProgram::setUniformValue(const char *name, GLuint value)
|
||||
@ -2753,6 +2759,9 @@ void QOpenGLShaderProgram::setUniformValueArray
|
||||
context to the \a count elements of \a values. This overload
|
||||
should be used when setting an array of sampler values.
|
||||
|
||||
\note This function is not aware of unsigned int support in modern OpenGL
|
||||
versions and therefore treats \a value as a GLint and calls glUniform1iv.
|
||||
|
||||
\sa setAttributeValue()
|
||||
*/
|
||||
void QOpenGLShaderProgram::setUniformValueArray(int location, const GLuint *values, int count)
|
||||
|
Loading…
x
Reference in New Issue
Block a user