LLTexLayerSetBuffer Class Reference

#include <lltexlayer.h>

Inheritance diagram for LLTexLayerSetBuffer:

Inheritance graph
[legend]
Collaboration diagram for LLTexLayerSetBuffer:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 LLTexLayerSetBuffer (LLTexLayerSet *owner, S32 width, S32 height, BOOL has_bump)
virtual ~LLTexLayerSetBuffer ()
virtual void preRender (BOOL clear_depth)
virtual void postRender (BOOL success)
virtual BOOL render ()
BOOL updateImmediate ()
virtual void bindTexture ()
void bindBumpTexture (U32 stage)
BOOL isInitialized ()
BOOL needsRender ()
void requestUpdate ()
void requestUpload ()
void cancelUpload ()
BOOL uploadPending ()
BOOL render (S32 x, S32 y, S32 width, S32 height)
void readBackAndUpload (U8 *baked_bump_data)

Static Public Member Functions

static void onTextureUploadComplete (const LLUUID &uuid, void *userdata, S32 result, LLExtStat ext_status)
static void dumpTotalByteCount ()

Private Member Functions

void pushProjection ()
void popProjection ()

Private Attributes

BOOL mNeedsUpdate
BOOL mNeedsUpload
BOOL mUploadPending
LLUUID mUploadID
LLTexLayerSetmTexLayerSet
BOOL mInitialized
LLGLuint mBumpTexName

Static Private Attributes

static S32 sGLByteCount = 0
static S32 sGLBumpByteCount = 0

Detailed Description

Definition at line 205 of file lltexlayer.h.


Constructor & Destructor Documentation

LLTexLayerSetBuffer::LLTexLayerSetBuffer ( LLTexLayerSet owner,
S32  width,
S32  height,
BOOL  has_bump 
)

Definition at line 91 of file lltexlayer.cpp.

References LLImageGL::bindExternalTexture(), LLDynamicTexture::getSize(), mBumpTexName, LLDynamicTexture::mHeight, LLDynamicTexture::mWidth, NULL, sGLBumpByteCount, sGLByteCount, LLImageGL::sGlobalTextureMemory, stop_glerror, and LLImageGL::unbindTexture().

LLTexLayerSetBuffer::~LLTexLayerSetBuffer (  )  [virtual]

Definition at line 128 of file lltexlayer.cpp.

References LLDynamicTexture::getSize(), mBumpTexName, LLDynamicTexture::mHeight, LLDynamicTexture::mWidth, sGLBumpByteCount, sGLByteCount, LLImageGL::sGlobalTextureMemory, and stop_glerror.


Member Function Documentation

void LLTexLayerSetBuffer::bindBumpTexture ( U32  stage  ) 

Definition at line 569 of file lltexlayer.cpp.

References LLImageGL::bindExternalTexture(), mBumpTexName, LLDynamicTexture::mHeight, LLDynamicTexture::mLastBindTime, LLDynamicTexture::mWidth, LLImageGL::sLastFrameTime, LLImageGL::unbindTexture(), and LLImageGL::updateBoundTexMem().

void LLTexLayerSetBuffer::bindTexture (  )  [virtual]

Reimplemented from LLDynamicTexture.

Definition at line 557 of file lltexlayer.cpp.

References LLViewerImage::bind(), LLDynamicTexture::bindTexture(), LLViewerImageList::getImage(), gImageList, IMG_DEFAULT, and mInitialized.

Referenced by LLViewerJointMesh::drawShape().

void LLTexLayerSetBuffer::cancelUpload (  ) 

Definition at line 168 of file lltexlayer.cpp.

References FALSE, mNeedsUpload, and mUploadPending.

Referenced by LLTexLayerSet::cancelUpload(), and needsRender().

void LLTexLayerSetBuffer::dumpTotalByteCount (  )  [static]

Definition at line 144 of file lltexlayer.cpp.

References llendl, llinfos, sGLBumpByteCount, and sGLByteCount.

Referenced by output_statistics().

BOOL LLTexLayerSetBuffer::isInitialized (  )  [inline]

Definition at line 217 of file lltexlayer.h.

References mInitialized.

Referenced by LLVOAvatar::updateMeshTextures().

BOOL LLTexLayerSetBuffer::needsRender (  )  [virtual]

Reimplemented from LLDynamicTexture.

Definition at line 198 of file lltexlayer.cpp.

References cancelUpload(), FALSE, gAgent, LLTexLayerSet::getAvatar(), LLVOAvatar::getBakedTE(), LLVOAvatar::isCulled(), LLTexLayerSet::isLocalTextureDataAvailable(), LLTexLayerSet::isLocalTextureDataFinal(), LLVOAvatar::isSelf(), LLVOAvatar::isVisible(), LLVOAvatar::isWearingWearableType(), LLVOAvatar::mAppearanceAnimating, mNeedsUpdate, mNeedsUpload, LLAgent::mNumPendingQueries, mTexLayerSet, LLVOAvatar::TEX_SKIRT_BAKED, and WT_SKIRT.

Referenced by updateImmediate().

void LLTexLayerSetBuffer::onTextureUploadComplete ( const LLUUID uuid,
void userdata,
S32  result,
LLExtStat  ext_status 
) [static]

Definition at line 494 of file lltexlayer.cpp.

References LLAgent::cameraCustomizeAvatar(), LLVOAvatar::dirtyMesh(), FALSE, gAgent, LLAgent::getAvatarObject(), LLVOAvatar::getBakedTE(), LLViewerObject::isDead(), LLUUID::isNull(), llendl, llinfos, llwarns, LLBakedUploadData::mAvatar, LLBakedUploadData::mID, LLBakedUploadData::mLayerSetBuffer, mTexLayerSet, mUploadID, mUploadPending, requestUpload(), LLVOAvatar::setNewBakedTexture(), and LLUUID::setNull().

Referenced by readBackAndUpload().

void LLTexLayerSetBuffer::popProjection (  )  [private]

Definition at line 189 of file lltexlayer.cpp.

References glPopMatrix.

Referenced by postRender().

void LLTexLayerSetBuffer::postRender ( BOOL  success  )  [virtual]

Reimplemented from LLDynamicTexture.

Definition at line 231 of file lltexlayer.cpp.

References popProjection(), and LLDynamicTexture::postRender().

Referenced by updateImmediate().

void LLTexLayerSetBuffer::preRender ( BOOL  clear_depth  )  [virtual]

Reimplemented from LLDynamicTexture.

Definition at line 222 of file lltexlayer.cpp.

References FALSE, LLDynamicTexture::preRender(), and pushProjection().

Referenced by updateImmediate().

void LLTexLayerSetBuffer::pushProjection (  )  [private]

Definition at line 177 of file lltexlayer.cpp.

References f, glOrtho, LLDynamicTexture::mHeight, and LLDynamicTexture::mWidth.

Referenced by preRender().

void LLTexLayerSetBuffer::readBackAndUpload ( U8 baked_bump_data  ) 

Definition at line 325 of file lltexlayer.cpp.

References LLAssetType::AT_TEXTURE, LLTexLayerSet::deleteCaches(), f, FALSE, gAgent, gAssetStorage, LLTexLayerSet::gatherAlphaMasks(), LLUUID::generate(), LLTexLayerSet::getAvatar(), LLAgent::getAvatarObject(), LLTexLayerSet::getBodyRegion(), LLAgent::getSecureSessionID(), gVFS, gViewerStats, i, LLViewerStats::incStat(), LINDEN_J2C_COMMENT_PREFIX, llassert, llendl, llinfos, LLTransactionID::makeAssetID(), mBumpTexName, LLDynamicTexture::mHeight, LLBakedUploadData::mID, mNeedsUpload, LLDynamicTexture::mOrigin, mTexLayerSet, mUploadID, mUploadPending, LLDynamicTexture::mWidth, LLCoord::mX, LLCoord::mY, NULL, onTextureUploadComplete(), LLVFile::readFile(), LLVFile::remove(), S32, LLViewerStats::ST_TEX_BAKES, stop_glerror, LLAssetStorage::storeAssetData(), TRUE, u, v, LLVFile::WRITE, and LLVFile::writeFile().

Referenced by render().

BOOL LLTexLayerSetBuffer::render ( S32  x,
S32  y,
S32  width,
S32  height 
)

BOOL LLTexLayerSetBuffer::render (  )  [virtual]

Reimplemented from LLDynamicTexture.

Definition at line 238 of file lltexlayer.cpp.

References LLImageGL::bindExternalTexture(), FALSE, gAgent, LLTexLayerSet::getBodyRegion(), glBlendFunc, glCopyTexSubImage2D, glGetBooleanv, LLTexLayerSet::isLocalTextureDataFinal(), llendl, llinfos, mask, mBumpTexName, LLDynamicTexture::mHeight, mInitialized, mNeedsUpdate, mNeedsUpload, LLAgent::mNumPendingQueries, LLDynamicTexture::mOrigin, mTexLayerSet, mUploadPending, LLDynamicTexture::mWidth, LLCoord::mX, LLCoord::mY, NULL, readBackAndUpload(), LLTexLayerSet::render(), LLTexLayerSet::renderBump(), stop_glerror, and TRUE.

Referenced by updateImmediate().

void LLTexLayerSetBuffer::requestUpdate (  ) 

Definition at line 150 of file lltexlayer.cpp.

References mNeedsUpdate, mUploadID, LLUUID::setNull(), and TRUE.

Referenced by LLTexLayerSet::requestUpdate().

void LLTexLayerSetBuffer::requestUpload (  ) 

Definition at line 159 of file lltexlayer.cpp.

References mNeedsUpload, mUploadPending, and TRUE.

Referenced by onTextureUploadComplete(), and LLTexLayerSet::requestUpload().

BOOL LLTexLayerSetBuffer::updateImmediate (  ) 

Definition at line 310 of file lltexlayer.cpp.

References FALSE, mNeedsUpdate, needsRender(), postRender(), preRender(), render(), and TRUE.

Referenced by LLTexLayerSet::updateComposite().

BOOL LLTexLayerSetBuffer::uploadPending (  )  [inline]

Definition at line 222 of file lltexlayer.h.

References mUploadPending.

Referenced by LLVOAvatar::hasPendingBakedUploads().


Member Data Documentation

LLGLuint LLTexLayerSetBuffer::mBumpTexName [private]

Definition at line 241 of file lltexlayer.h.

Referenced by bindBumpTexture(), LLTexLayerSetBuffer(), readBackAndUpload(), render(), and ~LLTexLayerSetBuffer().

BOOL LLTexLayerSetBuffer::mInitialized [private]

Definition at line 240 of file lltexlayer.h.

Referenced by bindTexture(), isInitialized(), and render().

BOOL LLTexLayerSetBuffer::mNeedsUpdate [private]

Definition at line 235 of file lltexlayer.h.

Referenced by needsRender(), render(), requestUpdate(), and updateImmediate().

BOOL LLTexLayerSetBuffer::mNeedsUpload [private]

Definition at line 236 of file lltexlayer.h.

Referenced by cancelUpload(), needsRender(), readBackAndUpload(), render(), and requestUpload().

LLTexLayerSet* LLTexLayerSetBuffer::mTexLayerSet [private]

Definition at line 239 of file lltexlayer.h.

Referenced by needsRender(), onTextureUploadComplete(), readBackAndUpload(), and render().

LLUUID LLTexLayerSetBuffer::mUploadID [private]

Definition at line 238 of file lltexlayer.h.

Referenced by onTextureUploadComplete(), readBackAndUpload(), and requestUpdate().

BOOL LLTexLayerSetBuffer::mUploadPending [private]

Definition at line 237 of file lltexlayer.h.

Referenced by cancelUpload(), onTextureUploadComplete(), readBackAndUpload(), render(), requestUpload(), and uploadPending().

S32 LLTexLayerSetBuffer::sGLBumpByteCount = 0 [static, private]

Definition at line 244 of file lltexlayer.h.

Referenced by dumpTotalByteCount(), LLTexLayerSetBuffer(), and ~LLTexLayerSetBuffer().

S32 LLTexLayerSetBuffer::sGLByteCount = 0 [static, private]

Definition at line 243 of file lltexlayer.h.

Referenced by dumpTotalByteCount(), LLTexLayerSetBuffer(), and ~LLTexLayerSetBuffer().


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