diff --git a/code/nel/include/nel/3d/uniform_buffer.h b/code/nel/include/nel/3d/uniform_buffer.h index f5d6ed231..81254c687 100644 --- a/code/nel/include/nel/3d/uniform_buffer.h +++ b/code/nel/include/nel/3d/uniform_buffer.h @@ -32,7 +32,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include -#include +#include #include #include @@ -71,7 +71,7 @@ public: inline void set(sint offset, float f0, float f1) { float *f = reinterpret_cast(&m_HostMemory[offset]); f[0] = f0; f[1] = f1; } inline void set(sint offset, float f0, float f1, float f2) { float *f = reinterpret_cast(&m_HostMemory[offset]); f[0] = f0; f[1] = f1; f[2] = f2; } inline void set(sint offset, float f0, float f1, float f2, float f3) { float *f = reinterpret_cast(&m_HostMemory[offset]); f[0] = f0; f[1] = f1; f[2] = f2; f[3] = f3; } - inline void set(sint offset, NLMISC::CVector2d vec2) { reinterpret_cast(m_HostMemory[offset]) = vec2; } + inline void set(sint offset, NLMISC::CVector2f vec2) { reinterpret_cast(m_HostMemory[offset]) = vec2; } inline void set(sint offset, NLMISC::CVector vec3) { reinterpret_cast(m_HostMemory[offset]) = vec3; } inline void set(sint offset, NLMISC::CVectorH vec4) { reinterpret_cast(m_HostMemory[offset]) = vec4; } inline void set(sint offset, NLMISC::CMatrix mat4) { float *f = reinterpret_cast(&m_HostMemory[offset]); mat4.get(f); } diff --git a/code/nel/include/nel/3d/uniform_buffer_format.h b/code/nel/include/nel/3d/uniform_buffer_format.h index 598de952b..0c9d37d21 100644 --- a/code/nel/include/nel/3d/uniform_buffer_format.h +++ b/code/nel/include/nel/3d/uniform_buffer_format.h @@ -53,7 +53,7 @@ public: enum TType { Float, // float - FloatVec2, // CVector2d + FloatVec2, // CVector2f FloatVec3, // CVector FloatVec4, // CVectorH SInt, // sint32 diff --git a/code/nel/src/3d/uniform_buffer.cpp b/code/nel/src/3d/uniform_buffer.cpp index e2db5898b..c1d1f5459 100644 --- a/code/nel/src/3d/uniform_buffer.cpp +++ b/code/nel/src/3d/uniform_buffer.cpp @@ -35,6 +35,11 @@ namespace NL3D { CUniformBuffer::CUniformBuffer() { + nlctassert(sizeof(float) == 4); + nlctassert(sizeof(NLMISC::CVector2f) == 8); + nlctassert(sizeof(NLMISC::CVector) == 12); + nlctassert(sizeof(NLMISC::CVectorH) == 16); + // ... }