summaryrefslogtreecommitdiff
path: root/indra/llrender/llimagegl.h
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2009-06-21 08:04:56 +0000
committerSteven Bennetts <steve@lindenlab.com>2009-06-21 08:04:56 +0000
commit9ec432034dc3c45d7ce763eb02dae4cc7f6b8da8 (patch)
tree4a505c1e0919af52800b3ffb3eaf135e7d6f9ce6 /indra/llrender/llimagegl.h
parent351ebe9fcb76f3b99c2957004bb8493a904869ee (diff)
merge -r 122421-124917 viewer-2.0.0-2 -> viewer-2.0.0-3
ignore-dead-branch
Diffstat (limited to 'indra/llrender/llimagegl.h')
-rw-r--r--indra/llrender/llimagegl.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/indra/llrender/llimagegl.h b/indra/llrender/llimagegl.h
index 4f737bcaae..1775ae7de9 100644
--- a/indra/llrender/llimagegl.h
+++ b/indra/llrender/llimagegl.h
@@ -37,11 +37,15 @@
#include "llimage.h"
#include "llgltypes.h"
-#include "llmemory.h"
+#include "llpointer.h"
+#include "llrefcount.h"
#include "v2math.h"
#include "llrender.h"
+#define BYTES_TO_MEGA_BYTES(x) ((x) >> 20)
+#define MEGA_BYTES_TO_BYTES(x) ((x) << 20)
+
//============================================================================
class LLImageGL : public LLRefCount
@@ -54,6 +58,7 @@ public:
static S32 dataFormatComponents(S32 dataformat);
void updateBindStats(void) const;
+ virtual void updateTestStats(void) const;
// needs to be called every frame
static void updateStats(F32 current_time);
@@ -107,7 +112,7 @@ public:
BOOL setSubImageFromFrameBuffer(S32 fb_x, S32 fb_y, S32 x_pos, S32 y_pos, S32 width, S32 height);
BOOL setDiscardLevel(S32 discard_level);
// Read back a raw image for this discard level, if it exists
- BOOL readBackRaw(S32 discard_level, LLImageRaw* imageraw, bool compressed_ok);
+ BOOL readBackRaw(S32 discard_level, LLImageRaw* imageraw, bool compressed_ok) const;
void destroyGLTexture();
void setExplicitFormat(LLGLint internal_format, LLGLenum primary_format, LLGLenum type_format = 0, BOOL swap_bytes = FALSE);
@@ -238,12 +243,13 @@ public:
static LLGLuint sCurrentBoundTextures[MAX_GL_TEXTURE_UNITS]; // Currently bound texture ID
// Global memory statistics
- static S32 sGlobalTextureMemory; // Tracks main memory texmem
- static S32 sBoundTextureMemory; // Tracks bound texmem for last completed frame
+ static S32 sGlobalTextureMemoryInBytes; // Tracks main memory texmem
+ static S32 sBoundTextureMemoryInBytes; // Tracks bound texmem for last completed frame
static S32 sCurBoundTextureMemory; // Tracks bound texmem for current frame
static U32 sBindCount; // Tracks number of texture binds for current frame
static U32 sUniqueCount; // Tracks number of unique texture binds for current frame
static BOOL sGlobalUseAnisotropic;
+
#if DEBUG_MISS
BOOL mMissed; // Missed on last bind?
BOOL getMissed() const { return mMissed; };