Support Forum G3D Web Page |
Uniform variable declaration discovered in the program. More...
Public Member Functions | |
void | fillOutDummy (const String &name, int index, GLenum type) |
Sets the name, index, and type fields, and provides proper defaults for all other field for a dummy variable. More... | |
void | setAllFields (const String &name, int index, GLenum type, GLint location, bool dummy, GLint glUnit) |
Shorthand to avoid having to set these fields one-by-one. More... | |
Public Attributes | |
bool | dummy |
If true, this uniform is not used by the shader program, so we never try to bind a value to it. More... | |
GLuint | elementNum |
The number of elements in this variable. More... | |
GLint | glUnit |
The texture, image, or shader buffer unit this uniform is bound to. More... | |
GLuint | index |
The index of this element in its array. More... | |
GLint | location |
OpenGL location returned by glGetUniformLocation, -1 if this uniform is inactive. More... | |
String | name |
GLenum | type |
OpenGL type of the variable (e.g., GL_INT) More... | |
Uniform variable declaration discovered in the program.
|
inline |
Sets the name, index, and type fields, and provides proper defaults for all other field for a dummy variable.
|
inline |
Shorthand to avoid having to set these fields one-by-one.
Not in a constructor since UniformDeclaration is a G3D::Table key in its main role and thus gets initialized by the default constructor.
Referenced by fillOutDummy().
bool G3D::Shader::ShaderProgram::UniformDeclaration::dummy |
If true, this uniform is not used by the shader program, so we never try to bind a value to it.
Referenced by setAllFields().
GLuint G3D::Shader::ShaderProgram::UniformDeclaration::elementNum |
The number of elements in this variable.
For non-arrays, this is 1. For now, we store all array elements separately, so this is always 1. Left for future use.
GLint G3D::Shader::ShaderProgram::UniformDeclaration::glUnit |
The texture, image, or shader buffer unit this uniform is bound to.
Referenced by setAllFields().
GLuint G3D::Shader::ShaderProgram::UniformDeclaration::index |
The index of this element in its array.
For non-array elements, -1.
Referenced by fillOutDummy(), and setAllFields().
GLint G3D::Shader::ShaderProgram::UniformDeclaration::location |
OpenGL location returned by glGetUniformLocation, -1 if this uniform is inactive.
Referenced by setAllFields().
String G3D::Shader::ShaderProgram::UniformDeclaration::name |
Referenced by fillOutDummy(), and setAllFields().
GLenum G3D::Shader::ShaderProgram::UniformDeclaration::type |
OpenGL type of the variable (e.g., GL_INT)
Referenced by fillOutDummy(), and setAllFields().