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