From: Jason M. <ko...@gm...> - 2008-08-24 03:24:27
|
Branan Riley wrote: > I have to agree with Jason on this one. If the user wants custom > geometry, they need to learn how to deal with drawing it. For the sake > of tutorials, we just need objects to show off transformations and > shaders with. An opaque format reduces the risk of abuse not only by > newbies, but also by people coding SDK examples. > > One thing that does need to be clear is how vertex attributes map to > the arrays generated by the shape function. Something like: > > Attrib 0 is the position (vec4) > Attrib 1 is the normal (vec3) > Attrib 2 is the texcoord (vec2) > > That way shaders can always get the correct variables. I think I'll > add preprocessor defines for this - GLS_POSITION_ATTRIBUTE, > GLS_NORMAL_ATTRIBUTE, and GLS_TEXCOORD_ATTRIBUTE, so that there are no > magic numbers floating around. > Initially, I was thinking that we'd specify in our documentation somewhere what the attribute indices were, but the #define is better. Of course, the /types/ of those attributes should be well documented. |