vbo: fix glVertexAttribI* functions
authorMarek Olšák <maraeo@gmail.com>
Tue, 30 Oct 2012 13:44:22 +0000 (14:44 +0100)
committerMarek Olšák <maraeo@gmail.com>
Fri, 23 Nov 2012 00:25:48 +0000 (01:25 +0100)
commit492b69f3be3e355064c67bc6f4a30d40e997ce9d
treea27e275bc324c6edacfe8dab73ead01512a2b844
parentde5e3774d04da66dbf85ca0705de38b7942943fe
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 <brianp@vmware.com>
v2: cosmetic changes as suggested by Brian
(cherry picked from commit acf438f5375e2426386694e541b843dc6f8fd11a)
docs/GL3.txt
src/mesa/main/imports.h
src/mesa/main/macros.h
src/mesa/vbo/vbo_attrib_tmp.h
src/mesa/vbo/vbo_context.h
src/mesa/vbo/vbo_exec.h
src/mesa/vbo/vbo_exec_api.c
src/mesa/vbo/vbo_exec_draw.c
src/mesa/vbo/vbo_save.h
src/mesa/vbo/vbo_save_api.c
src/mesa/vbo/vbo_save_draw.c