diff options
Diffstat (limited to 'indra/llrender/llrender.h')
-rw-r--r-- | indra/llrender/llrender.h | 45 |
1 files changed, 22 insertions, 23 deletions
diff --git a/indra/llrender/llrender.h b/indra/llrender/llrender.h index 39c13e328a..fc7c5ccc18 100644 --- a/indra/llrender/llrender.h +++ b/indra/llrender/llrender.h @@ -42,7 +42,7 @@ #include "llpointer.h" #include "llglheaders.h" #include "llmatrix4a.h" -#include "glh/glh_linear.h" +#include "glm/mat4x4.hpp" #include <array> #include <list> @@ -319,7 +319,6 @@ public: POINTS, LINES, LINE_STRIP, - QUADS, LINE_LOOP, NUM_MODES }; @@ -401,8 +400,8 @@ public: void matrixMode(eMatrixMode mode); eMatrixMode getMatrixMode(); - const glh::matrix4f& getModelviewMatrix(); - const glh::matrix4f& getProjectionMatrix(); + const glm::mat4& getModelviewMatrix(); + const glm::mat4& getProjectionMatrix(); void syncMatrices(); void syncLightState(); @@ -450,9 +449,9 @@ public: void diffuseColor4ubv(const U8* c); void diffuseColor4ub(U8 r, U8 g, U8 b, U8 a); - void vertexBatchPreTransformed(LLVector3* verts, S32 vert_count); - void vertexBatchPreTransformed(LLVector3* verts, LLVector2* uvs, S32 vert_count); - void vertexBatchPreTransformed(LLVector3* verts, LLVector2* uvs, LLColor4U*, S32 vert_count); + void vertexBatchPreTransformed(LLVector4a* verts, S32 vert_count); + void vertexBatchPreTransformed(LLVector4a* verts, LLVector2* uvs, S32 vert_count); + void vertexBatchPreTransformed(LLVector4a* verts, LLVector2* uvs, LLColor4U*, S32 vert_count); void setColorMask(bool writeColor, bool writeAlpha); void setColorMask(bool writeColorR, bool writeColorG, bool writeColorB, bool writeAlpha); @@ -502,20 +501,19 @@ private: eMatrixMode mMatrixMode; U32 mMatIdx[NUM_MATRIX_MODES]; U32 mMatHash[NUM_MATRIX_MODES]; - glh::matrix4f mMatrix[NUM_MATRIX_MODES][LL_MATRIX_STACK_DEPTH]; + glm::mat4 mMatrix[NUM_MATRIX_MODES][LL_MATRIX_STACK_DEPTH]; U32 mCurMatHash[NUM_MATRIX_MODES]; U32 mLightHash; LLColor4 mAmbientLightColor; bool mDirty; - U32 mQuadCycle; U32 mCount; U32 mMode; U32 mCurrTextureUnitIndex; bool mCurrColorMask[4]; LLPointer<LLVertexBuffer> mBuffer; - LLStrider<LLVector3> mVerticesp; + LLStrider<LLVector4a> mVerticesp; LLStrider<LLVector2> mTexcoordsp; LLStrider<LLColor4U> mColorsp; std::array<LLTexUnit, LL_NUM_TEXTURE_LAYERS> mTexUnits; @@ -536,8 +534,8 @@ extern F32 gGLLastModelView[16]; extern F32 gGLLastProjection[16]; extern F32 gGLProjection[16]; extern S32 gGLViewport[4]; -extern F32 gGLDeltaModelView[16]; -extern F32 gGLInverseDeltaModelView[16]; +extern glm::mat4 gGLDeltaModelView; +extern glm::mat4 gGLInverseDeltaModelView; extern thread_local LLRender gGL; @@ -548,19 +546,20 @@ const F32 OGL_TO_CFR_ROTATION[16] = { 0.f, 0.f, -1.f, 0.f, // -Z becomes X 0.f, 1.f, 0.f, 0.f, // Y becomes Z 0.f, 0.f, 0.f, 1.f }; -glh::matrix4f copy_matrix(F32* src); -glh::matrix4f get_current_modelview(); -glh::matrix4f get_current_projection(); -glh::matrix4f get_last_modelview(); -glh::matrix4f get_last_projection(); +glm::mat4 copy_matrix(F32* src); +glm::mat4 get_current_modelview(); +glm::mat4 get_current_projection(); +glm::mat4 get_last_modelview(); +glm::mat4 get_last_projection(); -void copy_matrix(const glh::matrix4f& src, F32* dst); -void set_current_modelview(const glh::matrix4f& mat); -void set_current_projection(glh::matrix4f& mat); +void copy_matrix(const glm::mat4& src, F32* dst); +void set_current_modelview(const glm::mat4& mat); +void set_current_projection(const glm::mat4& mat); +void set_last_modelview(const glm::mat4& mat); +void set_last_projection(const glm::mat4& mat); -glh::matrix4f gl_ortho(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat znear, GLfloat zfar); -glh::matrix4f gl_perspective(GLfloat fovy, GLfloat aspect, GLfloat zNear, GLfloat zFar); -glh::matrix4f gl_lookat(LLVector3 eye, LLVector3 center, LLVector3 up); +// glh compat +glm::vec3 mul_mat4_vec3(const glm::mat4& mat, const glm::vec3& vec); #define LL_SHADER_LOADING_WARNS(...) LL_WARNS() |