diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/lltexlayer.h | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/linden/indra/newview/lltexlayer.h b/linden/indra/newview/lltexlayer.h index 1924d0b..020ba86 100644 --- a/linden/indra/newview/lltexlayer.h +++ b/linden/indra/newview/lltexlayer.h | |||
@@ -41,6 +41,7 @@ | |||
41 | #include "lluuid.h" | 41 | #include "lluuid.h" |
42 | #include "llviewerimage.h" | 42 | #include "llviewerimage.h" |
43 | #include "llviewervisualparam.h" | 43 | #include "llviewervisualparam.h" |
44 | #include "llvoavatardefines.h" | ||
44 | #include "llwearable.h" | 45 | #include "llwearable.h" |
45 | #include "v4color.h" | 46 | #include "v4color.h" |
46 | #include "llfloater.h" | 47 | #include "llfloater.h" |
@@ -186,6 +187,7 @@ protected: | |||
186 | std::string mStaticImageFileName; | 187 | std::string mStaticImageFileName; |
187 | BOOL mStaticImageIsMask; | 188 | BOOL mStaticImageIsMask; |
188 | BOOL mUseLocalTextureAlphaOnly; // Ignore RGB channels from the input texture. Use alpha as a mask | 189 | BOOL mUseLocalTextureAlphaOnly; // Ignore RGB channels from the input texture. Use alpha as a mask |
190 | BOOL mIsVisibilityMask; | ||
189 | 191 | ||
190 | typedef std::vector<std::pair<std::string,BOOL> > morph_name_list_t; | 192 | typedef std::vector<std::pair<std::string,BOOL> > morph_name_list_t; |
191 | morph_name_list_t mMorphNameList; | 193 | morph_name_list_t mMorphNameList; |
@@ -205,14 +207,13 @@ protected: | |||
205 | class LLTexLayerSetBuffer : public LLDynamicTexture | 207 | class LLTexLayerSetBuffer : public LLDynamicTexture |
206 | { | 208 | { |
207 | public: | 209 | public: |
208 | LLTexLayerSetBuffer( LLTexLayerSet* owner, S32 width, S32 height, BOOL has_bump ); | 210 | LLTexLayerSetBuffer(LLTexLayerSet* owner, S32 width, S32 height); |
209 | virtual ~LLTexLayerSetBuffer(); | 211 | virtual ~LLTexLayerSetBuffer(); |
210 | 212 | ||
211 | virtual void preRender(BOOL clear_depth); | 213 | virtual void preRender(BOOL clear_depth); |
212 | virtual void postRender(BOOL success); | 214 | virtual void postRender(BOOL success); |
213 | virtual BOOL render(); | 215 | virtual BOOL render(); |
214 | BOOL updateImmediate(); | 216 | BOOL updateImmediate(); |
215 | void bindBumpTexture( U32 stage ); | ||
216 | bool isInitialized(void) const; | 217 | bool isInitialized(void) const; |
217 | BOOL needsRender(); | 218 | BOOL needsRender(); |
218 | void requestUpdate(); | 219 | void requestUpdate(); |
@@ -220,8 +221,7 @@ public: | |||
220 | void cancelUpload(); | 221 | void cancelUpload(); |
221 | BOOL uploadPending() { return mUploadPending; } | 222 | BOOL uploadPending() { return mUploadPending; } |
222 | BOOL render( S32 x, S32 y, S32 width, S32 height ); | 223 | BOOL render( S32 x, S32 y, S32 width, S32 height ); |
223 | void readBackAndUpload(U8* baked_bump_data); | 224 | void readBackAndUpload(); |
224 | void createBumpTexture() ; | ||
225 | 225 | ||
226 | static void onTextureUploadComplete( const LLUUID& uuid, | 226 | static void onTextureUploadComplete( const LLUUID& uuid, |
227 | void* userdata, | 227 | void* userdata, |
@@ -236,16 +236,13 @@ private: | |||
236 | void popProjection(); | 236 | void popProjection(); |
237 | 237 | ||
238 | private: | 238 | private: |
239 | BOOL mHasBump ; | ||
240 | BOOL mNeedsUpdate; | 239 | BOOL mNeedsUpdate; |
241 | BOOL mNeedsUpload; | 240 | BOOL mNeedsUpload; |
242 | BOOL mUploadPending; | 241 | BOOL mUploadPending; |
243 | LLUUID mUploadID; // Identifys the current upload process (null if none). Used to avoid overlaps (eg, when the user rapidly makes two changes outside of Face Edit) | 242 | LLUUID mUploadID; // Identifys the current upload process (null if none). Used to avoid overlaps (eg, when the user rapidly makes two changes outside of Face Edit) |
244 | LLTexLayerSet* mTexLayerSet; | 243 | LLTexLayerSet* mTexLayerSet; |
245 | LLPointer<LLImageGL> mBumpTex; // zero if none | ||
246 | 244 | ||
247 | static S32 sGLByteCount; | 245 | static S32 sGLByteCount; |
248 | static S32 sGLBumpByteCount; | ||
249 | }; | 246 | }; |
250 | 247 | ||
251 | //----------------------------------------------------------------------------- | 248 | //----------------------------------------------------------------------------- |
@@ -254,6 +251,7 @@ private: | |||
254 | //----------------------------------------------------------------------------- | 251 | //----------------------------------------------------------------------------- |
255 | class LLTexLayerSet | 252 | class LLTexLayerSet |
256 | { | 253 | { |
254 | friend class LLTexLayerSetBuffer; | ||
257 | public: | 255 | public: |
258 | LLTexLayerSet( LLVOAvatar* avatar ); | 256 | LLTexLayerSet( LLVOAvatar* avatar ); |
259 | ~LLTexLayerSet(); | 257 | ~LLTexLayerSet(); |
@@ -264,7 +262,7 @@ public: | |||
264 | BOOL setInfo(LLTexLayerSetInfo *info); | 262 | BOOL setInfo(LLTexLayerSetInfo *info); |
265 | 263 | ||
266 | BOOL render( S32 x, S32 y, S32 width, S32 height ); | 264 | BOOL render( S32 x, S32 y, S32 width, S32 height ); |
267 | BOOL renderBump( S32 x, S32 y, S32 width,S32 height ); | 265 | void renderAlphaMaskTextures(S32 x, S32 y, S32 width, S32 height, bool forceClear = false); |
268 | BOOL isBodyRegion( const std::string& region ) { return mInfo->mBodyRegion == region; } | 266 | BOOL isBodyRegion( const std::string& region ) { return mInfo->mBodyRegion == region; } |
269 | LLTexLayerSetBuffer* getComposite(); | 267 | LLTexLayerSetBuffer* getComposite(); |
270 | void requestUpdate(); | 268 | void requestUpdate(); |
@@ -283,8 +281,9 @@ public: | |||
283 | void applyMorphMask(U8* tex_data, S32 width, S32 height, S32 num_components); | 281 | void applyMorphMask(U8* tex_data, S32 width, S32 height, S32 num_components); |
284 | const std::string getBodyRegion() { return mInfo->mBodyRegion; } | 282 | const std::string getBodyRegion() { return mInfo->mBodyRegion; } |
285 | BOOL hasComposite() { return (mComposite != NULL); } | 283 | BOOL hasComposite() { return (mComposite != NULL); } |
286 | void setBump( BOOL b ) { mHasBump = b; } | 284 | LLVOAvatarDefines::EBakedTextureIndex getBakedTexIndex() { return mBakedTexIndex; } |
287 | BOOL hasBump() { return mHasBump; } | 285 | void setBakedTexIndex(LLVOAvatarDefines::EBakedTextureIndex index) { mBakedTexIndex = index; } |
286 | BOOL isVisible() const { return mIsVisible; } | ||
288 | 287 | ||
289 | public: | 288 | public: |
290 | static BOOL sHasCaches; | 289 | static BOOL sHasCaches; |
@@ -292,11 +291,14 @@ public: | |||
292 | protected: | 291 | protected: |
293 | typedef std::vector<LLTexLayer *> layer_list_t; | 292 | typedef std::vector<LLTexLayer *> layer_list_t; |
294 | layer_list_t mLayerList; | 293 | layer_list_t mLayerList; |
294 | layer_list_t mMaskLayerList; | ||
295 | LLTexLayerSetBuffer* mComposite; | 295 | LLTexLayerSetBuffer* mComposite; |
296 | // Backlink only; don't make this an LLPointer. | 296 | // Backlink only; don't make this an LLPointer. |
297 | LLVOAvatar* mAvatar; | 297 | LLVOAvatar* mAvatar; |
298 | BOOL mUpdatesEnabled; | 298 | BOOL mUpdatesEnabled; |
299 | BOOL mHasBump; | 299 | BOOL mIsVisible; |
300 | |||
301 | LLVOAvatarDefines::EBakedTextureIndex mBakedTexIndex; | ||
300 | 302 | ||
301 | LLTexLayerSetInfo *mInfo; | 303 | LLTexLayerSetInfo *mInfo; |
302 | }; | 304 | }; |
@@ -348,6 +350,9 @@ public: | |||
348 | BOOL renderImageRaw( U8* in_data, S32 in_width, S32 in_height, S32 in_components, S32 width, S32 height, BOOL is_mask ); | 350 | BOOL renderImageRaw( U8* in_data, S32 in_width, S32 in_height, S32 in_components, S32 width, S32 height, BOOL is_mask ); |
349 | BOOL renderAlphaMasks( S32 x, S32 y, S32 width, S32 height, LLColor4* colorp ); | 351 | BOOL renderAlphaMasks( S32 x, S32 y, S32 width, S32 height, LLColor4* colorp ); |
350 | BOOL hasAlphaParams() { return (!mParamAlphaList.empty());} | 352 | BOOL hasAlphaParams() { return (!mParamAlphaList.empty());} |
353 | BOOL blendAlphaTexture(S32 x, S32 y, S32 width, S32 height); | ||
354 | BOOL isVisibilityMask() const; | ||
355 | BOOL isInvisibleAlphaMask(); | ||
351 | 356 | ||
352 | protected: | 357 | protected: |
353 | LLTexLayerSet* mTexLayerSet; | 358 | LLTexLayerSet* mTexLayerSet; |