summaryrefslogtreecommitdiffstats
path: root/src/mesa/vbo/vbo_save.h
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2012-10-30 14:44:22 +0100
committerMarek Olšák <[email protected]>2012-11-06 01:13:48 +0100
commitacf438f5375e2426386694e541b843dc6f8fd11a (patch)
tree6aaa04f8419661892a74168d144537905efac8a2 /src/mesa/vbo/vbo_save.h
parenta196f43596f6cb85a8f3e446596a2fb8e0ee7872 (diff)
vbo: fix glVertexAttribI* functions
The functions were broken, because they converted ints to floats. Now we can finally advertise OpenGL 3.0. ;) In this commit, the vbo module also tracks the type for each attrib in addition to the size. It can be one of FLOAT, INT, UNSIGNED_INT. The little ugliness is the vertex attribs are declared as floats even though there may be integer values. The code just copies integer values into them without any conversion. This implementation passes the glVertexAttribI piglit test which I am going to commit in piglit soon. The test covers vertex arrays, immediate mode and display lists. NOTE: This is a candidate for the stable branches. Reviewed-by: Brian Paul <[email protected]> v2: cosmetic changes as suggested by Brian
Diffstat (limited to 'src/mesa/vbo/vbo_save.h')
-rw-r--r--src/mesa/vbo/vbo_save.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/vbo/vbo_save.h b/src/mesa/vbo/vbo_save.h
index f33669670c4..750117b1239 100644
--- a/src/mesa/vbo/vbo_save.h
+++ b/src/mesa/vbo/vbo_save.h
@@ -63,6 +63,7 @@ struct vbo_save_copied_vtx {
*/
struct vbo_save_vertex_list {
GLubyte attrsz[VBO_ATTRIB_MAX];
+ GLenum attrtype[VBO_ATTRIB_MAX];
GLuint vertex_size;
/* Copy of the final vertex from node->vertex_store->bufferobj.
@@ -127,6 +128,7 @@ struct vbo_save_context {
const struct gl_client_array *inputs[VBO_ATTRIB_MAX];
GLubyte attrsz[VBO_ATTRIB_MAX];
+ GLenum attrtype[VBO_ATTRIB_MAX];
GLubyte active_sz[VBO_ATTRIB_MAX];
GLuint vertex_size;