I tried to update the game I'm working on from 2.68 to 2.73. And while most of the changes were easy to integrate, I ended up with some problems related to aligning btVector3 on 16 bytes boundaries: the std::vector template (at least of Visual Studio) does not support aligned data structure. As a result (since I have btVector3 or derived classes) more or less everywhere, I would have to replace all std::vector with btAlignedObjectArray. That would be annoying, but managable. But with std::vector I get good debugging support from VS - an exception (I mean a breakpoint is triggered) when an out-of-bounds access happens, and the debugger can display all elements of a std::vector object. If I use btAligned... , I can only see the first element, and don't get the additional breakpoints when invalid elements are accessed.
I therefore tried (for now, till I can replace all std::vector) to disable aligning btVector3. I:
- re-defined ATTRIBUTE_ALIGNED16(a) --> a in btScalar.h
- #undef BT_USE_SSE in btScalar.h
Is it possible to compile bullet without needing to align btVector3? Would it be possible to add a single define for that? I can imagine that other people might be using btVector3 in their own application, and prefer (at least for debugging) std::vector.
Thanks a lot!
PS: I am aware of the performance benfit of using sse, so I understand the need for aligning