diff options
Diffstat (limited to 'indra/newview/llviewertexture.h')
-rwxr-xr-x | indra/newview/llviewertexture.h | 37 |
1 files changed, 16 insertions, 21 deletions
diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h index 529b812f41..6948c6699b 100755 --- a/indra/newview/llviewertexture.h +++ b/indra/newview/llviewertexture.h @@ -34,7 +34,6 @@ #include "llgltypes.h" #include "llrender.h" #include "llmetricperformancetester.h" -#include "llunit.h" #include <map> #include <list> @@ -42,7 +41,6 @@ extern const LLUnit<S32, LLUnits::Mibibytes> gMinVideoRam; extern const LLUnit<S32, LLUnits::Mibibytes> gMaxVideoRam; -class LLFace; class LLImageGL ; class LLImageRaw; class LLViewerObject; @@ -99,11 +97,10 @@ public: DYNAMIC_TEXTURE, FETCHED_TEXTURE, LOD_TEXTURE, - ATLAS_TEXTURE, INVALID_TEXTURE_TYPE }; - typedef std::vector<LLFace*> ll_face_list_t; + typedef std::vector<class LLFace*> ll_face_list_t; typedef std::vector<LLVOVolume*> ll_volume_list_t; @@ -143,12 +140,15 @@ public: LLFrameTimer* getLastReferencedTimer() {return &mLastReferencedTimer ;} + S32 getFullWidth() const { return mFullWidth; } + S32 getFullHeight() const { return mFullHeight; } /*virtual*/ void setKnownDrawSize(S32 width, S32 height); - virtual void addFace(LLFace* facep) ; - virtual void removeFace(LLFace* facep) ; - S32 getNumFaces() const; - const ll_face_list_t* getFaceList() const {return &mFaceList;} + virtual void addFace(U32 channel, LLFace* facep) ; + virtual void removeFace(U32 channel, LLFace* facep) ; + S32 getTotalNumFaces() const; + S32 getNumFaces(U32 ch) const; + const ll_face_list_t* getFaceList(U32 channel) const {llassert(channel < LLRender::NUM_TEXTURE_CHANNELS); return &mFaceList[channel];} virtual void addVolume(LLVOVolume* volumep); virtual void removeVolume(LLVOVolume* volumep); @@ -185,8 +185,8 @@ protected: mutable F32 mAdditionalDecodePriority; // priority add to mDecodePriority. LLFrameTimer mLastReferencedTimer; - ll_face_list_t mFaceList ; //reverse pointer pointing to the faces using this image as texture - U32 mNumFaces ; + ll_face_list_t mFaceList[LLRender::NUM_TEXTURE_CHANNELS]; //reverse pointer pointing to the faces using this image as texture + U32 mNumFaces[LLRender::NUM_TEXTURE_CHANNELS]; LLFrameTimer mLastFaceListUpdateTimer ; ll_volume_list_t mVolumeList; @@ -217,7 +217,6 @@ public: static S32 sMaxSmallImageSize ; static BOOL sFreezeImageScalingDown ;//do not scale down image res if set. static F32 sCurrentTime ; - static BOOL sUseTextureAtlas ; enum EDebugTexels { @@ -406,17 +405,12 @@ protected: S32 getCurrentDiscardLevelForFetching() ; private: - void init(bool firstinit) ; + void init(bool firstinit) ; void cleanup() ; void saveRawImage() ; void setCachedRawImage() ; - //for atlas - void resetFaceAtlas() ; - void invalidateAtlas(BOOL rebuild_geom) ; - BOOL insertToAtlas() ; - private: BOOL mFullyLoaded; BOOL mInDebug; @@ -453,7 +447,7 @@ protected: S8 mHasFetcher; // We've made a fecth request S8 mIsFetching; // Fetch request is active bool mCanUseHTTP ; //This texture can be fetched through http if true. - + FTType mFTType; // What category of image is this - map tile, server bake, etc? mutable S8 mIsMissingAsset; // True if we know that there is no image asset with this image id in the database. @@ -502,6 +496,7 @@ public: static LLPointer<LLViewerFetchedTexture> sWhiteImagep; // Texture to show NOTHING (whiteness) static LLPointer<LLViewerFetchedTexture> sDefaultImagep; // "Default" texture for error cases, the only case of fetched texture which is generated in local. static LLPointer<LLViewerFetchedTexture> sSmokeImagep; // Old "Default" translucent texture + static LLPointer<LLViewerFetchedTexture> sFlatNormalImagep; // Flat normal map denoting no bumpiness on a surface }; // @@ -559,12 +554,12 @@ public: void addMediaToFace(LLFace* facep) ; void removeMediaFromFace(LLFace* facep) ; - /*virtual*/ void addFace(LLFace* facep) ; - /*virtual*/ void removeFace(LLFace* facep) ; + /*virtual*/ void addFace(U32 ch, LLFace* facep) ; + /*virtual*/ void removeFace(U32 ch, LLFace* facep) ; /*virtual*/ F32 getMaxVirtualSize() ; private: - void switchTexture(LLFace* facep) ; + void switchTexture(U32 ch, LLFace* facep) ; BOOL findFaces() ; void stopPlaying() ; |