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