GRAPHICS: Revert "GRAPHICS: Add support for integer shader attributes"

This is not supported in OpenGL 2.1

This reverts commit a081bbfdc3844a11463baf190acb6d9dd884f1ae.
This commit is contained in:
Bastien Bouclet 2015-02-21 12:42:05 +01:00
parent 030cc7794c
commit a72d415793
2 changed files with 2 additions and 20 deletions

View file

@ -170,11 +170,7 @@ void Shader::use(bool forceReload) {
if (attrib._enabled) {
glEnableVertexAttribArray(i);
glBindBuffer(GL_ARRAY_BUFFER, attrib._vbo);
if (attrib._integer) {
glVertexAttribIPointer(i, attrib._size, attrib._type, attrib._stride, (const GLvoid *)attrib._offset);
} else {
glVertexAttribPointer(i, attrib._size, attrib._type, attrib._normalized, attrib._stride, (const GLvoid *)attrib._offset);
}
glVertexAttribPointer(i, attrib._size, attrib._type, attrib._normalized, attrib._stride, (const GLvoid *)attrib._offset);
} else {
glDisableVertexAttribArray(i);
switch (attrib._size) {
@ -220,7 +216,6 @@ VertexAttrib &Shader::getAttribute(const char *attrib) {
void Shader::enableVertexAttribute(const char *attrib, GLuint vbo, GLint size, GLenum type, GLboolean normalized, GLsizei stride, uint32 offset) {
VertexAttrib &va = getAttribute(attrib);
va._enabled = true;
va._integer = false;
va._vbo = vbo;
va._size = size;
va._type = type;
@ -229,17 +224,6 @@ void Shader::enableVertexAttribute(const char *attrib, GLuint vbo, GLint size, G
va._offset = offset;
}
void Shader::enableIntegerVertexAttribute(const char *attrib, GLuint vbo, GLint size, GLenum type, GLsizei stride, uint32 offset) {
VertexAttrib &va = getAttribute(attrib);
va._enabled = true;
va._integer = true;
va._vbo = vbo;
va._size = size;
va._type = type;
va._stride = stride;
va._offset = offset;
}
void Shader::disableVertexAttribute(const char *attrib, int size, const float *data) {
VertexAttrib &va = getAttribute(attrib);
va._enabled = false;