#include <llrendertarget.h>
Public Member Functions | |
LLRenderTarget () | |
~LLRenderTarget () | |
void | allocate (U32 resx, U32 resy, U32 color_fmt, BOOL depth, U32 usage=GL_TEXTURE_2D, BOOL use_fbo=FALSE) |
void | allocateDepth () |
void | release () |
void | bindTarget () |
void | clear () |
void | getViewport (S32 *viewport) |
U32 | getWidth () const |
U32 | getHeight () const |
void | bindTexture () |
void | bindDepth () |
void | flush (BOOL fetch_depth=FALSE) |
BOOL | isComplete () const |
Static Public Member Functions | |
static void | unbindTarget () |
Static Public Attributes | |
static BOOL | sUseFBO = FALSE |
Private Attributes | |
U32 | mResX |
U32 | mResY |
U32 | mTex |
U32 | mFBO |
U32 | mDepth |
U32 | mStencil |
BOOL | mUseDepth |
BOOL | mRenderDepth |
U32 | mUsage |
Definition at line 62 of file llrendertarget.h.
LLRenderTarget::LLRenderTarget | ( | ) |
Definition at line 41 of file llrendertarget.cpp.
LLRenderTarget::~LLRenderTarget | ( | ) |
Definition at line 54 of file llrendertarget.cpp.
References release().
void LLRenderTarget::allocate | ( | U32 | resx, | |
U32 | resy, | |||
U32 | color_fmt, | |||
BOOL | depth, | |||
U32 | usage = GL_TEXTURE_2D , |
|||
BOOL | use_fbo = FALSE | |||
) |
Definition at line 59 of file llrendertarget.cpp.
References allocateDepth(), gGLManager, mDepth, mFBO, LLGLManager::mHasFramebufferObject, mResX, mResY, mTex, mUsage, mUseDepth, NULL, release(), stop_glerror, and sUseFBO.
Referenced by LLPipeline::createGLBuffers(), LLPipeline::generateImpostor(), LLViewerWindow::rawSnapshot(), and LLPipeline::resizeScreenTexture().
void LLRenderTarget::allocateDepth | ( | ) |
Definition at line 120 of file llrendertarget.cpp.
References mDepth, mResX, mResY, mUsage, and NULL.
Referenced by allocate(), and flush().
void LLRenderTarget::release | ( | ) |
Definition at line 129 of file llrendertarget.cpp.
References mDepth, mFBO, and mTex.
Referenced by allocate(), LLPipeline::releaseGLBuffers(), LLVOAvatar::resetImpostors(), LLPipeline::resizeScreenTexture(), and ~LLRenderTarget().
void LLRenderTarget::bindTarget | ( | ) |
Definition at line 150 of file llrendertarget.cpp.
References mFBO, mResX, and mResY.
Referenced by display(), LLPipeline::generateImpostor(), LLPipeline::generateWaterReflection(), LLViewerWindow::rawSnapshot(), LLPipeline::renderBloom(), and LLPipeline::updateCull().
void LLRenderTarget::unbindTarget | ( | ) | [static] |
Definition at line 161 of file llrendertarget.cpp.
References gGLManager, and LLGLManager::mHasFramebufferObject.
Referenced by LLPipeline::generateWaterReflection(), and LLPipeline::updateCull().
void LLRenderTarget::clear | ( | void | ) |
Definition at line 169 of file llrendertarget.cpp.
References mFBO, mResX, mResY, and mUseDepth.
Referenced by LLPipeline::generateWaterReflection(), and LLPipeline::renderBloom().
void LLRenderTarget::getViewport | ( | S32 * | viewport | ) |
Definition at line 229 of file llrendertarget.cpp.
Referenced by LLPipeline::generateImpostor(), and LLPipeline::generateWaterReflection().
U32 LLRenderTarget::getWidth | ( | ) | const [inline] |
Definition at line 98 of file llrendertarget.h.
References mResX.
Referenced by LLPipeline::generateImpostor().
U32 LLRenderTarget::getHeight | ( | ) | const [inline] |
Definition at line 101 of file llrendertarget.h.
References mResY.
Referenced by LLPipeline::generateImpostor().
void LLRenderTarget::bindTexture | ( | ) |
Definition at line 188 of file llrendertarget.cpp.
Referenced by flush(), LLPipeline::generateImpostor(), LLPipeline::renderBloom(), LLVOAvatar::renderImpostor(), and LLDrawPoolWater::shade().
void LLRenderTarget::bindDepth | ( | ) |
Definition at line 193 of file llrendertarget.cpp.
References mDepth, and mUsage.
Referenced by flush().
void LLRenderTarget::flush | ( | BOOL | fetch_depth = FALSE |
) |
Definition at line 199 of file llrendertarget.cpp.
References allocateDepth(), bindDepth(), bindTexture(), LLGLImmediate::flush(), gGL, mDepth, mFBO, mResX, mResY, and mUsage.
Referenced by display(), LLPipeline::generateImpostor(), LLPipeline::generateWaterReflection(), LLViewerWindow::rawSnapshot(), LLPipeline::renderBloom(), and LLPipeline::updateCull().
BOOL LLRenderTarget::isComplete | ( | ) | const |
Definition at line 224 of file llrendertarget.cpp.
References FALSE, mDepth, mTex, and TRUE.
Referenced by LLPipeline::generateImpostor(), and LLVOAvatar::renderImpostor().
BOOL LLRenderTarget::sUseFBO = FALSE [static] |
Definition at line 66 of file llrendertarget.h.
Referenced by allocate(), LLPipeline::generateWaterReflection(), handleRenderUseFBOChanged(), LLPipeline::renderBloom(), and settings_modify().
U32 LLRenderTarget::mResX [private] |
Definition at line 123 of file llrendertarget.h.
Referenced by allocate(), allocateDepth(), bindTarget(), clear(), flush(), getViewport(), and getWidth().
U32 LLRenderTarget::mResY [private] |
Definition at line 124 of file llrendertarget.h.
Referenced by allocate(), allocateDepth(), bindTarget(), clear(), flush(), getHeight(), and getViewport().
U32 LLRenderTarget::mTex [private] |
Definition at line 125 of file llrendertarget.h.
Referenced by allocate(), bindTexture(), isComplete(), and release().
U32 LLRenderTarget::mFBO [private] |
Definition at line 126 of file llrendertarget.h.
Referenced by allocate(), bindTarget(), clear(), flush(), and release().
U32 LLRenderTarget::mDepth [private] |
Definition at line 127 of file llrendertarget.h.
Referenced by allocate(), allocateDepth(), bindDepth(), flush(), isComplete(), and release().
U32 LLRenderTarget::mStencil [private] |
Definition at line 128 of file llrendertarget.h.
BOOL LLRenderTarget::mUseDepth [private] |
BOOL LLRenderTarget::mRenderDepth [private] |
Definition at line 130 of file llrendertarget.h.
U32 LLRenderTarget::mUsage [private] |
Definition at line 131 of file llrendertarget.h.
Referenced by allocate(), allocateDepth(), bindDepth(), bindTexture(), and flush().