From d3fb390cf321fbe79ba0a4b1afdb988b8931d5aa Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 13 Jun 2014 19:33:09 +0200 Subject: [PATCH] SSE2: Align CMatrix --HG-- branch : sse2 --- code/nel/include/nel/3d/computed_string.h | 2 +- code/nel/include/nel/misc/matrix.h | 1 + code/nel/src/3d/computed_string.cpp | 4 +++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/code/nel/include/nel/3d/computed_string.h b/code/nel/include/nel/3d/computed_string.h index fcb758da4..517200383 100644 --- a/code/nel/include/nel/3d/computed_string.h +++ b/code/nel/include/nel/3d/computed_string.h @@ -290,7 +290,7 @@ public: * \param matrix transformation matrix * \param hotspot position of string origine */ - void render3D (IDriver& driver,CMatrix matrix,THotSpot hotspot = MiddleMiddle); + void render3D (IDriver& driver, const CMatrix &matrix, THotSpot hotspot = MiddleMiddle); }; diff --git a/code/nel/include/nel/misc/matrix.h b/code/nel/include/nel/misc/matrix.h index 700eb4a14..37a19b655 100644 --- a/code/nel/include/nel/misc/matrix.h +++ b/code/nel/include/nel/misc/matrix.h @@ -53,6 +53,7 @@ class CPlane; * \author Nevrax France * \date 2000 */ +NL_ALIGN_SSE2 class CMatrix { public: diff --git a/code/nel/src/3d/computed_string.cpp b/code/nel/src/3d/computed_string.cpp index a57191cc0..1a9fefba5 100644 --- a/code/nel/src/3d/computed_string.cpp +++ b/code/nel/src/3d/computed_string.cpp @@ -143,11 +143,13 @@ void CComputedString::render2D (IDriver& driver, /*------------------------------------------------------------------*\ render3D() \*------------------------------------------------------------------*/ -void CComputedString::render3D (IDriver& driver,CMatrix matrix,THotSpot hotspot) +void CComputedString::render3D (IDriver& driver, const CMatrix &matrixp, THotSpot hotspot) { if (Vertices.getNumVertices() == 0) return; + CMatrix matrix = matrixp; + // get window size uint32 wndWidth, wndHeight; driver.getWindowSize(wndWidth, wndHeight);