aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/lltexlayer.h
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/lltexlayer.h')
-rw-r--r--linden/indra/newview/lltexlayer.h49
1 files changed, 9 insertions, 40 deletions
diff --git a/linden/indra/newview/lltexlayer.h b/linden/indra/newview/lltexlayer.h
index 742b484..69132fe 100644
--- a/linden/indra/newview/lltexlayer.h
+++ b/linden/indra/newview/lltexlayer.h
@@ -4,7 +4,7 @@
4 * 4 *
5 * $LicenseInfo:firstyear=2002&license=viewergpl$ 5 * $LicenseInfo:firstyear=2002&license=viewergpl$
6 * 6 *
7 * Copyright (c) 2002-2008, Linden Research, Inc. 7 * Copyright (c) 2002-2009, Linden Research, Inc.
8 * 8 *
9 * Second Life Viewer Source Code 9 * Second Life Viewer Source Code
10 * The source code in this file ("Source Code") is provided by Linden Lab 10 * The source code in this file ("Source Code") is provided by Linden Lab
@@ -211,9 +211,8 @@ public:
211 virtual void postRender(BOOL success); 211 virtual void postRender(BOOL success);
212 virtual BOOL render(); 212 virtual BOOL render();
213 BOOL updateImmediate(); 213 BOOL updateImmediate();
214 virtual void bindTexture();
215 void bindBumpTexture( U32 stage ); 214 void bindBumpTexture( U32 stage );
216 BOOL isInitialized() { return mInitialized; } // Initialized here means that we've done at least one render 215 bool isInitialized(void) const;
217 BOOL needsRender(); 216 BOOL needsRender();
218 void requestUpdate(); 217 void requestUpdate();
219 void requestUpload(); 218 void requestUpload();
@@ -221,23 +220,28 @@ public:
221 BOOL uploadPending() { return mUploadPending; } 220 BOOL uploadPending() { return mUploadPending; }
222 BOOL render( S32 x, S32 y, S32 width, S32 height ); 221 BOOL render( S32 x, S32 y, S32 width, S32 height );
223 void readBackAndUpload(U8* baked_bump_data); 222 void readBackAndUpload(U8* baked_bump_data);
223 void createBumpTexture() ;
224
224 static void onTextureUploadComplete( const LLUUID& uuid, 225 static void onTextureUploadComplete( const LLUUID& uuid,
225 void* userdata, 226 void* userdata,
226 S32 result, LLExtStat ext_status); 227 S32 result, LLExtStat ext_status);
227 static void dumpTotalByteCount(); 228 static void dumpTotalByteCount();
228 229
230 virtual void restoreGLTexture() ;
231 virtual void destroyGLTexture() ;
232
229private: 233private:
230 void pushProjection(); 234 void pushProjection();
231 void popProjection(); 235 void popProjection();
232 236
233private: 237private:
238 BOOL mHasBump ;
234 BOOL mNeedsUpdate; 239 BOOL mNeedsUpdate;
235 BOOL mNeedsUpload; 240 BOOL mNeedsUpload;
236 BOOL mUploadPending; 241 BOOL mUploadPending;
237 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)
238 LLTexLayerSet* mTexLayerSet; 243 LLTexLayerSet* mTexLayerSet;
239 BOOL mInitialized; 244 LLPointer<LLImageGL> mBumpTex; // zero if none
240 LLGLuint mBumpTexName; // zero if none
241 245
242 static S32 sGLByteCount; 246 static S32 sGLByteCount;
243 static S32 sGLBumpByteCount; 247 static S32 sGLBumpByteCount;
@@ -529,41 +533,6 @@ public:
529}; 533};
530 534
531 535
532//-----------------------------------------------------------------------------
533// LLGradientPaletteList
534// A static set of ramp grayscale palettes. The "effective_weight" is used
535// to determine the x position of the ramp (offset)
536//
537// "Domain" isn't really the right word. It refers to the width of the
538// ramp portion of the function that relates input and output pixel values.
539// A domain of 0 gives a step function.
540//
541// | /----------------
542// O| / |
543// u| / |
544// t| / |
545// p|------------------/ |
546// u| | |
547// t|<---------------->|<-->|
548// | "offset" "domain"
549// |
550// --+---Input--------------------------------
551// |
552//-----------------------------------------------------------------------------
553class LLGradientPaletteList
554{
555public:
556 LLGradientPaletteList() {}
557 ~LLGradientPaletteList();
558
559 void initPalette(F32 domain);
560 void setHardwarePalette(F32 domain, F32 effective_weight);
561
562private:
563 typedef std::map<F32, U8*> palette_map_t;
564 palette_map_t mPaletteMap;
565};
566
567// Used by LLTexLayerSetBuffer for a callback. 536// Used by LLTexLayerSetBuffer for a callback.
568class LLBakedUploadData 537class LLBakedUploadData
569{ 538{