gwiazdorrr / CxxSwizzle

Modern C++ swizzling header-only library
MIT License
186 stars 7 forks source link

sizeof( swizzle::glsl::naive::vector< float, 3 > ) == 16 on MSVC #2

Closed Sairony closed 9 years ago

Sairony commented 10 years ago

MSVC doesn't do EBO beyond the first base, so inheritance needs to be chained which is a bit of nuisance. While it does mean vectors take more space than needed, it also sadly prohibits using it as a base type if one wants to send the data to GPU in vertex buffers since size wont match.

gwiazdorrr commented 10 years ago

Which MSVC are you using? In the sample there are static_assertions in place (like https://github.com/gwiazdorrr/CxxSwizzle/blob/master/sample/main.cpp#L14), which should detect this with a compile error. They are OK on MSVC 2010 & 2013. Which version are you using?

gwiazdorrr commented 9 years ago

Can't repro.