matus-chochlik / oglplus

OGLplus is a collection of open-source, cross-platform libraries which implement an object-oriented facade over the OpenGL® (version 3 and higher) and also OpenAL® (version 1.1) and EGL (version 1.4) C-language APIs. It provides wrappers which automate resource and object management and make the use of these libraries in C++ safer and more convenient.
http://oglplus.org/
Boost Software License 1.0
492 stars 72 forks source link

Fix ProgVar ParamType alignment not compiling on MSVC #123

Closed ghost closed 8 years ago

ghost commented 8 years ago

Getting some of these errors compiling a project using Visual Studio Community 2015:

1>C:\Users\vagrant\swarms\external\include\oglplus/prog_var/type_ops.hpp(34): error C2719: 'value': formal parameter with requested alignment of 16 won't be aligned
1>C:\Users\vagrant\swarms\external\include\oglplus/prog_var/wrapper.hpp(125): error C2719: 'value': formal parameter with requested alignment of 16 won't be aligned
1>C:\Users\vagrant\swarms\external\include\oglplus/prog_var/wrapper.hpp(168): error C2719: 'value': formal parameter with requested alignment of 16 won't be aligned
1>C:\Users\vagrant\swarms\external\include\oglplus/prog_var/wrapper.hpp(177): error C2719: 'value': formal parameter with requested alignment of 16 won't be aligned

This is using the default __cdecl calling convention and building a 32-bit executable. Changing the type to const references fixes the problem, but I'm not sure this is the correct solution.

matus-chochlik commented 8 years ago

Merged and rebased.