OSDN Git Service

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>
Tue, 6 Nov 2012 00:13:48 +0000 (01:13 +0100)
commitacf438f5375e2426386694e541b843dc6f8fd11a
tree6aaa04f8419661892a74168d144537905efac8a2
parenta196f43596f6cb85a8f3e446596a2fb8e0ee7872
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
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