#include <llvertexbuffer.h>
Inheritance diagram for LLVertexBuffer:
Definition at line 56 of file llvertexbuffer.h.
Definition at line 196 of file llvertexbuffer.h.
anonymous enum |
TYPE_VERTEX | |
TYPE_NORMAL | |
TYPE_TEXCOORD | |
TYPE_TEXCOORD2 | |
TYPE_COLOR | |
TYPE_BINORMAL | |
TYPE_WEIGHT | |
TYPE_CLOTHWEIGHT | |
TYPE_MAX | |
TYPE_INDEX |
Definition at line 66 of file llvertexbuffer.h.
anonymous enum |
MAP_VERTEX | |
MAP_NORMAL | |
MAP_TEXCOORD | |
MAP_TEXCOORD2 | |
MAP_COLOR | |
MAP_BINORMAL | |
MAP_WEIGHT | |
MAP_CLOTHWEIGHT | |
MAP_DRAW | |
MAP_MAPPED | |
MAP_UNMAPPED |
Definition at line 79 of file llvertexbuffer.h.
LLVertexBuffer::~LLVertexBuffer | ( | ) | [protected, virtual] |
Definition at line 203 of file llvertexbuffer.cpp.
References destroyGLBuffer(), destroyGLIndices(), i, mLocked, LLMemType::MTYPE_VERTEX_DATA, sCount, and sLockedList.
Definition at line 170 of file llvertexbuffer.cpp.
References i, mask, mOffsets, mStride, LLMemType::MTYPE_VERTEX_DATA, mTypeMask, mUsage, S32, sCount, sEnableVBOs, stride, sTypeOffsets, and TYPE_MAX.
Definition at line 416 of file llvertexbuffer.cpp.
References createGLBuffer(), createGLIndices(), getIndicesSize(), getSize(), llendl, llerrs, mMappedData, LLMemType::MTYPE_VERTEX_DATA, sAllocatedBytes, updateNumIndices(), and updateNumVerts().
Referenced by LLOcclusionIndexBuffer::LLOcclusionIndexBuffer(), LLOcclusionVertexBuffer::LLOcclusionVertexBuffer(), LLVolumeGeometryManager::rebuildGeom(), and resizeBuffer().
void LLVertexBuffer::cleanupClass | ( | ) | [static] |
Definition at line 94 of file llvertexbuffer.cpp.
References clientCopy(), LLMemType::MTYPE_VERTEX_DATA, sLockedList, startRender(), and stopRender().
Referenced by LLPipeline::resetVertexBuffers(), and LLViewerWindow::~LLViewerWindow().
Definition at line 126 of file llvertexbuffer.cpp.
References FALSE, LLTimer::getElapsedTimeF64(), LLTimer::reset(), sDeleteList, sEnableVBOs, sGLCount, sLockedList, and TRUE.
Referenced by cleanupClass(), and render_ui_and_swap().
void LLVertexBuffer::createGLBuffer | ( | ) | [protected] |
Definition at line 226 of file llvertexbuffer.cpp.
References destroyGLBuffer(), getSize(), glGenBuffersARB, mEmpty, mGLBuffer, mMappedData, mResized, LLMemType::MTYPE_VERTEX_DATA, sGLCount, size, TRUE, and useVBOs().
Referenced by allocateBuffer(), and resizeBuffer().
void LLVertexBuffer::createGLIndices | ( | ) | [protected] |
Definition at line 258 of file llvertexbuffer.cpp.
References destroyGLIndices(), getIndicesSize(), glGenBuffersARB, mEmpty, mGLIndices, mMappedIndexData, mResized, LLMemType::MTYPE_VERTEX_DATA, sGLCount, size, TRUE, and useVBOs().
Referenced by allocateBuffer(), and resizeBuffer().
void LLVertexBuffer::destroyGLBuffer | ( | ) | [protected] |
Definition at line 290 of file llvertexbuffer.cpp.
References getSize(), mEmpty, mGLBuffer, mMappedData, LLMemType::MTYPE_VERTEX_DATA, NULL, sAllocatedBytes, sDeleteList, TRUE, and useVBOs().
Referenced by createGLBuffer(), resizeBuffer(), and ~LLVertexBuffer().
void LLVertexBuffer::destroyGLIndices | ( | ) | [protected] |
Definition at line 309 of file llvertexbuffer.cpp.
References getIndicesSize(), mEmpty, mGLIndices, mMappedIndexData, LLMemType::MTYPE_VERTEX_DATA, NULL, sAllocatedBytes, sDeleteList, TRUE, and useVBOs().
Referenced by createGLIndices(), resizeBuffer(), and ~LLVertexBuffer().
Definition at line 709 of file llvertexbuffer.cpp.
References VertexBufferStrider< T, type >::get().
Definition at line 721 of file llvertexbuffer.cpp.
References VertexBufferStrider< T, type >::get().
Definition at line 713 of file llvertexbuffer.cpp.
References VertexBufferStrider< T, type >::get().
Referenced by LLTerrainPartition::getGeometry(), LLParticlePartition::getGeometry(), and LLVolumeGeometryManager::rebuildGeom().
Definition at line 693 of file llvertexbuffer.cpp.
References VertexBufferStrider< T, type >::get().
Referenced by LLTerrainPartition::getGeometry(), LLParticlePartition::getGeometry(), LLOcclusionIndexBuffer::LLOcclusionIndexBuffer(), and LLVolumeGeometryManager::rebuildGeom().
U8* LLVertexBuffer::getIndicesPointer | ( | ) | const [inline] |
S32 LLVertexBuffer::getIndicesSize | ( | ) | const [inline] |
Definition at line 147 of file llvertexbuffer.h.
References mNumIndices.
Referenced by allocateBuffer(), createGLIndices(), destroyGLIndices(), resizeBuffer(), and unmapBuffer().
U8* LLVertexBuffer::getMappedData | ( | ) | const [inline] |
Definition at line 148 of file llvertexbuffer.h.
References mMappedData.
Referenced by VertexBufferStrider< T, type >::get().
U8* LLVertexBuffer::getMappedIndices | ( | ) | const [inline] |
Definition at line 149 of file llvertexbuffer.h.
References mMappedIndexData.
Referenced by VertexBufferStrider< T, type >::get().
Definition at line 705 of file llvertexbuffer.cpp.
References VertexBufferStrider< T, type >::get().
Referenced by LLTerrainPartition::getGeometry(), LLParticlePartition::getGeometry(), LLVolumeGeometryManager::rebuildGeom(), LLViewerJointMesh::updateGeometryOriginal(), and LLViewerJointMesh::updateGeometryVectorized().
S32 LLVertexBuffer::getNumIndices | ( | ) | const [inline] |
S32 LLVertexBuffer::getNumVerts | ( | ) | const [inline] |
Definition at line 150 of file llvertexbuffer.h.
References mOffsets.
Referenced by VertexBufferStrider< T, type >::get().
S32 LLVertexBuffer::getSize | ( | ) | const [inline] |
Definition at line 146 of file llvertexbuffer.h.
References mNumVerts, and mStride.
Referenced by allocateBuffer(), createGLBuffer(), destroyGLBuffer(), resizeBuffer(), and unmapBuffer().
S32 LLVertexBuffer::getStride | ( | ) | const [inline] |
Definition at line 143 of file llvertexbuffer.h.
References mStride.
Referenced by VertexBufferStrider< T, type >::get().
Definition at line 701 of file llvertexbuffer.cpp.
References VertexBufferStrider< T, type >::get().
Referenced by LLTerrainPartition::getGeometry(), and LLVolumeGeometryManager::rebuildGeom().
Definition at line 697 of file llvertexbuffer.cpp.
References VertexBufferStrider< T, type >::get().
Referenced by LLTerrainPartition::getGeometry(), LLParticlePartition::getGeometry(), and LLVolumeGeometryManager::rebuildGeom().
S32 LLVertexBuffer::getTypeMask | ( | ) | const [inline] |
S32 LLVertexBuffer::getUsage | ( | ) | const [inline] |
Definition at line 151 of file llvertexbuffer.h.
References mUsage.
Referenced by LLVolumeGeometryManager::rebuildGeom().
Definition at line 689 of file llvertexbuffer.cpp.
References VertexBufferStrider< T, type >::get().
Referenced by LLTerrainPartition::getGeometry(), LLParticlePartition::getGeometry(), LLVolumeGeometryManager::rebuildGeom(), LLViewerJointMesh::updateGeometryOriginal(), and LLViewerJointMesh::updateGeometryVectorized().
U8* LLVertexBuffer::getVerticesPointer | ( | ) | const [inline] |
Definition at line 717 of file llvertexbuffer.cpp.
References VertexBufferStrider< T, type >::get().
Definition at line 145 of file llvertexbuffer.h.
References FALSE, getTypeMask(), and TRUE.
Referenced by VertexBufferStrider< T, type >::get().
void LLVertexBuffer::initClass | ( | bool | use_vbo | ) | [static] |
Definition at line 70 of file llvertexbuffer.cpp.
References sEnableVBOs.
Referenced by LLViewerWindow::LLViewerWindow(), and LLPipeline::setUseVBO().
BOOL LLVertexBuffer::isEmpty | ( | ) | const [inline] |
BOOL LLVertexBuffer::isLocked | ( | ) | const [inline] |
void LLVertexBuffer::makeStatic | ( | ) |
Definition at line 368 of file llvertexbuffer.cpp.
References glGenBuffersARB, llendl, llerrs, mGLBuffer, mGLIndices, mLocked, mResized, mUsage, sDeleteList, sEnableVBOs, sGLCount, sLockedList, sRenderActive, TRUE, and useVBOs().
Definition at line 547 of file llvertexbuffer.cpp.
References llendl, llerrs, llwarns, mFinal, mGLBuffer, mGLIndices, mLocked, mMappedData, mMappedIndexData, LLMemType::MTYPE_VERTEX_DATA, sLockedList, sRenderActive, TRUE, and useVBOs().
Referenced by VertexBufferStrider< T, type >::get().
void LLVertexBuffer::markClean | ( | ) |
Definition at line 891 of file llvertexbuffer.cpp.
References FALSE, mEmpty, mFilthy, mLocked, mResized, and sLockedList.
Referenced by LLVolumeGeometryManager::rebuildGeom().
void LLVertexBuffer::markDirty | ( | U32 | vert_index, | |
U32 | vert_count, | |||
U32 | indices_index, | |||
U32 | indices_count | |||
) |
Definition at line 862 of file llvertexbuffer.cpp.
References mDirtyRegions, mFilthy, TRUE, and useVBOs().
Referenced by LLVolumeGeometryManager::rebuildGeom().
Definition at line 436 of file llvertexbuffer.cpp.
References allocateBuffer(), createGLBuffer(), createGLIndices(), destroyGLBuffer(), destroyGLIndices(), FALSE, getIndicesSize(), getSize(), llmin(), mDynamicSize, mEmpty, mFinal, mGLBuffer, mGLIndices, mMappedData, mMappedIndexData, mNumIndices, mNumVerts, mResized, LLMemType::MTYPE_VERTEX_DATA, mUsage, S32, sAllocatedBytes, TRUE, updateNumIndices(), and updateNumVerts().
Referenced by LLVolumeGeometryManager::rebuildGeom().
Reimplemented in LLOcclusionIndexBuffer, and LLOcclusionVertexBuffer.
Definition at line 748 of file llvertexbuffer.cpp.
References FALSE, glBindBufferARB, llendl, llwarns, mGLBuffer, mGLIndices, LLMemType::MTYPE_VERTEX_DATA, sEnableVBOs, setupVertexBuffer(), sGLRenderBuffer, sGLRenderIndices, sIBOActive, sLastMask, sRenderActive, sVBOActive, TRUE, unmapBuffer(), and useVBOs().
Definition at line 726 of file llvertexbuffer.cpp.
References i, llendl, llerrs, mNumVerts, mOffsets, mStride, LLMemType::MTYPE_VERTEX_DATA, mTypeMask, S32, sTypeOffsets, and TYPE_MAX.
Reimplemented in LLVertexBufferAvatar, and LLVertexBufferTerrain.
Definition at line 812 of file llvertexbuffer.cpp.
References base, FALSE, glClientActiveTextureARB, glColorPointer, glTexCoordPointer, glVertexAttribPointerARB, glVertexPointer, llendl, llerrs, llglassertok, MAP_BINORMAL, MAP_CLOTHWEIGHT, MAP_COLOR, MAP_NORMAL, MAP_TEXCOORD, MAP_TEXCOORD2, MAP_VERTEX, MAP_WEIGHT, mMappedData, mOffsets, mStride, LLMemType::MTYPE_VERTEX_DATA, mTypeMask, NULL, S32, stop_glerror, stride, TRUE, TYPE_BINORMAL, TYPE_CLOTHWEIGHT, TYPE_COLOR, TYPE_NORMAL, TYPE_TEXCOORD, TYPE_TEXCOORD2, TYPE_WEIGHT, and useVBOs().
Referenced by setBuffer(), LLVertexBufferTerrain::setupVertexBuffer(), and LLVertexBufferAvatar::setupVertexBuffer().
void LLVertexBuffer::startRender | ( | ) | [static] |
Definition at line 104 of file llvertexbuffer.cpp.
References FALSE, glBindBufferARB, LLMemType::MTYPE_VERTEX_DATA, sEnableVBOs, sGLRenderBuffer, sGLRenderIndices, sIBOActive, sLastMask, sRenderActive, sVBOActive, and TRUE.
Referenced by cleanupClass(), LLImagePreviewAvatar::render(), LLPreviewAnimation::render(), render_ui_and_swap(), LLPipeline::renderForSelect(), LLPipeline::renderGeom(), and LLDynamicTexture::updateAllInstances().
void LLVertexBuffer::stopRender | ( | ) | [static] |
Definition at line 121 of file llvertexbuffer.cpp.
References FALSE, and sRenderActive.
Referenced by cleanupClass(), LLImagePreviewAvatar::render(), LLPreviewAnimation::render(), render_ui_and_swap(), LLPipeline::renderForSelect(), LLPipeline::renderGeom(), and LLDynamicTexture::updateAllInstances().
void LLVertexBuffer::unbind | ( | ) | [static] |
Definition at line 76 of file llvertexbuffer.cpp.
References FALSE, glBindBufferARB, sGLRenderBuffer, sGLRenderIndices, sIBOActive, and sVBOActive.
Referenced by LLDrawPoolAvatar::beginRenderPass(), LLSphere::render(), LLCone::render(), LLCone::renderface(), and LLCylinder::renderface().
void LLVertexBuffer::unmapBuffer | ( | ) | [protected] |
Definition at line 576 of file llvertexbuffer.cpp.
References FALSE, getIndicesSize(), getSize(), glBufferSubDataARB, i, mDirtyRegions, mEmpty, mFilthy, mFinal, mGLBuffer, mGLIndices, mLocked, mMappedData, mMappedIndexData, mResized, mStride, LLMemType::MTYPE_VERTEX_DATA, mUsage, NULL, TRUE, and useVBOs().
Referenced by setBuffer(), LLOcclusionVertexBuffer::setBuffer(), and LLOcclusionIndexBuffer::setBuffer().
Definition at line 348 of file llvertexbuffer.cpp.
References mDynamicSize, mNumIndices, LLMemType::MTYPE_VERTEX_DATA, and mUsage.
Referenced by allocateBuffer(), and resizeBuffer().
Definition at line 328 of file llvertexbuffer.cpp.
References mDynamicSize, mNumVerts, LLMemType::MTYPE_VERTEX_DATA, and mUsage.
Referenced by allocateBuffer(), and resizeBuffer().
BOOL LLVertexBuffer::useVBOs | ( | ) | const [protected, virtual] |
Definition at line 532 of file llvertexbuffer.cpp.
References FALSE, mLocked, mUsage, sEnableVBOs, and sRenderActive.
Referenced by createGLBuffer(), createGLIndices(), destroyGLBuffer(), destroyGLIndices(), getIndicesPointer(), getVerticesPointer(), makeStatic(), mapBuffer(), markDirty(), setBuffer(), LLOcclusionVertexBuffer::setBuffer(), LLOcclusionIndexBuffer::setBuffer(), LLVertexBufferTerrain::setupVertexBuffer(), setupVertexBuffer(), LLVertexBufferAvatar::setupVertexBuffer(), and unmapBuffer().
std::vector<DirtyRegion> LLVertexBuffer::mDirtyRegions [protected] |
BOOL LLVertexBuffer::mDynamicSize [protected] |
Definition at line 174 of file llvertexbuffer.h.
Referenced by resizeBuffer(), updateNumIndices(), and updateNumVerts().
BOOL LLVertexBuffer::mEmpty [protected] |
Definition at line 171 of file llvertexbuffer.h.
Referenced by createGLBuffer(), createGLIndices(), destroyGLBuffer(), destroyGLIndices(), isEmpty(), markClean(), resizeBuffer(), and unmapBuffer().
BOOL LLVertexBuffer::mFilthy [protected] |
Definition at line 170 of file llvertexbuffer.h.
Referenced by markClean(), markDirty(), and unmapBuffer().
BOOL LLVertexBuffer::mFinal [protected] |
Definition at line 169 of file llvertexbuffer.h.
Referenced by mapBuffer(), resizeBuffer(), and unmapBuffer().
U32 LLVertexBuffer::mGLBuffer [protected] |
Definition at line 164 of file llvertexbuffer.h.
Referenced by createGLBuffer(), destroyGLBuffer(), makeStatic(), mapBuffer(), resizeBuffer(), setBuffer(), LLOcclusionVertexBuffer::setBuffer(), and unmapBuffer().
U32 LLVertexBuffer::mGLIndices [protected] |
Definition at line 165 of file llvertexbuffer.h.
Referenced by createGLIndices(), destroyGLIndices(), makeStatic(), mapBuffer(), resizeBuffer(), setBuffer(), LLOcclusionIndexBuffer::setBuffer(), and unmapBuffer().
BOOL LLVertexBuffer::mLocked [protected] |
Definition at line 168 of file llvertexbuffer.h.
Referenced by isLocked(), makeStatic(), mapBuffer(), markClean(), unmapBuffer(), useVBOs(), and ~LLVertexBuffer().
U8* LLVertexBuffer::mMappedData [protected] |
Definition at line 166 of file llvertexbuffer.h.
Referenced by allocateBuffer(), createGLBuffer(), destroyGLBuffer(), getMappedData(), getVerticesPointer(), mapBuffer(), resizeBuffer(), LLOcclusionVertexBuffer::setBuffer(), LLVertexBufferTerrain::setupVertexBuffer(), setupVertexBuffer(), LLVertexBufferAvatar::setupVertexBuffer(), and unmapBuffer().
U8* LLVertexBuffer::mMappedIndexData [protected] |
Definition at line 167 of file llvertexbuffer.h.
Referenced by createGLIndices(), destroyGLIndices(), getIndicesPointer(), getMappedIndices(), mapBuffer(), resizeBuffer(), and unmapBuffer().
S32 LLVertexBuffer::mNumIndices [protected] |
Definition at line 160 of file llvertexbuffer.h.
Referenced by getIndicesSize(), getNumIndices(), resizeBuffer(), and updateNumIndices().
S32 LLVertexBuffer::mNumVerts [protected] |
Definition at line 159 of file llvertexbuffer.h.
Referenced by getNumVerts(), getSize(), resizeBuffer(), setStride(), and updateNumVerts().
S32 LLVertexBuffer::mOffsets[TYPE_MAX] [protected] |
Definition at line 172 of file llvertexbuffer.h.
Referenced by getOffset(), LLVertexBuffer(), setStride(), LLVertexBufferTerrain::setupVertexBuffer(), setupVertexBuffer(), and LLVertexBufferAvatar::setupVertexBuffer().
BOOL LLVertexBuffer::mResized [protected] |
Definition at line 173 of file llvertexbuffer.h.
Referenced by createGLBuffer(), createGLIndices(), makeStatic(), markClean(), resizeBuffer(), and unmapBuffer().
S32 LLVertexBuffer::mStride [protected] |
Definition at line 161 of file llvertexbuffer.h.
Referenced by getSize(), getStride(), LLVertexBuffer(), setStride(), LLVertexBufferTerrain::setupVertexBuffer(), setupVertexBuffer(), LLVertexBufferAvatar::setupVertexBuffer(), and unmapBuffer().
U32 LLVertexBuffer::mTypeMask [protected] |
Definition at line 162 of file llvertexbuffer.h.
Referenced by getTypeMask(), LLVertexBuffer(), setStride(), and setupVertexBuffer().
S32 LLVertexBuffer::mUsage [protected] |
Definition at line 163 of file llvertexbuffer.h.
Referenced by getUsage(), LLVertexBuffer(), makeStatic(), resizeBuffer(), unmapBuffer(), updateNumIndices(), updateNumVerts(), and useVBOs().
U32 LLVertexBuffer::sAllocatedBytes = 0 [static] |
Definition at line 206 of file llvertexbuffer.h.
Referenced by allocateBuffer(), destroyGLBuffer(), destroyGLIndices(), resizeBuffer(), and LLDebugText::update().
S32 LLVertexBuffer::sCount = 0 [static] |
Definition at line 193 of file llvertexbuffer.h.
Referenced by LLVertexBuffer(), and ~LLVertexBuffer().
std::vector< U32 > LLVertexBuffer::sDeleteList [static] |
Definition at line 195 of file llvertexbuffer.h.
Referenced by clientCopy(), destroyGLBuffer(), destroyGLIndices(), and makeStatic().
BOOL LLVertexBuffer::sEnableVBOs = TRUE [static] |
Definition at line 199 of file llvertexbuffer.h.
Referenced by clientCopy(), initClass(), LLVertexBuffer(), makeStatic(), LLVolumeGeometryManager::rebuildGeom(), LLSpatialPartition::rebuildGeom(), setBuffer(), LLPipeline::setUseVBO(), startRender(), LLVOAvatar::updateLOD(), and useVBOs().
S32 LLVertexBuffer::sGLCount = 0 [static] |
Definition at line 194 of file llvertexbuffer.h.
Referenced by clientCopy(), createGLBuffer(), createGLIndices(), makeStatic(), LLPipeline::resetVertexBuffers(), and LLDebugText::update().
U32 LLVertexBuffer::sGLRenderBuffer = 0 [static] |
Definition at line 201 of file llvertexbuffer.h.
Referenced by setBuffer(), LLOcclusionVertexBuffer::setBuffer(), startRender(), and unbind().
U32 LLVertexBuffer::sGLRenderIndices = 0 [static] |
Definition at line 202 of file llvertexbuffer.h.
Referenced by setBuffer(), LLOcclusionIndexBuffer::setBuffer(), startRender(), and unbind().
BOOL LLVertexBuffer::sIBOActive = FALSE [static] |
Definition at line 204 of file llvertexbuffer.h.
Referenced by setBuffer(), LLOcclusionIndexBuffer::setBuffer(), startRender(), and unbind().
U32 LLVertexBuffer::sLastMask = 0 [static] |
Definition at line 197 of file llvertexbuffer.h.
Referenced by cleanupClass(), clientCopy(), makeStatic(), mapBuffer(), markClean(), LLDebugText::update(), and ~LLVertexBuffer().
BOOL LLVertexBuffer::sRenderActive = FALSE [static] |
Definition at line 192 of file llvertexbuffer.h.
Referenced by makeStatic(), mapBuffer(), setBuffer(), startRender(), stopRender(), and useVBOs().
S32 LLVertexBuffer::sTypeOffsets [static] |
Initial value:
{ sizeof(LLVector3), sizeof(LLVector3), sizeof(LLVector2), sizeof(LLVector2), sizeof(LLColor4U), sizeof(LLVector3), sizeof(F32), sizeof(LLVector4), }
Definition at line 200 of file llvertexbuffer.h.
Referenced by LLVertexBuffer(), and setStride().
BOOL LLVertexBuffer::sVBOActive = FALSE [static] |
Definition at line 203 of file llvertexbuffer.h.
Referenced by setBuffer(), LLOcclusionVertexBuffer::setBuffer(), startRender(), and unbind().