-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I've just posted a patch that implements GL_APPLE_vertex_array_object at:
http://users.freedesktop.org/~idr/patches/
The patch, which is quite large anyway, does *NOT* include changes to
any generated files. To test this patch you'll need to regenerate
src/mesa/main/get.c and do a make in src/mesa/glapi.
The patch is pretty straight forward, and no attempts are made at doing
optimal object switching. Ideally a driver would want to store some
additional state with the array object and hook BindArrayObject. The
driver would then use the state stored in the object to quickly restore
the old array state.
I'm also not convinced that this patch handles PushAttrib / PopAttrib
correctly. Although, most parts of OpenGL are pretty busted when you
push an object, delete it, then pop it. In this particular case, the
pop will restore a pointer to freed memory.
The text describing the behavior in the extension spec is a bit
squirlely. It almost sounds like the push has to save the bind and all
of the individual attribute values. The pop the repeats the binding
(which may re-create the deleted object) and resets the values. That's
pretty different from the way texture objects work (e.g., popping a
texture object doesn't redo the bind then reset the filter mode).
I'll try to do some testing on OS X so that we can replicate its
behavior. Since that is the only other known implementation of this
extension, whatever it does is by definition correct. :)
There is also a simple demo program for this extension called
progs/demos/vao_demo.c.
Before people start asking, I implemented this extension for two main
reasons. First, it came up as part of the work I did for my DDC paper.
Second, some form of array state container objects are almost certain
to come up in one of the next core versions of OpenGL. By doing an
implementation of it, I can see what some of the issues are.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
iD8DBQFEgMvlX1gOwKyEAw8RAqEbAJ0cSmPJKz1WMgKJttqXZ7Vmd5XeIgCbBEua
+GphKYFKx2DZEAUORwa+GKw=
=ztlI
-----END PGP SIGNATURE-----
_______________________________________________
Mesa3d-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev