/**
 * Enable a vertex attribute by name. 
 * @param name this name is used for the location index look-up
 */
void SciIllLib::CGLShaderProgram::enableAttributeArray(const char *name)
{
	enableAttributeArray(attribLocation(name));
}
Exemple #2
0
 void Shader::vertexAttribPtr (const char* attribName, GLint size, GLint stride, GLint offset, GLenum type /* = GL_FLOAT*/, GLboolean normalized /* = GL_FALSE*/)
 {
   glVertexAttribPointer (attribLocation (attribName), size, type, normalized, stride, (const void*) (offset));
 }
/**
 * Setup an attribute buffer by Name. 
 * @param name this name is used for the location index look-up
 * @param type Specifies the data type of each component in the array (usually GL_FLOAT)
 * @param offset Specifies a pointer to the first component of the first generic vertex attribute in the array. The initial value is 0.
 * @param tupleSize Specifies the number of components per generic vertex attribute. Must be 1, 2, 3, or 4. The initial value is 4.
 * @param stride Specifies the byte offset between consecutive generic vertex attributes. If stride is 0, the generic vertex attributes are understood to be tightly packed in the array. The initial value is 0.
 */
void SciIllLib::CGLShaderProgram::setAttributeBuffer(const char *name, GLenum type, int offset, int tupleSize, int stride)
{
	setAttributeBuffer(attribLocation(name), type, offset, tupleSize, stride);
}
Exemple #4
0
 void Shader::enableVertexAttribArray (const char* attrName)
 {
   glEnableVertexAttribArray (attribLocation (attrName));
 }