aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llviewerimage.h
diff options
context:
space:
mode:
authorMcCabe Maxsted2009-06-07 23:14:43 -0700
committerMcCabe Maxsted2009-06-07 23:14:43 -0700
commite0a70bea805cf07b92efabca15ffe56a777f90ac (patch)
tree2c93d38e210832e737d09cff7561373d8d5453b2 /linden/indra/newview/llviewerimage.h
parent1.1 version final (diff)
parentMerge branch 'sl-base-1.22' into next (diff)
downloadmeta-impy-e0a70bea805cf07b92efabca15ffe56a777f90ac.zip
meta-impy-e0a70bea805cf07b92efabca15ffe56a777f90ac.tar.gz
meta-impy-e0a70bea805cf07b92efabca15ffe56a777f90ac.tar.bz2
meta-impy-e0a70bea805cf07b92efabca15ffe56a777f90ac.tar.xz
Moved base up to 1.22
Diffstat (limited to 'linden/indra/newview/llviewerimage.h')
-rw-r--r--linden/indra/newview/llviewerimage.h39
1 files changed, 4 insertions, 35 deletions
diff --git a/linden/indra/newview/llviewerimage.h b/linden/indra/newview/llviewerimage.h
index 60d9fb8..c735cb0 100644
--- a/linden/indra/newview/llviewerimage.h
+++ b/linden/indra/newview/llviewerimage.h
@@ -4,7 +4,7 @@
4 * 4 *
5 * $LicenseInfo:firstyear=2000&license=viewergpl$ 5 * $LicenseInfo:firstyear=2000&license=viewergpl$
6 * 6 *
7 * Copyright (c) 2000-2008, Linden Research, Inc. 7 * Copyright (c) 2000-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
@@ -86,17 +86,6 @@ public:
86 static LLViewerImage * getImage(const LLUUID &image_id); 86 static LLViewerImage * getImage(const LLUUID &image_id);
87 // lightweight wrapper for gImageList.getImage() 87 // lightweight wrapper for gImageList.getImage()
88 88
89 static BOOL bindTexture(LLImageGL* image, const U32 stage = 0)
90 {
91 if (image)
92 {
93 return image->bind(stage);
94 }
95 else
96 {
97 return sDefaultImagep->bind(stage);
98 }
99 }
100 89
101 struct Compare 90 struct Compare
102 { 91 {
@@ -189,7 +178,8 @@ public:
189 178
190 /*virtual*/ void dump(); // debug info to llinfos 179 /*virtual*/ void dump(); // debug info to llinfos
191 180
192 /*virtual*/ BOOL bind(const S32 stage = 0) const; 181 /*virtual*/ bool bindError(const S32 stage = 0) const;
182 /*virtual*/ bool bindDefaultImage(const S32 stage = 0) const;
193 183
194 void reinit(BOOL usemipmaps = TRUE); 184 void reinit(BOOL usemipmaps = TRUE);
195 185
@@ -197,27 +187,7 @@ public:
197 187
198 // New methods for determining image quality/priority 188 // New methods for determining image quality/priority
199 // texel_area_ratio is ("scaled" texel area)/(original texel area), approximately. 189 // texel_area_ratio is ("scaled" texel area)/(original texel area), approximately.
200 void addTextureStats(F32 pixel_area) const 190 void addTextureStats(F32 virtual_size) const;
201 {
202 mMaxCosAngle = 1.0f;
203 if (pixel_area > mMaxVirtualSize)
204 {
205 mMaxVirtualSize = pixel_area;
206 }
207 }
208 void addTextureStats(F32 pixel_area,
209 F32 texel_area_ratio) const
210 {
211 mMaxCosAngle = 1.0f;
212 F32 virtual_size = pixel_area / texel_area_ratio;
213 if (virtual_size > mMaxVirtualSize)
214 {
215 mMaxVirtualSize = virtual_size;
216 }
217 }
218 void addTextureStats(F32 pixel_area,
219 F32 texel_area_ratio,
220 F32 cos_center_angle) const;
221 void resetTextureStats(BOOL zero = FALSE); 191 void resetTextureStats(BOOL zero = FALSE);
222 192
223 // Process image stats to determine priority/quality requirements. 193 // Process image stats to determine priority/quality requirements.
@@ -314,7 +284,6 @@ public:
314 284
315 // Data used for calculating required image priority/quality level/decimation 285 // Data used for calculating required image priority/quality level/decimation
316 mutable F32 mMaxVirtualSize; // The largest virtual size of the image, in pixels - how much data to we need? 286 mutable F32 mMaxVirtualSize; // The largest virtual size of the image, in pixels - how much data to we need?
317 mutable F32 mMaxCosAngle; // The largest cos of the angle between camera X vector and the object
318 287
319 F32 mTexelsPerImage; // Texels per image. 288 F32 mTexelsPerImage; // Texels per image.
320 F32 mDiscardVirtualSize; // Virtual size used to calculate desired discard 289 F32 mDiscardVirtualSize; // Virtual size used to calculate desired discard