diff options
Diffstat (limited to 'indra/llrender/llrender.h')
-rw-r--r-- | indra/llrender/llrender.h | 57 |
1 files changed, 32 insertions, 25 deletions
diff --git a/indra/llrender/llrender.h b/indra/llrender/llrender.h index 9c36c230fb..e8baf6bb7e 100644 --- a/indra/llrender/llrender.h +++ b/indra/llrender/llrender.h @@ -52,7 +52,7 @@ class LLTexture ; #define LL_MATRIX_STACK_DEPTH 32 -class LLTexUnit +class LLTexUnit { friend class LLRender; public: @@ -63,6 +63,7 @@ public: TT_TEXTURE = 0, // Standard 2D Texture TT_RECT_TEXTURE, // Non power of 2 texture TT_CUBE_MAP, // 6-sided cube map texture + TT_CUBE_MAP_ARRAY, // Array of cube maps TT_MULTISAMPLE_TEXTURE, // see GL_ARB_texture_multisample TT_TEXTURE_3D, // standard 3D Texture TT_NONE, // No texture type is currently enabled @@ -245,6 +246,8 @@ public: void setSpotCutoff(const F32& cutoff); void setSpotDirection(const LLVector3& direction); void setSunPrimary(bool v); + void setSize(F32 size); + void setFalloff(F32 falloff); protected: friend class LLRender; @@ -265,6 +268,8 @@ protected: F32 mSpotExponent; F32 mSpotCutoff; + F32 mSize = 0.f; + F32 mFalloff = 0.f; }; class LLRender @@ -272,7 +277,7 @@ class LLRender friend class LLTexUnit; public: - enum eTexIndex + enum eTexIndex : U8 { DIFFUSE_MAP = 0, ALTERNATE_DIFFUSE_MAP = 1, @@ -281,14 +286,15 @@ public: NUM_TEXTURE_CHANNELS = 3, }; - enum eVolumeTexIndex + enum eVolumeTexIndex : U8 { LIGHT_TEX = 0, SCULPT_TEX, NUM_VOLUME_TEXTURE_CHANNELS, }; - typedef enum { + enum eGeomModes : U8 + { TRIANGLES = 0, TRIANGLE_STRIP, TRIANGLE_FAN, @@ -298,9 +304,9 @@ public: QUADS, LINE_LOOP, NUM_MODES - } eGeomModes; + }; - typedef enum + enum eCompareFunc : U8 { CF_NEVER = 0, CF_ALWAYS, @@ -311,9 +317,9 @@ public: CF_GREATER_EQUAL, CF_GREATER, CF_DEFAULT - } eCompareFunc; + }; - typedef enum + enum eBlendType : U8 { BT_ALPHA = 0, BT_ADD, @@ -322,25 +328,26 @@ public: BT_MULT_ALPHA, BT_MULT_X2, BT_REPLACE - } eBlendType; + }; - typedef enum + // WARNING: this MUST match the LL_PART_BF enum in LLPartData, so set values explicitly in case someone + // decides to add more or reorder them + enum eBlendFactor : U8 { BF_ONE = 0, - BF_ZERO, - BF_DEST_COLOR, - BF_SOURCE_COLOR, - BF_ONE_MINUS_DEST_COLOR, - BF_ONE_MINUS_SOURCE_COLOR, - BF_DEST_ALPHA, - BF_SOURCE_ALPHA, - BF_ONE_MINUS_DEST_ALPHA, - BF_ONE_MINUS_SOURCE_ALPHA, - + BF_ZERO = 1, + BF_DEST_COLOR = 2, + BF_SOURCE_COLOR = 3, + BF_ONE_MINUS_DEST_COLOR = 4, + BF_ONE_MINUS_SOURCE_COLOR = 5, + BF_DEST_ALPHA = 6, + BF_SOURCE_ALPHA = 7, + BF_ONE_MINUS_DEST_ALPHA = 8, + BF_ONE_MINUS_SOURCE_ALPHA = 9, BF_UNDEF - } eBlendFactor; + }; - typedef enum + enum eMatrixMode : U8 { MM_MODELVIEW = 0, MM_PROJECTION, @@ -350,7 +357,7 @@ public: MM_TEXTURE3, NUM_MATRIX_MODES, MM_TEXTURE - } eMatrixMode; + }; LLRender(); ~LLRender(); @@ -490,8 +497,6 @@ private: eBlendFactor mCurrBlendAlphaSFactor; eBlendFactor mCurrBlendAlphaDFactor; - F32 mMaxAnisotropy; - std::vector<LLVector3> mUIOffset; std::vector<LLVector3> mUIScale; @@ -502,6 +507,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 thread_local LLRender gGL; |