LLImageGL Class Reference

#include <llimagegl.h>

Inheritance diagram for LLImageGL:

Inheritance graph
[legend]
Collaboration diagram for LLImageGL:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 LLImageGL (BOOL usemipmaps=TRUE)
 LLImageGL (U32 width, U32 height, U8 components, BOOL usemipmaps=TRUE)
 LLImageGL (const LLImageRaw *imageraw, BOOL usemipmaps=TRUE)
virtual void dump ()
virtual BOOL bind (const S32 stage=0) const
void setSize (S32 width, S32 height, S32 ncomponents)
BOOL createGLTexture (S32 discard_level, const LLImageRaw *imageraw, S32 usename=0)
BOOL createGLTexture (S32 discard_level, const U8 *data, BOOL data_hasmips=FALSE, S32 usename=0)
void setImage (const LLImageRaw *imageraw)
void setImage (const U8 *data_in, BOOL data_hasmips=FALSE)
BOOL setSubImage (const LLImageRaw *imageraw, S32 x_pos, S32 y_pos, S32 width, S32 height)
BOOL setSubImage (const U8 *datap, S32 data_width, S32 data_height, S32 x_pos, S32 y_pos, S32 width, S32 height)
BOOL setSubImageFromFrameBuffer (S32 fb_x, S32 fb_y, S32 x_pos, S32 y_pos, S32 width, S32 height)
BOOL setDiscardLevel (S32 discard_level)
BOOL readBackRaw (S32 discard_level, LLImageRaw *imageraw, bool compressed_ok)
void destroyGLTexture ()
void setClamp (BOOL clamps, BOOL clampt)
void setMipFilterNearest (BOOL nearest, BOOL min_nearest=FALSE)
void setExplicitFormat (LLGLint internal_format, LLGLenum primary_format, LLGLenum type_format=0, BOOL swap_bytes=FALSE)
void dontDiscard ()
S32 getDiscardLevel () const
S32 getMaxDiscardLevel () const
S32 getWidth (S32 discard_level=-1) const
S32 getHeight (S32 discard_level=-1) const
U8 getComponents () const
S32 getBytes (S32 discard_level=-1) const
S32 getMipBytes (S32 discard_level=-1) const
BOOL getBoundRecently () const
LLGLenum getPrimaryFormat () const
BOOL getClampS () const
BOOL getClampT () const
BOOL getMipFilterNearest () const
BOOL getHasGLTexture () const
LLGLuint getTexName () const
BOOL getIsResident (BOOL test_now=FALSE)
void setTarget (const LLGLenum target, const LLGLenum bind_target)
BOOL getUseMipMaps () const
void setUseMipMaps (BOOL usemips)
BOOL getUseDiscard () const
BOOL getDontDiscard () const
BOOL getMissed () const

Static Public Member Functions

static S32 dataFormatBits (S32 dataformat)
static S32 dataFormatBytes (S32 dataformat, S32 width, S32 height)
static S32 dataFormatComponents (S32 dataformat)
static void bindExternalTexture (LLGLuint gl_name, S32 stage, LLGLenum bind_target)
static void unbindTexture (S32 stage, LLGLenum target)
static void unbindTexture (S32 stage)
static void updateStats (F32 current_time)
static void destroyGL (BOOL save_state=TRUE)
static void restoreGL ()
static S32 updateBoundTexMem (const S32 delta)
static bool checkSize (S32 width, S32 height)
static BOOL create (LLPointer< LLImageGL > &dest, BOOL usemipmaps=TRUE)
static BOOL create (LLPointer< LLImageGL > &dest, U32 width, U32 height, U8 components, BOOL usemipmaps=TRUE)
static BOOL create (LLPointer< LLImageGL > &dest, const LLImageRaw *imageraw, BOOL usemipmaps=TRUE)

Public Attributes

S32 mTextureMemory
F32 mLastBindTime

Static Public Attributes

static std::set< LLImageGL * > sImageList
static S32 sCount = 0
static F32 sLastFrameTime = 0.f
static LLGLuint sCurrentBoundTextures [MAX_GL_TEXTURE_UNITS] = { 0 }
static S32 sGlobalTextureMemory = 0
static S32 sBoundTextureMemory = 0
static S32 sCurBoundTextureMemory = 0
static BOOL sGlobalUseAnisotropic = FALSE

Protected Member Functions

virtual ~LLImageGL ()
BOOL bindTextureInternal (const S32 stage=0) const
void init (BOOL usemipmaps)
virtual void cleanup ()

Protected Attributes

LLGLenum mTarget
LLGLenum mBindTarget
LLGLuint mTexName
LLGLboolean mIsResident
U16 mWidth
U16 mHeight
S8 mComponents
S8 mMaxDiscardLevel
S8 mCurrentDiscardLevel
S8 mDontDiscard
S8 mClampS
S8 mClampT
S8 mMipFilterNearest
LLGLint mFormatInternal
LLGLenum mFormatPrimary
LLGLenum mFormatType
BOOL mFormatSwapBytes

Private Attributes

LLPointer< LLImageRawmSaveData
S8 mUseMipMaps
S8 mHasMipMaps
S8 mHasExplicitFormat
S8 mAutoGenMips

Detailed Description

Definition at line 43 of file llimagegl.h.


Constructor & Destructor Documentation

LLImageGL::LLImageGL ( BOOL  usemipmaps = TRUE  ) 

Definition at line 241 of file llimagegl.cpp.

References init(), sCount, setSize(), and sImageList.

Referenced by create(), and LLViewerImage::initClass().

LLImageGL::LLImageGL ( U32  width,
U32  height,
U8  components,
BOOL  usemipmaps = TRUE 
)

Definition at line 250 of file llimagegl.cpp.

References init(), llassert, sCount, setSize(), and sImageList.

LLImageGL::LLImageGL ( const LLImageRaw imageraw,
BOOL  usemipmaps = TRUE 
)

Definition at line 260 of file llimagegl.cpp.

References createGLTexture(), init(), sCount, setSize(), and sImageList.

LLImageGL::~LLImageGL (  )  [protected, virtual]

Definition at line 270 of file llimagegl.cpp.

References cleanup(), sCount, and sImageList.


Member Function Documentation

BOOL LLImageGL::bind ( const S32  stage = 0  )  const [virtual]

Reimplemented in LLViewerImage.

Definition at line 449 of file llimagegl.cpp.

References bindTextureInternal(), and FALSE.

Referenced by LLDrawPoolBump::bindBumpMap(), LLViewerImage::bindTexture(), LLJoystickCameraRotate::drawRotatedImage(), gl_draw_scaled_image_inverted(), gl_draw_scaled_image_with_border(), gl_draw_scaled_rotated_image(), LLTexLayer::render(), LLTexLayerSet::render(), LLFontGL::render(), LLTexLayer::renderAlphaMasks(), LLDrawPoolSky::renderHeavenlyBody(), and LLDrawPoolSky::renderSunHalo().

void LLImageGL::bindExternalTexture ( LLGLuint  gl_name,
S32  stage,
LLGLenum  bind_target 
) [static]

Definition at line 124 of file llimagegl.cpp.

References glClientActiveTextureARB, and sCurrentBoundTextures.

Referenced by LLTexLayerSetBuffer::bindBumpTexture(), LLVOAvatar::bindScratchTexture(), LLFloaterImport::draw(), LLFloaterImagePreview::draw(), LLViewerJointMesh::drawShape(), LLVOAvatar::getScratchTexName(), LLTexLayerSetBuffer::LLTexLayerSetBuffer(), LLVOAvatar::onBakedTextureMasksLoaded(), LLTexLayerSetBuffer::render(), and LLTexLayer::renderImageRaw().

BOOL LLImageGL::bindTextureInternal ( const S32  stage = 0  )  const [protected]

Definition at line 407 of file llimagegl.cpp.

References FALSE, getIsResident(), gGLManager, llendl, llwarns, mBindTarget, LLGLManager::mIsDisabled, mLastBindTime, mTexName, mTextureMemory, sCurrentBoundTextures, sLastFrameTime, TRUE, and updateBoundTexMem().

Referenced by LLViewerImage::bind(), bind(), createGLTexture(), readBackRaw(), setImage(), setSubImage(), and setSubImageFromFrameBuffer().

bool LLImageGL::checkSize ( S32  width,
S32  height 
) [static]

Definition at line 336 of file llimagegl.cpp.

References check_power_of_two().

Referenced by LLViewerImage::createTexture(), and setSize().

void LLImageGL::cleanup (  )  [protected, virtual]

Reimplemented in LLViewerImage.

Definition at line 311 of file llimagegl.cpp.

References destroyGLTexture(), gGLManager, LLGLManager::mIsDisabled, mSaveData, and NULL.

Referenced by LLViewerImage::cleanup(), and ~LLImageGL().

BOOL LLImageGL::create ( LLPointer< LLImageGL > &  dest,
const LLImageRaw imageraw,
BOOL  usemipmaps = TRUE 
) [static]

Definition at line 233 of file llimagegl.cpp.

References LLImageGL(), and TRUE.

BOOL LLImageGL::create ( LLPointer< LLImageGL > &  dest,
U32  width,
U32  height,
U8  components,
BOOL  usemipmaps = TRUE 
) [static]

Definition at line 227 of file llimagegl.cpp.

References LLImageGL(), and TRUE.

BOOL LLImageGL::create ( LLPointer< LLImageGL > &  dest,
BOOL  usemipmaps = TRUE 
) [static]

Definition at line 221 of file llimagegl.cpp.

References LLImageGL(), and TRUE.

BOOL LLImageGL::createGLTexture ( S32  discard_level,
const U8 data,
BOOL  data_hasmips = FALSE,
S32  usename = 0 
)

Definition at line 845 of file llimagegl.cpp.

References bindTextureInternal(), FALSE, getMipBytes(), gGLManager, llassert, llclamp(), llendl, llerrs, llverify, mAutoGenMips, mBindTarget, mClampS, mClampT, mCurrentDiscardLevel, mFormatInternal, mFormatPrimary, LLGLManager::mHasMipMapGeneration, LLGLManager::mIsGF2or4MX, mLastBindTime, mMaxDiscardLevel, mMipFilterNearest, mTexName, mTextureMemory, mUseMipMaps, S32, setClamp(), setImage(), setMipFilterNearest(), sGlobalTextureMemory, sLastFrameTime, stop_glerror, TRUE, and unbindTexture().

BOOL LLImageGL::createGLTexture ( S32  discard_level,
const LLImageRaw imageraw,
S32  usename = 0 
)

Definition at line 786 of file llimagegl.cpp.

References FALSE, getComponents(), LLImageBase::getComponents(), LLImageBase::getData(), LLImageBase::getHeight(), LLImageBase::getWidth(), gGLManager, gNoRender, llassert, llclamp(), llendl, llerrs, llwarns, mComponents, mCurrentDiscardLevel, mFormatInternal, mFormatPrimary, mFormatType, mHasExplicitFormat, LLGLManager::mInited, LLGLManager::mIsDisabled, mMaxDiscardLevel, S32, setSize(), and stop_glerror.

Referenced by LLViewerImage::createTexture(), LLViewerImage::initClass(), LLImageGL(), LLBumpImageList::onSourceLoaded(), and setDiscardLevel().

S32 LLImageGL::dataFormatBits ( S32  dataformat  )  [static]

Definition at line 65 of file llimagegl.cpp.

References llendl, and llerrs.

Referenced by dataFormatBytes().

S32 LLImageGL::dataFormatBytes ( S32  dataformat,
S32  width,
S32  height 
) [static]

Definition at line 87 of file llimagegl.cpp.

References dataFormatBits(), and S32.

Referenced by getBytes(), getMipBytes(), and setImage().

S32 LLImageGL::dataFormatComponents ( S32  dataformat  )  [static]

Definition at line 101 of file llimagegl.cpp.

References llendl, and llerrs.

void LLImageGL::destroyGL ( BOOL  save_state = TRUE  )  [static]

Definition at line 176 of file llimagegl.cpp.

References gGLManager, LLGLManager::mNumTextureUnits, S32, sImageList, stop_glerror, and unbindTexture().

Referenced by LLViewerImageList::destroyGL().

void LLImageGL::destroyGLTexture (  ) 

Definition at line 1037 of file llimagegl.cpp.

References gGLManager, i, LLGLManager::mNumTextureUnits, mTexName, mTextureMemory, sCurrentBoundTextures, sGlobalTextureMemory, stop_glerror, and unbindTexture().

Referenced by cleanup(), setSize(), and LLBumpImageList::updateImages().

void LLImageGL::dontDiscard (  )  [inline]

Definition at line 105 of file llimagegl.h.

References mDontDiscard.

Referenced by LLViewerImage::initClass(), and LLViewerImageList::preloadImage().

void LLImageGL::dump (  )  [virtual]

Reimplemented in LLViewerImage.

Definition at line 380 of file llimagegl.cpp.

References llendl, llinfos, mBindTarget, mCurrentDiscardLevel, mFormatInternal, mFormatPrimary, mFormatSwapBytes, mFormatType, mHasExplicitFormat, mHasMipMaps, mIsResident, mLastBindTime, mMaxDiscardLevel, mTarget, mTexName, mTextureMemory, mUseMipMaps, and S32.

Referenced by LLViewerImage::dump(), setDiscardLevel(), and setSubImage().

BOOL LLImageGL::getBoundRecently (  )  const

Definition at line 1193 of file llimagegl.cpp.

References MIN_TEXTURE_LIFETIME, mLastBindTime, and sLastFrameTime.

Referenced by LLViewerImage::calcDecodePriority(), LLViewerImage::processTextureStats(), and LLBumpImageList::updateImages().

S32 LLImageGL::getBytes ( S32  discard_level = -1  )  const

Definition at line 1159 of file llimagegl.cpp.

References dataFormatBytes(), mCurrentDiscardLevel, mFormatPrimary, mHeight, mWidth, and S32.

BOOL LLImageGL::getClampS (  )  const [inline]

Definition at line 118 of file llimagegl.h.

References mClampS.

Referenced by LLTexLayer::renderAlphaMasks().

BOOL LLImageGL::getClampT (  )  const [inline]

Definition at line 119 of file llimagegl.h.

References mClampT.

Referenced by LLTexLayer::renderAlphaMasks().

U8 LLImageGL::getComponents (  )  const [inline]

Definition at line 112 of file llimagegl.h.

References mComponents.

Referenced by createGLTexture(), LLVLComposition::generateTexture(), LLTexLayerParamAlpha::getCacheByteCount(), LLPipeline::getPoolTypeFromTE(), LLFace::printDebugInfo(), readBackRaw(), LLTexLayer::renderAlphaMasks(), setImage(), setSubImage(), LLViewerImage::updateFetch(), and LLPanelRegionTextureInfo::validateTextureSizes().

S32 LLImageGL::getDiscardLevel (  )  const [inline]

Definition at line 107 of file llimagegl.h.

References mCurrentDiscardLevel.

Referenced by LLViewerImage::calcDecodePriority(), LLViewerImage::doLoadedCallbacks(), LLVOAvatar::dumpLocalTextures(), LLViewerImage::CompareForRemoval::operator()(), LLViewerImage::processTextureStats(), LLVOAvatar::setLocalTexture(), and LLViewerImage::updateFetch().

BOOL LLImageGL::getDontDiscard (  )  const [inline]

Definition at line 132 of file llimagegl.h.

References mDontDiscard.

Referenced by LLViewerImage::calcDecodePriority().

BOOL LLImageGL::getHasGLTexture (  )  const [inline]

Definition at line 122 of file llimagegl.h.

References mTexName.

Referenced by LLWorldMapView::draw(), LLTexLayerParamAlpha::getCacheByteCount(), LLBumpImageList::updateImages(), and LLVOAvatar::writeCAL3D().

S32 LLImageGL::getHeight ( S32  discard_level = -1  )  const

Definition at line 1137 of file llimagegl.cpp.

References height, mCurrentDiscardLevel, mHeight, and S32.

Referenced by LLViewerImage::createRawImage(), LLOverlayBar::draw(), LLHoverView::draw(), LLFloaterSnapshot::draw(), LLFastTimerView::draw(), LLWorldMapView::drawAvatar(), LLNotifyBox::drawBackground(), LLJoystickCameraRotate::drawRotatedImage(), LLVOAvatar::dumpLocalTextures(), LLVLComposition::generateTexture(), LLTexLayerParamAlpha::getCacheByteCount(), gl_draw_image(), gl_draw_rotated_image(), gl_draw_scaled_image_with_border(), LLViewerImage::CompareForWorstVisibility::operator()(), readBackRaw(), LLFontGL::render(), LLHUDText::renderText(), setImage(), setSubImage(), LLViewerImage::updateFetch(), and LLPanelRegionTextureInfo::validateTextureSizes().

BOOL LLImageGL::getIsResident ( BOOL  test_now = FALSE  ) 

Definition at line 1120 of file llimagegl.cpp.

References FALSE, glAreTexturesResident, mIsResident, and mTexName.

Referenced by bindTextureInternal().

S32 LLImageGL::getMaxDiscardLevel (  )  const [inline]

Definition at line 108 of file llimagegl.h.

References mMaxDiscardLevel.

S32 LLImageGL::getMipBytes ( S32  discard_level = -1  )  const

Definition at line 1172 of file llimagegl.cpp.

References dataFormatBytes(), mCurrentDiscardLevel, mFormatPrimary, mHeight, mUseMipMaps, mWidth, and S32.

Referenced by createGLTexture().

BOOL LLImageGL::getMipFilterNearest (  )  const [inline]

Definition at line 120 of file llimagegl.h.

References mMipFilterNearest.

BOOL LLImageGL::getMissed (  )  const [inline]

Definition at line 195 of file llimagegl.h.

References FALSE.

LLGLenum LLImageGL::getPrimaryFormat (  )  const [inline]

Definition at line 116 of file llimagegl.h.

References mFormatPrimary.

Referenced by LLVolumeGeometryManager::rebuildGeom().

LLGLuint LLImageGL::getTexName (  )  const [inline]

Definition at line 123 of file llimagegl.h.

References mTexName.

BOOL LLImageGL::getUseDiscard (  )  const [inline]

Definition at line 131 of file llimagegl.h.

References mDontDiscard, and mUseMipMaps.

BOOL LLImageGL::getUseMipMaps (  )  const [inline]

Definition at line 129 of file llimagegl.h.

References mUseMipMaps.

Referenced by LLViewerImage::processTextureStats().

S32 LLImageGL::getWidth ( S32  discard_level = -1  )  const

Definition at line 1148 of file llimagegl.cpp.

References mCurrentDiscardLevel, mWidth, S32, and width.

Referenced by LLViewerImage::createRawImage(), LLOverlayBar::draw(), LLHoverView::draw(), LLFloaterSnapshot::draw(), LLFastTimerView::draw(), LLWorldMapView::drawAvatar(), LLNotifyBox::drawBackground(), LLJoystickCameraRotate::drawRotatedImage(), LLVOAvatar::dumpLocalTextures(), LLVLComposition::generateTexture(), LLTexLayerParamAlpha::getCacheByteCount(), LLFontGL::getEmbeddedCharAdvance(), gl_draw_image(), gl_draw_rotated_image(), gl_draw_scaled_image_with_border(), LLScrollListIcon::LLScrollListIcon(), LLViewerImage::CompareForWorstVisibility::operator()(), readBackRaw(), LLFontGL::render(), LLHUDText::renderText(), setImage(), setSubImage(), LLViewerImage::updateFetch(), and LLPanelRegionTextureInfo::validateTextureSizes().

void LLImageGL::init ( BOOL  usemipmaps  )  [protected]

Definition at line 277 of file llimagegl.cpp.

References FALSE, mAutoGenMips, MAX_DISCARD_LEVEL, mBindTarget, mClampS, mClampT, mComponents, mCurrentDiscardLevel, mDontDiscard, mFormatInternal, mFormatPrimary, mFormatSwapBytes, mFormatType, mHasExplicitFormat, mHasMipMaps, mHeight, mIsResident, mLastBindTime, mMaxDiscardLevel, mMipFilterNearest, mTarget, mTexName, mTextureMemory, mUseMipMaps, and mWidth.

Referenced by LLImageGL(), and LLViewerImage::reinit().

BOOL LLImageGL::readBackRaw ( S32  discard_level,
LLImageRaw imageraw,
bool  compressed_ok 
)

Definition at line 977 of file llimagegl.cpp.

References LLImageBase::allocateDataSize(), bindTextureInternal(), FALSE, getComponents(), LLImageBase::getData(), getHeight(), getWidth(), glGetTexLevelParameteriv, height, llendl, llerrs, llformat(), llverify, mCurrentDiscardLevel, mFormatPrimary, mFormatType, mTarget, mTexName, S32, stop_glerror, TRUE, and width.

Referenced by LLViewerImage::doLoadedCallbacks(), setDiscardLevel(), and LLVOAvatar::writeCAL3D().

void LLImageGL::restoreGL (  )  [static]

Definition at line 200 of file llimagegl.cpp.

References NULL, sImageList, and stop_glerror.

Referenced by LLViewerImageList::restoreGL().

void LLImageGL::setClamp ( BOOL  clamps,
BOOL  clampt 
)

Definition at line 1064 of file llimagegl.cpp.

References mBindTarget, mClampS, mClampT, mTexName, and stop_glerror.

Referenced by createGLTexture(), get_item_icon(), LLNetwork2080PageBridge::getIcon(), LLNetwork2080PlayableContentBridge::getIcon(), LLNetwork2080FolderBridge::getIcon(), LLViewerImageList::getUIImageByID(), and LLTexLayer::renderAlphaMasks().

BOOL LLImageGL::setDiscardLevel ( S32  discard_level  ) 

Definition at line 925 of file llimagegl.cpp.

References createGLTexture(), dump(), FALSE, llassert, llclamp(), llendl, llerrs, mCurrentDiscardLevel, mDontDiscard, mMaxDiscardLevel, mUseMipMaps, readBackRaw(), and S32.

Referenced by LLViewerImage::processTextureStats().

void LLImageGL::setExplicitFormat ( LLGLint  internal_format,
LLGLenum  primary_format,
LLGLenum  type_format = 0,
BOOL  swap_bytes = FALSE 
)

Definition at line 460 of file llimagegl.cpp.

References mFormatInternal, mFormatPrimary, mFormatSwapBytes, mFormatType, mHasExplicitFormat, and TRUE.

Referenced by LLBumpImageList::getBrightnessDarknessImage(), and LLBumpImageList::onSourceLoaded().

void LLImageGL::setImage ( const U8 data_in,
BOOL  data_hasmips = FALSE 
)

Definition at line 485 of file llimagegl.cpp.

References bindTextureInternal(), d, dataFormatBytes(), FALSE, LLImageBase::generateMip(), getHeight(), getWidth(), height, llassert, llendl, llerrs, llverify, m, mAutoGenMips, mBindTarget, mComponents, mCurrentDiscardLevel, mFormatInternal, mFormatPrimary, mFormatSwapBytes, mFormatType, mHasMipMaps, mMaxDiscardLevel, mTarget, mUseMipMaps, S32, stop_glerror, TRUE, and width.

void LLImageGL::setImage ( const LLImageRaw imageraw  ) 

Definition at line 476 of file llimagegl.cpp.

References FALSE, getComponents(), LLImageBase::getComponents(), LLImageBase::getData(), getHeight(), LLImageBase::getHeight(), getWidth(), LLImageBase::getWidth(), llassert, and mCurrentDiscardLevel.

Referenced by createGLTexture(), setSubImage(), and LLViewerObject::unpackParticleSource().

void LLImageGL::setMipFilterNearest ( BOOL  nearest,
BOOL  min_nearest = FALSE 
)

Definition at line 1076 of file llimagegl.cpp.

References f, gGLManager, glTexParameterf, mBindTarget, LLGLManager::mHasAnisotropic, mHasMipMaps, mMipFilterNearest, mTexName, sGlobalUseAnisotropic, and stop_glerror.

Referenced by createGLTexture().

void LLImageGL::setSize ( S32  width,
S32  height,
S32  ncomponents 
)

Definition at line 341 of file llimagegl.cpp.

References checkSize(), destroyGLTexture(), llendl, llerrs, llformat(), MAX_DISCARD_LEVEL, mComponents, mHeight, mMaxDiscardLevel, mTexName, and mWidth.

Referenced by createGLTexture(), LLImageGL(), and LLViewerImage::reinit().

BOOL LLImageGL::setSubImage ( const U8 datap,
S32  data_width,
S32  data_height,
S32  x_pos,
S32  y_pos,
S32  width,
S32  height 
)

Definition at line 672 of file llimagegl.cpp.

References bindTextureInternal(), dump(), FALSE, getComponents(), getHeight(), getWidth(), glTexSubImage2D, llassert_always, llendl, llerrs, llwarns, mCurrentDiscardLevel, mFormatPrimary, mFormatSwapBytes, mFormatType, mTarget, mTexName, mUseMipMaps, NULL, setImage(), stop_glerror, and TRUE.

BOOL LLImageGL::setSubImage ( const LLImageRaw imageraw,
S32  x_pos,
S32  y_pos,
S32  width,
S32  height 
)

Definition at line 766 of file llimagegl.cpp.

References LLImageBase::getData(), LLImageBase::getHeight(), and LLImageBase::getWidth().

Referenced by LLVLComposition::generateTexture().

BOOL LLImageGL::setSubImageFromFrameBuffer ( S32  fb_x,
S32  fb_y,
S32  x_pos,
S32  y_pos,
S32  width,
S32  height 
)

Definition at line 772 of file llimagegl.cpp.

References bindTextureInternal(), FALSE, glCopyTexSubImage2D, stop_glerror, and TRUE.

void LLImageGL::setTarget ( const LLGLenum  target,
const LLGLenum  bind_target 
)

Definition at line 1198 of file llimagegl.cpp.

References mBindTarget, and mTarget.

void LLImageGL::setUseMipMaps ( BOOL  usemips  )  [inline]

Definition at line 130 of file llimagegl.h.

References mUseMipMaps.

void LLImageGL::unbindTexture ( S32  stage  )  [static]

Definition at line 146 of file llimagegl.cpp.

References glClientActiveTextureARB, and sCurrentBoundTextures.

void LLImageGL::unbindTexture ( S32  stage,
LLGLenum  target 
) [static]

Definition at line 133 of file llimagegl.cpp.

References glClientActiveTextureARB, and sCurrentBoundTextures.

Referenced by LLTexLayerSetBuffer::bindBumpTexture(), createGLTexture(), destroyGL(), destroyGLTexture(), LLVisualParamHint::draw(), LLFloaterImport::draw(), LLFloaterImagePreview::draw(), LLDrawPoolBump::endShiny(), LLVOAvatar::getScratchTexName(), LLViewerImageList::getUIImageByID(), LLDrawPoolTerrain::LLDrawPoolTerrain(), LLTexLayerSetBuffer::LLTexLayerSetBuffer(), LLDynamicTexture::preRender(), LLRenderPass::pushBatch(), LLTexLayerSet::render(), LLHUDEffectBeam::render(), LLHUDConnector::render(), LLDrawPoolWater::render(), LLVOCloth::render(), render_disconnected_background(), LLTexLayer::renderAlphaMasks(), LLFace::renderForSelect(), LLDrawPoolTerrain::renderForSelect(), LLDrawPoolTerrain::renderFull2TU(), LLDrawPoolTerrain::renderFull4TU(), LLTexLayer::renderImageRaw(), LLDrawPoolWater::renderShaderSimple(), LLDrawPoolTerrain::renderSimple(), and LLDynamicTexture::unbindTexture().

S32 LLImageGL::updateBoundTexMem ( const S32  delta  )  [static]

Definition at line 167 of file llimagegl.cpp.

References sCurBoundTextureMemory.

Referenced by LLTexLayerSetBuffer::bindBumpTexture(), LLVOAvatar::bindScratchTexture(), and bindTextureInternal().

void LLImageGL::updateStats ( F32  current_time  )  [static]

Definition at line 159 of file llimagegl.cpp.

References sBoundTextureMemory, sCurBoundTextureMemory, and sLastFrameTime.

Referenced by display().


Member Data Documentation

S8 LLImageGL::mAutoGenMips [private]

Definition at line 148 of file llimagegl.h.

Referenced by createGLTexture(), init(), and setImage().

LLGLenum LLImageGL::mBindTarget [protected]

Definition at line 152 of file llimagegl.h.

Referenced by bindTextureInternal(), createGLTexture(), dump(), init(), setClamp(), setImage(), setMipFilterNearest(), and setTarget().

S8 LLImageGL::mClampS [protected]

Definition at line 166 of file llimagegl.h.

Referenced by createGLTexture(), getClampS(), init(), and setClamp().

S8 LLImageGL::mClampT [protected]

Definition at line 167 of file llimagegl.h.

Referenced by createGLTexture(), getClampT(), init(), and setClamp().

S8 LLImageGL::mComponents [protected]

Definition at line 161 of file llimagegl.h.

Referenced by createGLTexture(), LLViewerImage::createRawImage(), getComponents(), init(), setImage(), setSize(), and LLViewerImage::updateFetch().

S8 LLImageGL::mCurrentDiscardLevel [protected]

Definition at line 163 of file llimagegl.h.

Referenced by createGLTexture(), dump(), getBytes(), getDiscardLevel(), getHeight(), getMipBytes(), getWidth(), init(), readBackRaw(), setDiscardLevel(), setImage(), and setSubImage().

S8 LLImageGL::mDontDiscard [protected]

Definition at line 164 of file llimagegl.h.

Referenced by dontDiscard(), getDontDiscard(), getUseDiscard(), init(), LLViewerImage::processTextureStats(), setDiscardLevel(), and LLViewerImage::updateFetch().

LLGLint LLImageGL::mFormatInternal [protected]

Definition at line 170 of file llimagegl.h.

Referenced by createGLTexture(), dump(), init(), setExplicitFormat(), and setImage().

LLGLenum LLImageGL::mFormatPrimary [protected]

Definition at line 171 of file llimagegl.h.

Referenced by createGLTexture(), dump(), getBytes(), getMipBytes(), getPrimaryFormat(), init(), readBackRaw(), setExplicitFormat(), setImage(), and setSubImage().

BOOL LLImageGL::mFormatSwapBytes [protected]

Definition at line 173 of file llimagegl.h.

Referenced by dump(), init(), setExplicitFormat(), setImage(), and setSubImage().

LLGLenum LLImageGL::mFormatType [protected]

Definition at line 172 of file llimagegl.h.

Referenced by createGLTexture(), dump(), init(), readBackRaw(), setExplicitFormat(), setImage(), and setSubImage().

S8 LLImageGL::mHasExplicitFormat [private]

Definition at line 147 of file llimagegl.h.

Referenced by createGLTexture(), dump(), init(), and setExplicitFormat().

S8 LLImageGL::mHasMipMaps [private]

Definition at line 146 of file llimagegl.h.

Referenced by dump(), init(), setImage(), and setMipFilterNearest().

U16 LLImageGL::mHeight [protected]

Definition at line 159 of file llimagegl.h.

Referenced by getBytes(), getHeight(), getMipBytes(), init(), LLViewerImage::processTextureStats(), and setSize().

LLGLboolean LLImageGL::mIsResident [protected]

Definition at line 156 of file llimagegl.h.

Referenced by dump(), getIsResident(), and init().

F32 LLImageGL::mLastBindTime [mutable]

Definition at line 141 of file llimagegl.h.

Referenced by bindTextureInternal(), createGLTexture(), dump(), getBoundRecently(), init(), and LLViewerImage::CompareForRemoval::operator()().

S8 LLImageGL::mMaxDiscardLevel [protected]

Definition at line 162 of file llimagegl.h.

Referenced by LLViewerImage::calcDecodePriority(), createGLTexture(), LLViewerImage::doLoadedCallbacks(), dump(), getMaxDiscardLevel(), init(), LLViewerImage::processTextureStats(), setDiscardLevel(), setImage(), and setSize().

S8 LLImageGL::mMipFilterNearest [protected]

Definition at line 168 of file llimagegl.h.

Referenced by createGLTexture(), getMipFilterNearest(), init(), and setMipFilterNearest().

LLPointer<LLImageRaw> LLImageGL::mSaveData [private]

Definition at line 144 of file llimagegl.h.

Referenced by cleanup().

LLGLenum LLImageGL::mTarget [protected]

Definition at line 151 of file llimagegl.h.

Referenced by dump(), init(), readBackRaw(), setImage(), setSubImage(), and setTarget().

LLGLuint LLImageGL::mTexName [protected]

Definition at line 154 of file llimagegl.h.

Referenced by bindTextureInternal(), createGLTexture(), destroyGLTexture(), dump(), getHasGLTexture(), getIsResident(), getTexName(), init(), readBackRaw(), setClamp(), setMipFilterNearest(), setSize(), and setSubImage().

S32 LLImageGL::mTextureMemory

Definition at line 140 of file llimagegl.h.

Referenced by bindTextureInternal(), createGLTexture(), destroyGLTexture(), dump(), init(), and LLViewerImage::processTextureStats().

S8 LLImageGL::mUseMipMaps [private]

Definition at line 145 of file llimagegl.h.

Referenced by createGLTexture(), dump(), getMipBytes(), getUseDiscard(), getUseMipMaps(), init(), setDiscardLevel(), setImage(), setSubImage(), and setUseMipMaps().

U16 LLImageGL::mWidth [protected]

Definition at line 158 of file llimagegl.h.

Referenced by getBytes(), getMipBytes(), getWidth(), init(), LLViewerImage::processTextureStats(), and setSize().

S32 LLImageGL::sBoundTextureMemory = 0 [static]

Reimplemented in LLViewerImage.

Definition at line 186 of file llimagegl.h.

Referenced by LLPipeline::bindScreenToTexture(), output_statistics(), LLViewerImage::updateClass(), LLViewerImageList::updateImages(), and updateStats().

S32 LLImageGL::sCount = 0 [static]

Definition at line 178 of file llimagegl.h.

Referenced by LLImageGL(), and ~LLImageGL().

S32 LLImageGL::sCurBoundTextureMemory = 0 [static]

Definition at line 187 of file llimagegl.h.

Referenced by updateBoundTexMem(), and updateStats().

LLGLuint LLImageGL::sCurrentBoundTextures = { 0 } [static]

Definition at line 182 of file llimagegl.h.

Referenced by bindExternalTexture(), bindTextureInternal(), destroyGLTexture(), and unbindTexture().

S32 LLImageGL::sGlobalTextureMemory = 0 [static]

Definition at line 185 of file llimagegl.h.

Referenced by createGLTexture(), LLVOAvatar::deleteCachedImages(), destroyGLTexture(), LLVOAvatar::getScratchTexName(), LLTexLayerSetBuffer::LLTexLayerSetBuffer(), output_statistics(), LLViewerWindow::stopGL(), LLViewerImage::updateClass(), LLViewerImageList::updateImages(), and LLTexLayerSetBuffer::~LLTexLayerSetBuffer().

BOOL LLImageGL::sGlobalUseAnisotropic = FALSE [static]

Definition at line 189 of file llimagegl.h.

Referenced by LLPanelDisplay2::apply(), LLFeatureManager::applyRecommendedFeatures(), saved_settings_to_globals(), and setMipFilterNearest().

std::set< LLImageGL * > LLImageGL::sImageList [static]

Definition at line 177 of file llimagegl.h.

Referenced by destroyGL(), LLImageGL(), restoreGL(), and ~LLImageGL().

F32 LLImageGL::sLastFrameTime = 0.f [static]

Definition at line 180 of file llimagegl.h.

Referenced by LLTexLayerSetBuffer::bindBumpTexture(), LLVOAvatar::bindScratchTexture(), bindTextureInternal(), createGLTexture(), getBoundRecently(), and updateStats().


The documentation for this class was generated from the following files:
Generated on Thu Jul 1 06:11:25 2010 for Second Life Viewer by  doxygen 1.4.7