summaryrefslogtreecommitdiff
path: root/indra/llrender/llgltexture.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llrender/llgltexture.h')
-rw-r--r--indra/llrender/llgltexture.h41
1 files changed, 21 insertions, 20 deletions
diff --git a/indra/llrender/llgltexture.h b/indra/llrender/llgltexture.h
index 24849d1d1b..8fca538f49 100644
--- a/indra/llrender/llgltexture.h
+++ b/indra/llrender/llgltexture.h
@@ -42,7 +42,7 @@ class LLGLTexture : public LLTexture
public:
enum
{
- MAX_IMAGE_SIZE_DEFAULT = 1024,
+ MAX_IMAGE_SIZE_DEFAULT = 2048,
INVALID_DISCARD_LEVEL = 0x7fff
};
@@ -52,10 +52,11 @@ public:
BOOST_AVATAR ,
BOOST_AVATAR_BAKED ,
BOOST_SCULPTED ,
+ BOOST_TERRAIN , // Needed for minimap generation for now. Lower than BOOST_HIGH so the texture stats don't get forced, i.e. texture stats are manually managed by minimap/terrain instead.
BOOST_HIGH = 10,
BOOST_BUMP ,
- BOOST_TERRAIN , // has to be high priority for minimap / low detail
+ BOOST_UNUSED_1 , // Placeholder to avoid disrupting habits around texture debug
BOOST_SELECTED ,
BOOST_AVATAR_BAKED_SELF ,
BOOST_AVATAR_SELF , // needed for baking avatar
@@ -93,9 +94,9 @@ protected:
LOG_CLASS(LLGLTexture);
public:
- LLGLTexture(BOOL usemipmaps = TRUE);
- LLGLTexture(const LLImageRaw* raw, BOOL usemipmaps) ;
- LLGLTexture(const U32 width, const U32 height, const U8 components, BOOL usemipmaps) ;
+ LLGLTexture(bool usemipmaps = true);
+ LLGLTexture(const LLImageRaw* raw, bool usemipmaps) ;
+ LLGLTexture(const U32 width, const U32 height, const U8 components, bool usemipmaps) ;
virtual void dump(); // debug info to LL_INFOS()
@@ -116,25 +117,25 @@ public:
/*virtual*/S32 getWidth(S32 discard_level = -1) const;
/*virtual*/S32 getHeight(S32 discard_level = -1) const;
- BOOL hasGLTexture() const ;
+ bool hasGLTexture() const ;
LLGLuint getTexName() const ;
- BOOL createGLTexture() ;
+ bool createGLTexture() ;
// Create a GL Texture from an image raw
// discard_level - mip level, 0 for highest resultion mip
// imageraw - the image to copy from
// usename - explicit GL name override
- // to_create - set to FALSE to force gl texture to not be created
+ // to_create - set to false to force gl texture to not be created
// category - LLGLTexture category for this LLGLTexture
// defer_copy - set to true to allocate GL texture but NOT initialize with imageraw data
// tex_name - if not null, will be set to the GL name of the texture created
- BOOL createGLTexture(S32 discard_level, const LLImageRaw* imageraw, S32 usename = 0, BOOL to_create = TRUE, S32 category = LLGLTexture::OTHER, bool defer_copy = false, LLGLuint* tex_name = nullptr);
+ bool createGLTexture(S32 discard_level, const LLImageRaw* imageraw, S32 usename = 0, bool to_create = true, S32 category = LLGLTexture::OTHER, bool defer_copy = false, LLGLuint* tex_name = nullptr);
void setFilteringOption(LLTexUnit::eTextureFilterOptions option);
- void setExplicitFormat(LLGLint internal_format, LLGLenum primary_format, LLGLenum type_format = 0, BOOL swap_bytes = FALSE);
+ void setExplicitFormat(LLGLint internal_format, LLGLenum primary_format, LLGLenum type_format = 0, bool swap_bytes = false);
void setAddressMode(LLTexUnit::eTextureAddressMode mode);
- BOOL setSubImage(const LLImageRaw* imageraw, S32 x_pos, S32 y_pos, S32 width, S32 height, LLGLuint use_name = 0);
- BOOL setSubImage(const U8* datap, S32 data_width, S32 data_height, S32 x_pos, S32 y_pos, S32 width, S32 height, LLGLuint use_name = 0);
+ bool setSubImage(const LLImageRaw* imageraw, S32 x_pos, S32 y_pos, S32 width, S32 height, LLGLuint use_name = 0);
+ bool setSubImage(const U8* datap, S32 data_width, S32 data_height, S32 x_pos, S32 y_pos, S32 width, S32 height, LLGLuint use_name = 0);
void setGLTextureCreated (bool initialized);
void setCategory(S32 category) ;
void setTexName(LLGLuint); // for forcing w/ externally created textures only
@@ -144,20 +145,20 @@ public:
S32 getMaxDiscardLevel() const;
S32 getDiscardLevel() const;
S8 getComponents() const;
- BOOL getBoundRecently() const;
+ bool getBoundRecently() const;
S32Bytes getTextureMemory() const ;
LLGLenum getPrimaryFormat() const;
- BOOL getIsAlphaMask() const ;
+ bool getIsAlphaMask() const ;
LLTexUnit::eTextureType getTarget(void) const ;
- BOOL getMask(const LLVector2 &tc);
+ bool getMask(const LLVector2 &tc);
F32 getTimePassedSinceLastBound();
- BOOL getMissed() const ;
- BOOL isJustBound()const ;
+ bool getMissed() const ;
+ bool isJustBound()const ;
void forceUpdateBindStats(void) const;
U32 getTexelsInAtlas() const ;
U32 getTexelsInGLTexture() const ;
- BOOL isGLTextureCreated() const ;
+ bool isGLTextureCreated() const ;
S32 getDiscardLevelInAtlas() const ;
LLGLTextureState getTextureState() const { return mTextureState; }
@@ -170,7 +171,7 @@ public:
void forceActive() ;
void setNoDelete() ;
void dontDiscard() { mDontDiscard = 1; mTextureState = NO_DELETE; }
- BOOL getDontDiscard() const { return mDontDiscard; }
+ bool getDontDiscard() const { return mDontDiscard; }
//-----------------
private:
@@ -187,7 +188,7 @@ protected:
S32 mBoostLevel; // enum describing priority level
U32 mFullWidth;
U32 mFullHeight;
- BOOL mUseMipMaps;
+ bool mUseMipMaps;
S8 mComponents;
U32 mTexelsPerImage; // Texels per image.
mutable S8 mNeedsGLTexture;