[osg-users] How to byte-align Vec4Array
david.spilling at gmail.com
Tue Jul 8 02:57:23 PDT 2008
Is there an obvious way of aligning the contents of the Vec4Array to 16 byte
boundaries? Can I also guarantee that each std::vector entry will be
contiguous in memory? i.e. I would like to make sure that array.x(),
array.x() etc. are all on consecutive 16 byte boundaries.
(I'm using MS VC++ 9, so would natively use __declspec(align(16)) but am not
sure how to "get at" the vector).
If not, can I declare a big array of floats, that is aligned as per
requirements, and pass it into a geometry as a vertex array direclty,
bypassing use of Vec4Array (and Vec4 for that matter)?
I guess if neither of these works, then I'm down to subclassing Vec4Array...
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the osg-users