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.

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.

Thoughts?
Robert.
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to