summaryrefslogtreecommitdiff
path: root/indra/llrender/llrendertarget.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llrender/llrendertarget.h')
-rw-r--r--indra/llrender/llrendertarget.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/indra/llrender/llrendertarget.h b/indra/llrender/llrendertarget.h
index cd3290cf66..583d0054ac 100644
--- a/indra/llrender/llrendertarget.h
+++ b/indra/llrender/llrendertarget.h
@@ -33,9 +33,9 @@
#include "llrender.h"
/*
- Wrapper around OpenGL framebuffer objects for use in render-to-texture
+Wrapper around OpenGL framebuffer objects for use in render-to-texture
- SAMPLE USAGE:
+SAMPLE USAGE:
LLRenderTarget target;
@@ -126,7 +126,7 @@ public:
// If an LLRenderTarget is currently bound, stores a reference to that LLRenderTarget
// and restores previous binding on flush() (maintains a stack of Render Targets)
// Asserts that this target is not currently bound in the stack
- void bindTarget();
+ void bindTarget(std::string name_ = "nd", U32 mode_ = 0);
//clear render targer, clears depth buffer if present,
//uses scissor rect if in copy-to-texture mode
@@ -158,6 +158,7 @@ public:
// If an LLRenderTarget was bound when bindTarget was called, binds that RenderTarget for rendering (maintains RT stack)
// asserts that this target is currently bound
void flush();
+ void unbind();
//Returns TRUE if target is ready to be rendered into.
//That is, if the target has been allocated with at least
@@ -174,11 +175,15 @@ public:
static LLRenderTarget* sBoundTarget;
+ U32 mMode;
+ std::string mName;
+
protected:
U32 mResX;
U32 mResY;
std::vector<U32> mTex;
std::vector<U32> mInternalFormat;
+ std::vector<U32> mPixFormat;
U32 mFBO;
LLRenderTarget* mPreviousRT = nullptr;
@@ -188,6 +193,10 @@ protected:
U32 mMipLevels;
LLTexUnit::eTextureType mUsage;
+
+private:
+ U32 getTarget();
+
};
#endif