----- Original message ----- > Hi Tim, > > Perhaps we could provide an osg::Array subclass for the custom struct > that we want, this would give the array scalability and flexibility of > matching the C and GLSL structures. Using std140 alignment would be > necessary along with users understand the rules of this. This is > still better than the current usage is really difficult to understand > what is going on. It might be possible to use compiler-specific alignment attributes to define C++ structs with the alignment properties of the std140 types. That, together with a generic templated osg::Array, would be very convenient! > > Relaxing the std140 usage and the knowledge of alignment issues would > require some kid of serialization info of the individual parameters. > Perhaps one could have a tuple style template class for this that > packs the variables into an struct that the template knows enough > about to pass the alignment info correctly to/from GL. > I had been thinking more of a key / value map to look up the offset of a variable, plus some accessors to make assignment more pleasant.
Tim _______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
