
Am Sonntag, 10. Mai 2009 14:00:19 schrieb Sven Panne:
[...] I haven't released a new version on Hackage yet, because the support for generic vertex attributes (something totally unrelated to rectangular textures) hasn't been finished yet.
To explain this a bit more: I'm a bit reluctant to release an API which might immediately change in the next release. The tricky part here is that OpenGL 3.1 differentiates between 3 ways of handling integral vertex attributes: Conversion to normalized floating point, conversion to unnormalized floating point, and keeping integral values. [...]
Reading the OpenGL spec very closely, one can see that the story is even more complicated: OpenGL distinguishes 3 kinds of generic vertex attributes: floating point, signed integral and unsigned integral. Integral values used for floating point attributes can be interpreted normally (i.e. value- preserving) or as normalized values. If this sounds confusing: Yes, it is! :-) Add to this a highly non-orthogonal API, and you have a perfect mess... A complete re-specification of OpenGL 4.0 (if this ever happens) instead of the agglomeration of 1-2 decades of incremental changes would be great. Nevertheless, I've tried to make this a bit clearer and orthogonal, and the result is in the OpenGL package repository. Things are not really perfect, because I want to preserve API backwards compatibility. When I find the time for a OpenGL-3.x-only package, things can be vastly simplified and would be more elegant. Nevertheless, some comments would be highly appreciated. One note: I've just seen that in my released versions, I've accidentally exported VertexAttrib without its methods and VertexAttribComponent *with* its methods. This should of course have been the other way round. :-( For compatibility reasons I keep the latter as it is, though. If there are no severe objections, I'll probably release a new version on Hackage in the next few days, including this stuff plus a few other additions and bug fixes. Cheers, S.