diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llface.h | 38 |
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 | ||
53 | class LLFacePool; | 52 | class LLFacePool; |
54 | class LLVolume; | 53 | class LLVolume; |
@@ -57,7 +56,6 @@ class LLTextureEntry; | |||
57 | class LLVertexProgram; | 56 | class LLVertexProgram; |
58 | class LLViewerImage; | 57 | class LLViewerImage; |
59 | class LLGeometryManager; | 58 | class LLGeometryManager; |
60 | class LLTextureAtlasSlot; | ||
61 | 59 | ||
62 | const F32 MIN_ALPHA_SIZE = 1024.f; | 60 | const F32 MIN_ALPHA_SIZE = 1024.f; |
63 | const F32 MIN_TEX_ANIM_SIZE = 512.f; | 61 | const 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); | 195 | private: |
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; | 198 | public: |
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 | ||
207 | public: | 201 | public: |
208 | 202 | ||
@@ -218,7 +212,7 @@ public: | |||
218 | LLMatrix4* mTextureMatrix; | 212 | LLMatrix4* mTextureMatrix; |
219 | LLDrawInfo* mDrawInfo; | 213 | LLDrawInfo* mDrawInfo; |
220 | 214 | ||
221 | protected: | 215 | private: |
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 | |||
255 | protected: | 251 | protected: |
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 | { |