aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llface.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llface.h38
1 files changed, 17 insertions, 21 deletions
diff --git a/linden/indra/newview/llface.h b/linden/indra/newview/llface.h
index 9f76d6b..4893e82 100644
--- a/linden/indra/newview/llface.h
+++ b/linden/indra/newview/llface.h
@@ -48,7 +48,6 @@
48#include "llviewerimage.h" 48#include "llviewerimage.h"
49#include "llstat.h" 49#include "llstat.h"
50#include "lldrawable.h" 50#include "lldrawable.h"
51#include "lltextureatlasmanager.h"
52 51
53class LLFacePool; 52class LLFacePool;
54class LLVolume; 53class LLVolume;
@@ -57,7 +56,6 @@ class LLTextureEntry;
57class LLVertexProgram; 56class LLVertexProgram;
58class LLViewerImage; 57class LLViewerImage;
59class LLGeometryManager; 58class LLGeometryManager;
60class LLTextureAtlasSlot;
61 59
62const F32 MIN_ALPHA_SIZE = 1024.f; 60const F32 MIN_ALPHA_SIZE = 1024.f;
63const F32 MIN_TEX_ANIM_SIZE = 512.f; 61const F32 MIN_TEX_ANIM_SIZE = 512.f;
@@ -191,18 +189,14 @@ public:
191 void setIndicesIndex(S32 idx) { mIndicesIndex = idx; } 189 void setIndicesIndex(S32 idx) { mIndicesIndex = idx; }
192 void setDrawInfo(LLDrawInfo* draw_info); 190 void setDrawInfo(LLDrawInfo* draw_info);
193 191
194 // KL was atlas S19 192 F32 getTextureVirtualSize() ;
195 LLImageGL* getGLTexture() const; 193 F32 getImportanceToCamera()const {return mImportanceToCamera ;}
196 LLTextureAtlasSlot* getAtlasInfo() ; 194
197 void setAtlasInUse(BOOL flag); 195private:
198 void setAtlasInfo(LLTextureAtlasSlot* atlasp); 196 F32 adjustPartialOverlapPixelArea(F32 cos_angle_to_view_dir, F32 radius );
199 BOOL isAtlasInUse()const; 197 F32 calcPixelArea(F32& cos_angle_to_view_dir, F32& radius) ;
200 BOOL canUseAtlas() const; 198public:
201 const LLVector2* getTexCoordScale() const ; 199 static F32 calcImportanceToCamera(F32 to_view_dir, F32 dist);
202 const LLVector2* getTexCoordOffset()const;
203 const LLTextureAtlas* getAtlas()const ;
204 void removeAtlas() ;
205 BOOL switchTexture() ;
206 200
207public: 201public:
208 202
@@ -218,7 +212,7 @@ public:
218 LLMatrix4* mTextureMatrix; 212 LLMatrix4* mTextureMatrix;
219 LLDrawInfo* mDrawInfo; 213 LLDrawInfo* mDrawInfo;
220 214
221protected: 215private:
222 friend class LLGeometryManager; 216 friend class LLGeometryManager;
223 friend class LLVolumeGeometryManager; 217 friend class LLVolumeGeometryManager;
224 218
@@ -248,10 +242,12 @@ protected:
248 F32 mVSize; 242 F32 mVSize;
249 F32 mPixelArea; 243 F32 mPixelArea;
250 244
251 //atlas 245 //importance factor, in the range [0, 1.0].
252 LLPointer<LLTextureAtlasSlot> mAtlasInfop ; 246 //1.0: the most important.
253 BOOL mUsingAtlas ; 247 //based on the distance from the face to the view point and the angle from the face center to the view direction.
254 248 F32 mImportanceToCamera ;
249 F32 mBoundingSphereRadius ;
250
255protected: 251protected:
256 static BOOL sSafeRenderSelect; 252 static BOOL sSafeRenderSelect;
257 253
@@ -279,9 +275,9 @@ public:
279 const LLTextureEntry* lte = lhs->getTextureEntry(); 275 const LLTextureEntry* lte = lhs->getTextureEntry();
280 const LLTextureEntry* rte = rhs->getTextureEntry(); 276 const LLTextureEntry* rte = rhs->getTextureEntry();
281 277
282 if(lhs->getGLTexture() != rhs->getGLTexture()) // KL SD get GL 278 if (lhs->getTexture() != rhs->getTexture())
283 { 279 {
284 return lhs->getGLTexture() < rhs->getGLTexture(); // not getTexture? 280 return lhs->getTexture() < rhs->getTexture();
285 } 281 }
286 else if (lte->getBumpShinyFullbright() != rte->getBumpShinyFullbright()) 282 else if (lte->getBumpShinyFullbright() != rte->getBumpShinyFullbright())
287 { 283 {