summaryrefslogtreecommitdiff
path: root/indra/llrender/llrender.h
diff options
context:
space:
mode:
authorXiaohong Bao <bao@lindenlab.com>2011-07-15 12:14:34 -0600
committerXiaohong Bao <bao@lindenlab.com>2011-07-15 12:14:34 -0600
commitd9512674678bbb80b8d0d9c5105f56dbd1b2252b (patch)
treec3c8d64c683cd46d9d1e5d953dc6caca22213db4 /indra/llrender/llrender.h
parentd31e6735370711088f01cff448aa22f71c4c10c4 (diff)
parent44c7c6feaa824f4049d326965cb066e76ebefee3 (diff)
Merge from viewer-development
Diffstat (limited to 'indra/llrender/llrender.h')
-rw-r--r--indra/llrender/llrender.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/indra/llrender/llrender.h b/indra/llrender/llrender.h
index 611066a960..6327849dbb 100644
--- a/indra/llrender/llrender.h
+++ b/indra/llrender/llrender.h
@@ -37,6 +37,7 @@
#include "v2math.h"
#include "v3math.h"
#include "v4coloru.h"
+#include "v4math.h"
#include "llstrider.h"
#include "llpointer.h"
#include "llglheaders.h"
@@ -56,6 +57,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_MULTISAMPLE_TEXTURE, // see GL_ARB_texture_multisample
TT_NONE // No texture type is currently enabled
} eTextureType;
@@ -212,6 +214,41 @@ protected:
void setTextureCombiner(eTextureBlendOp op, eTextureBlendSrc src1, eTextureBlendSrc src2, bool isAlpha = false);
};
+class LLLightState
+{
+public:
+ LLLightState(S32 index);
+
+ void enable();
+ void disable();
+ void setDiffuse(const LLColor4& diffuse);
+ void setAmbient(const LLColor4& ambient);
+ void setSpecular(const LLColor4& specular);
+ void setPosition(const LLVector4& position);
+ void setConstantAttenuation(const F32& atten);
+ void setLinearAttenuation(const F32& atten);
+ void setQuadraticAttenuation(const F32& atten);
+ void setSpotExponent(const F32& exponent);
+ void setSpotCutoff(const F32& cutoff);
+ void setSpotDirection(const LLVector3& direction);
+
+protected:
+ S32 mIndex;
+ bool mEnabled;
+ LLColor4 mDiffuse;
+ LLColor4 mAmbient;
+ LLColor4 mSpecular;
+ LLVector4 mPosition;
+ LLVector3 mSpotDirection;
+
+ F32 mConstantAtten;
+ F32 mLinearAtten;
+ F32 mQuadraticAtten;
+
+ F32 mSpotExponent;
+ F32 mSpotCutoff;
+};
+
class LLRender
{
friend class LLTexUnit;
@@ -328,6 +365,8 @@ public:
void blendFunc(eBlendFactor color_sfactor, eBlendFactor color_dfactor,
eBlendFactor alpha_sfactor, eBlendFactor alpha_dfactor);
+ LLLightState* getLight(U32 index);
+
LLTexUnit* getTexUnit(U32 index);
U32 getCurrentTexUnitIndex(void) const { return mCurrTextureUnitIndex; }
@@ -364,6 +403,7 @@ private:
LLStrider<LLColor4U> mColorsp;
std::vector<LLTexUnit*> mTexUnits;
LLTexUnit* mDummyTexUnit;
+ std::vector<LLLightState*> mLightState;
eBlendFactor mCurrBlendColorSFactor;
eBlendFactor mCurrBlendColorDFactor;