diff options
Diffstat (limited to 'indra/newview/llface.h')
-rw-r--r-- | indra/newview/llface.h | 38 |
1 files changed, 26 insertions, 12 deletions
diff --git a/indra/newview/llface.h b/indra/newview/llface.h index 4a551ff261..cafad5706c 100644 --- a/indra/newview/llface.h +++ b/indra/newview/llface.h @@ -45,17 +45,18 @@ #include "xform.h" #include "lldarrayptr.h" #include "llvertexbuffer.h" -#include "llviewerimage.h" -#include "llstat.h" +#include "llviewertexture.h" #include "lldrawable.h" +#include "lltextureatlasmanager.h" class LLFacePool; class LLVolume; -class LLViewerImage; +class LLViewerTexture; class LLTextureEntry; class LLVertexProgram; -class LLViewerImage; +class LLViewerTexture; class LLGeometryManager; +class LLTextureAtlasSlot; const F32 MIN_ALPHA_SIZE = 1024.f; const F32 MIN_TEX_ANIM_SIZE = 512.f; @@ -87,8 +88,7 @@ public: U16 getGeomCount() const { return mGeomCount; } // vertex count for this face U16 getGeomIndex() const { return mGeomIndex; } // index into draw pool U16 getGeomStart() const { return mGeomIndex; } // index into draw pool - LLViewerImage* getTexture() const { return mTexture; } - void setTexture(LLViewerImage* tex) { mTexture = tex; } + void setTexture(LLViewerTexture* tex) ; LLXformMatrix* getXform() const { return mXform; } BOOL hasGeometry() const { return mGeomCount > 0; } LLVector3 getPositionAgent() const; @@ -120,10 +120,10 @@ public: LLVertexBuffer* getVertexBuffer() const { return mVertexBuffer; } void setPoolType(U32 type) { mPoolType = type; } S32 getTEOffset() { return mTEOffset; } - LLViewerImage* getTexture() { return mTexture; } + LLViewerTexture* getTexture() const; void setViewerObject(LLViewerObject* object); - void setPool(LLFacePool *pool, LLViewerImage *texturep); + void setPool(LLFacePool *pool, LLViewerTexture *texturep); void setDrawable(LLDrawable *drawable); void setTEOffset(const S32 te_offset); @@ -172,7 +172,7 @@ public: void renderSelectedUV(); void renderForSelect(U32 data_mask = LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0); - void renderSelected(LLImageGL *image, const LLColor4 &color); + void renderSelected(LLViewerTexture *image, const LLColor4 &color); F32 getKey() const { return mDistance; } @@ -186,7 +186,17 @@ public: void setIndicesIndex(S32 idx) { mIndicesIndex = idx; } void setDrawInfo(LLDrawInfo* draw_info); -protected: + //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() ; public: @@ -223,7 +233,7 @@ protected: U32 mLastIndicesIndex; LLXformMatrix* mXform; - LLPointer<LLViewerImage> mTexture; + LLPointer<LLViewerTexture> mTexture; LLPointer<LLDrawable> mDrawablep; LLPointer<LLViewerObject> mVObjp; S32 mTEOffset; @@ -231,6 +241,10 @@ protected: S32 mReferenceIndex; F32 mVSize; F32 mPixelArea; + + //atlas + LLPointer<LLTextureAtlasSlot> mAtlasInfop ; + BOOL mUsingAtlas ; protected: static BOOL sSafeRenderSelect; @@ -259,7 +273,7 @@ public: const LLTextureEntry* lte = lhs->getTextureEntry(); const LLTextureEntry* rte = rhs->getTextureEntry(); - if (lhs->getTexture() != rhs->getTexture()) + if(lhs->getTexture() != rhs->getTexture()) { return lhs->getTexture() < rhs->getTexture(); } |