#include <lldrawpoolterrain.h>
Public Types | |
enum | { VERTEX_DATA_MASK } |
Public Member Functions | |
virtual U32 | getVertexDataMask () |
LLDrawPoolTerrain (LLViewerImage *texturep) | |
virtual | ~LLDrawPoolTerrain () |
LLDrawPool * | instancePool () |
void | render (S32 pass=0) |
void | prerender () |
void | beginRenderPass (S32 pass) |
void | endRenderPass (S32 pass) |
void | renderForSelect () |
void | dirtyTextures (const std::set< LLViewerImage * > &textures) |
LLViewerImage * | getTexture () |
LLViewerImage * | getDebugTexture () |
LLColor3 | getDebugColor () const |
Static Public Member Functions | |
static S32 | getDetailMode () |
Public Attributes | |
LLPointer< LLViewerImage > | mAlphaRampImagep |
LLPointer< LLViewerImage > | m2DAlphaRampImagep |
LLPointer< LLViewerImage > | mAlphaNoiseImagep |
Static Public Attributes | |
static S32 | sDetailMode = 1 |
static F32 | sDetailScale = DETAIL_SCALE |
Protected Member Functions | |
void | renderSimple () |
void | renderOwnership () |
void | renderFull2TU () |
void | renderFull4TU () |
void | renderFullShader () |
Private Attributes | |
LLPointer< LLViewerImage > | mTexturep |
Definition at line 37 of file lldrawpoolterrain.h.
anonymous enum |
LLDrawPoolTerrain::LLDrawPoolTerrain | ( | LLViewerImage * | texturep | ) |
Definition at line 64 of file lldrawpoolterrain.cpp.
References LLViewerImage::BOOST_TERRAIN, LLControlGroup::getF32(), LLViewerImageList::getImageFromFile(), LLControlGroup::getS32(), gImageList, gSavedSettings, m2DAlphaRampImagep, mAlphaRampImagep, mTexturep, sDetailMode, sDetailScale, TRUE, and LLImageGL::unbindTexture().
Referenced by instancePool().
LLDrawPoolTerrain::~LLDrawPoolTerrain | ( | ) | [virtual] |
Definition at line 88 of file lldrawpoolterrain.cpp.
References LLPipeline::findPool(), getTexture(), LLDrawPool::getType(), gPipeline, llassert, and NULL.
virtual U32 LLDrawPoolTerrain::getVertexDataMask | ( | ) | [inline, virtual] |
Implements LLDrawPool.
Definition at line 50 of file lldrawpoolterrain.h.
References VERTEX_DATA_MASK.
S32 LLDrawPoolTerrain::getDetailMode | ( | ) | [static] |
Definition at line 139 of file lldrawpoolterrain.cpp.
References sDetailMode.
Referenced by LLVertexBufferTerrain::setupVertexBuffer().
LLDrawPool * LLDrawPoolTerrain::instancePool | ( | ) | [virtual] |
Implements LLDrawPool.
Definition at line 94 of file lldrawpoolterrain.cpp.
References LLDrawPoolTerrain(), and mTexturep.
void LLDrawPoolTerrain::render | ( | S32 | pass = 0 |
) | [virtual] |
Implements LLDrawPool.
Definition at line 144 of file lldrawpoolterrain.cpp.
References LLGLSLShader::bind(), LLViewerImage::BOOST_TERRAIN, LLPipeline::disableLights(), LLPipeline::enableLightsDynamic(), LLPipeline::enableLightsStatic(), LLFastTimer::FTM_RENDER_TERRAIN, LLControlGroup::getBOOL(), LLViewerRegion::getComposition(), gGLManager, gObjectFullbrightProgram, gPipeline, gSavedSettings, i, LLVLComposition::mDetailTextures, LLFacePool::mDrawFace, LLGLManager::mHasARBEnvCombine, LLGLManager::mHasMultitexture, LLGLManager::mNumTextureUnits, LLGLSLShader::mShaderLevel, LLDrawPool::mVertexShaderLevel, renderFull2TU(), renderFull4TU(), renderFullShader(), renderOwnership(), renderSimple(), S32, sDetailMode, and LLGLSLShader::unbind().
void LLDrawPoolTerrain::prerender | ( | ) | [virtual] |
Implements LLDrawPool.
Definition at line 100 of file lldrawpoolterrain.cpp.
References LLControlGroup::getS32(), LLShaderMgr::getVertexShaderLevel(), gSavedSettings, LLDrawPool::mVertexShaderLevel, sDetailMode, and LLShaderMgr::SHADER_ENVIRONMENT.
void LLDrawPoolTerrain::beginRenderPass | ( | S32 | pass | ) | [virtual] |
Reimplemented from LLDrawPool.
Definition at line 113 of file lldrawpoolterrain.cpp.
References LLDrawPool::beginRenderPass(), LLGLSLShader::bind(), LLFastTimer::FTM_RENDER_TERRAIN, gTerrainProgram, gTerrainWaterProgram, LLGLSLShader::mShaderLevel, LLDrawPool::mVertexShaderLevel, and LLPipeline::sUnderWaterRender.
void LLDrawPoolTerrain::endRenderPass | ( | S32 | pass | ) | [virtual] |
Reimplemented from LLDrawPool.
Definition at line 128 of file lldrawpoolterrain.cpp.
References LLDrawPool::endRenderPass(), LLFastTimer::FTM_RENDER_TERRAIN, LLGLSLShader::mShaderLevel, LLDrawPool::mVertexShaderLevel, and LLGLSLShader::unbind().
void LLDrawPoolTerrain::renderForSelect | ( | ) | [virtual] |
Implements LLFacePool.
Definition at line 966 of file lldrawpoolterrain.cpp.
References LLFace::getDrawable(), LLDrawable::getVObj(), LLDrawable::isDead(), LLVertexBuffer::MAP_VERTEX, LLFacePool::mDrawFace, LLFace::renderForSelect(), and LLImageGL::unbindTexture().
void LLDrawPoolTerrain::dirtyTextures | ( | const std::set< LLViewerImage * > & | textures | ) | [virtual] |
Reimplemented from LLFacePool.
Definition at line 987 of file lldrawpoolterrain.cpp.
References LLFace::getDrawable(), gPipeline, LLPipeline::markTextured(), LLFacePool::mReferences, and mTexturep.
LLViewerImage * LLDrawPoolTerrain::getTexture | ( | ) | [virtual] |
Reimplemented from LLFacePool.
Definition at line 1000 of file lldrawpoolterrain.cpp.
References mTexturep.
Referenced by ~LLDrawPoolTerrain().
LLViewerImage * LLDrawPoolTerrain::getDebugTexture | ( | ) | [virtual] |
Reimplemented from LLDrawPool.
Definition at line 1005 of file lldrawpoolterrain.cpp.
References mTexturep.
LLColor3 LLDrawPoolTerrain::getDebugColor | ( | ) | const |
Definition at line 1011 of file lldrawpoolterrain.cpp.
void LLDrawPoolTerrain::renderSimple | ( | ) | [protected] |
Definition at line 869 of file lldrawpoolterrain.cpp.
References LLFacePool::drawLoop(), LLFacePool::mDrawFace, mTexturep, LLVector4::mV, LLVector3::mV, LLVector4::setVec(), and LLImageGL::unbindTexture().
Referenced by render().
void LLDrawPoolTerrain::renderOwnership | ( | ) | [protected] |
Definition at line 922 of file lldrawpoolterrain.cpp.
References LLViewerImage::bindTexture(), LLViewerRegion::getParcelOverlay(), LLVOSurfacePatch::getPatch(), LLSurface::getRegion(), LLSurfacePatch::getSurface(), LLViewerParcelOverlay::getTexture(), LLDrawable::getVObj(), llassert, LLVertexBuffer::MAP_TEXCOORD, LLVertexBuffer::MAP_VERTEX, LLFacePool::mDrawFace, and LLFace::renderIndexed().
Referenced by render().
void LLDrawPoolTerrain::renderFull2TU | ( | ) | [protected] |
Definition at line 638 of file lldrawpoolterrain.cpp.
References LLViewerImage::bindTexture(), LLGLImmediate::blendFunc(), LLFacePool::drawLoop(), gAgent, LLViewerRegion::getComposition(), LLViewerRegion::getOriginGlobal(), LLAgent::getRegion(), gGL, m2DAlphaRampImagep, LLVLComposition::mDetailTextures, LLFacePool::mDrawFace, LLVector3d::mdV, LLVector4::mV, sDetailScale, LLVector4::setVec(), LLImageGL::unbindTexture(), VX, and VY.
Referenced by render().
void LLDrawPoolTerrain::renderFull4TU | ( | ) | [protected] |
Definition at line 358 of file lldrawpoolterrain.cpp.
References LLViewerImage::bindTexture(), LLGLImmediate::blendFunc(), LLFacePool::drawLoop(), gAgent, LLViewerRegion::getComposition(), LLViewerRegion::getOriginGlobal(), LLAgent::getRegion(), gGL, m2DAlphaRampImagep, LLVLComposition::mDetailTextures, LLFacePool::mDrawFace, LLVector3d::mdV, LLVector4::mV, sDetailScale, LLVector4::setVec(), LLVertexBuffer::unbind(), LLImageGL::unbindTexture(), VX, and VY.
Referenced by render().
void LLDrawPoolTerrain::renderFullShader | ( | ) | [protected] |
ALPHA TEXTURE COORDS 0:
ALPHA TEXTURE COORDS 1:
ALPHA TEXTURE COORDS 2:
Definition at line 218 of file lldrawpoolterrain.cpp.
References LLViewerImage::bindTexture(), LLGLSLShader::disableTexture(), LLFacePool::drawLoop(), LLGLSLShader::enableTexture(), gAgent, LLViewerRegion::getComposition(), LLViewerRegion::getOriginGlobal(), LLAgent::getRegion(), m2DAlphaRampImagep, LLVLComposition::mDetailTextures, LLFacePool::mDrawFace, LLVector3d::mdV, LLVector4::mV, S32, sDetailScale, LLVector4::setVec(), LLShaderMgr::TERRAIN_ALPHARAMP, LLShaderMgr::TERRAIN_DETAIL0, LLShaderMgr::TERRAIN_DETAIL1, LLShaderMgr::TERRAIN_DETAIL2, LLShaderMgr::TERRAIN_DETAIL3, LLImageGL::unbindTexture(), VX, and VY.
Referenced by render().
LLPointer<LLViewerImage> LLDrawPoolTerrain::mTexturep [private] |
Definition at line 39 of file lldrawpoolterrain.h.
Referenced by dirtyTextures(), getDebugTexture(), getTexture(), instancePool(), LLDrawPoolTerrain(), and renderSimple().
Definition at line 70 of file lldrawpoolterrain.h.
Referenced by LLDrawPoolTerrain(), renderFull2TU(), renderFull4TU(), and renderFullShader().
Definition at line 71 of file lldrawpoolterrain.h.
S32 LLDrawPoolTerrain::sDetailMode = 1 [static] |
Definition at line 73 of file lldrawpoolterrain.h.
Referenced by getDetailMode(), handleTerrainDetailChanged(), LLDrawPoolTerrain(), prerender(), and render().
F32 LLDrawPoolTerrain::sDetailScale = DETAIL_SCALE [static] |
Definition at line 74 of file lldrawpoolterrain.h.
Referenced by LLDrawPoolTerrain(), renderFull2TU(), renderFull4TU(), and renderFullShader().