Hi David On Tue, Jul 8, 2008 at 11:57 AM, David Spilling <[EMAIL PROTECTED]> wrote: > Dear All, > > Can I also guarantee that each std::vector entry will be > contiguous in memory?
Yes, provided that your compiler follows the C++ standard. See http://www.parashift.com/c++-faq-lite/containers.html#faq-34.3 > (I'm using MS VC++ 9, so would natively use __declspec(align(16)) but am not > sure how to "get at" the vector). Use &yourvector[0] to get a float* pointer to the beginning of the array. I'd advocate against using a compiler-specific trick to do something that is guaranteed by the C++ standard anyway. Just keep in mind that each element of a Vec4 is 16 bytes long only if you use floats, i.e. if Vec4 is typedef'ed to Vec4f and not Vec4d. Regards Thibault _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

