diff options
Diffstat (limited to 'indra/llrender/llrender.h')
-rw-r--r-- | indra/llrender/llrender.h | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/indra/llrender/llrender.h b/indra/llrender/llrender.h index c202aa4b73..465c16f0de 100644 --- a/indra/llrender/llrender.h +++ b/indra/llrender/llrender.h @@ -41,6 +41,8 @@ #include "llstrider.h" #include "llpointer.h" #include "llglheaders.h" +#include "llmatrix4a.h" +#include "glh/glh_linear.h" class LLVertexBuffer; class LLCubeMap; @@ -48,6 +50,8 @@ class LLImageGL; class LLRenderTarget; class LLTexture ; +#define LL_MATRIX_STACK_DEPTH 32 + class LLTexUnit { friend class LLRender; @@ -308,6 +312,18 @@ public: BF_UNDEF } eBlendFactor; + typedef enum + { + MM_MODELVIEW = 0, + MM_PROJECTION, + MM_TEXTURE0, + MM_TEXTURE1, + MM_TEXTURE2, + MM_TEXTURE3, + NUM_MATRIX_MODES, + MM_TEXTURE + } eMatrixMode; + LLRender(); ~LLRender(); void init() ; @@ -319,8 +335,19 @@ public: void translatef(const GLfloat& x, const GLfloat& y, const GLfloat& z); void scalef(const GLfloat& x, const GLfloat& y, const GLfloat& z); + void rotatef(const GLfloat& a, const GLfloat& x, const GLfloat& y, const GLfloat& z); + void ortho(F32 left, F32 right, F32 bottom, F32 top, F32 zNear, F32 zFar); + void pushMatrix(); void popMatrix(); + void loadMatrix(const GLfloat* m); + void loadMatrix(const GLdouble* m); + void loadIdentity(); + void multMatrix(const GLfloat* m); + void multMatrix(const GLdouble* m); + void matrixMode(U32 mode); + + void syncMatrices(); void translateUI(F32 x, F32 y, F32 z); void scaleUI(F32 x, F32 y, F32 z); @@ -397,7 +424,14 @@ public: static U32 sUIVerts; private: - bool mDirty; + U32 mMatrixMode; + U32 mMatIdx[NUM_MATRIX_MODES]; + U32 mMatHash[NUM_MATRIX_MODES]; + glh::matrix4f mMatrix[NUM_MATRIX_MODES][LL_MATRIX_STACK_DEPTH]; + + U32 mCurMatHash[NUM_MATRIX_MODES]; + + bool mDirty; U32 mCount; U32 mMode; U32 mCurrTextureUnitIndex; |