summaryrefslogtreecommitdiff
path: root/indra/newview/llface.h
diff options
context:
space:
mode:
authorRichard Linden <none@none>2013-06-21 11:00:47 -0700
committerRichard Linden <none@none>2013-06-21 11:00:47 -0700
commit090fa057b5ff17170d846473a2bc9ebc315c99d3 (patch)
tree781dff230ab8d1fc651e453cdd568df5aff8487a /indra/newview/llface.h
parent5de2f0a8970244866dc8b511caa3c8626955264f (diff)
parenta2a6bf20d71f923e9a5e43f71213fffbfea5a2a6 (diff)
merge
Diffstat (limited to 'indra/newview/llface.h')
-rwxr-xr-xindra/newview/llface.h49
1 files changed, 23 insertions, 26 deletions
diff --git a/indra/newview/llface.h b/indra/newview/llface.h
index dda4bc9b3c..c4832b67cd 100755
--- a/indra/newview/llface.h
+++ b/indra/newview/llface.h
@@ -39,12 +39,14 @@
#include "llvertexbuffer.h"
#include "llviewertexture.h"
#include "lldrawable.h"
-#include "lltextureatlasmanager.h"
class LLFacePool;
class LLVolume;
class LLViewerTexture;
class LLTextureEntry;
+class LLVertexProgram;
+class LLViewerTexture;
+class LLGeometryManager;
class LLTextureAtlasSlot;
class LLDrawInfo;
@@ -106,13 +108,17 @@ public:
U16 getGeomStart() const { return mGeomIndex; } // index into draw pool
void setTextureIndex(U8 index);
U8 getTextureIndex() const { return mTextureIndex; }
+ void setTexture(U32 ch, LLViewerTexture* tex);
void setTexture(LLViewerTexture* tex) ;
- void switchTexture(LLViewerTexture* new_texture);
+ void setDiffuseMap(LLViewerTexture* tex);
+ void setNormalMap(LLViewerTexture* tex);
+ void setSpecularMap(LLViewerTexture* tex);
+ void switchTexture(U32 ch, LLViewerTexture* new_texture);
void dirtyTexture();
LLXformMatrix* getXform() const { return mXform; }
BOOL hasGeometry() const { return mGeomCount > 0; }
LLVector3 getPositionAgent() const;
- LLVector2 surfaceToTexture(LLVector2 surface_coord, LLVector3 position, LLVector3 normal);
+ LLVector2 surfaceToTexture(LLVector2 surface_coord, const LLVector4a& position, const LLVector4a& normal);
void getPlanarProjectedParams(LLQuaternion* face_rot, LLVector3* face_pos, F32* scale) const;
bool calcAlignedPlanarTE(const LLFace* align_to, LLVector2* st_offset,
LLVector2* st_scale, F32* st_rot) const;
@@ -126,8 +132,8 @@ public:
F32 getVirtualSize() const { return mVSize; }
F32 getPixelArea() const { return mPixelArea; }
- S32 getIndexInTex() const {return mIndexInTex ;}
- void setIndexInTex(S32 index) { mIndexInTex = index ;}
+ S32 getIndexInTex(U32 ch) const {llassert(ch < LLRender::NUM_TEXTURE_CHANNELS); return mIndexInTex[ch];}
+ void setIndexInTex(U32 ch, S32 index) { llassert(ch < LLRender::NUM_TEXTURE_CHANNELS); mIndexInTex[ch] = index ;}
void renderSetColor() const;
S32 renderElements(const U16 *index_array) const;
@@ -145,7 +151,7 @@ public:
S32 getLOD() const { return mVObjp.notNull() ? mVObjp->getLOD() : 0; }
void setPoolType(U32 type) { mPoolType = type; }
S32 getTEOffset() { return mTEOffset; }
- LLViewerTexture* getTexture() const;
+ LLViewerTexture* getTexture(U32 ch = LLRender::DIFFUSE_MAP) const;
void setViewerObject(LLViewerObject* object);
void setPool(LLFacePool *pool, LLViewerTexture *texturep);
@@ -219,16 +225,6 @@ public:
void setHasMedia(bool has_media) { mHasMedia = has_media ;}
BOOL hasMedia() const ;
- //for atlas
- LLTextureAtlasSlot* getAtlasInfo() ;
- void setAtlasInUse(BOOL flag);
- void setAtlasInfo(LLTextureAtlasSlot* atlasp);
- BOOL isAtlasInUse()const;
- BOOL canUseAtlas() const;
- const LLVector2* getTexCoordScale() const ;
- const LLVector2* getTexCoordOffset()const;
- const LLTextureAtlas* getAtlas()const ;
- void removeAtlas() ;
BOOL switchTexture() ;
//vertex buffer tracking
@@ -258,11 +254,13 @@ public:
LLVector2 mTexExtents[2];
F32 mDistance;
- F32 mLastUpdateTime;
- F32 mLastSkinTime;
- F32 mLastMoveTime;
- LLMatrix4* mTextureMatrix;
- LLDrawInfo* mDrawInfo;
+ F32 mLastUpdateTime;
+ F32 mLastSkinTime;
+ F32 mLastMoveTime;
+ LLMatrix4* mTextureMatrix;
+ LLMatrix4* mSpecMapMatrix;
+ LLMatrix4* mNormalMapMatrix;
+ LLDrawInfo* mDrawInfo;
private:
LLPointer<LLVertexBuffer> mVertexBuffer;
@@ -277,10 +275,12 @@ private:
U8 mTextureIndex; // index of texture channel to use for pseudo-atlasing
U32 mIndicesCount;
U32 mIndicesIndex; // index into draw pool for indices (yeah, I know!)
- S32 mIndexInTex ;
+ S32 mIndexInTex[LLRender::NUM_TEXTURE_CHANNELS];
LLXformMatrix* mXform;
- LLPointer<LLViewerTexture> mTexture;
+
+ LLPointer<LLViewerTexture> mTexture[LLRender::NUM_TEXTURE_CHANNELS];
+
LLPointer<LLDrawable> mDrawablep;
LLPointer<LLViewerObject> mVObjp;
S32 mTEOffset;
@@ -298,9 +298,6 @@ private:
F32 mBoundingSphereRadius ;
bool mHasMedia ;
- //atlas
- LLPointer<LLTextureAtlasSlot> mAtlasInfop ;
- BOOL mUsingAtlas ;
protected:
static BOOL sSafeRenderSelect;