aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llrender/llrendertarget.h
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/llrender/llrendertarget.h')
-rw-r--r--linden/indra/llrender/llrendertarget.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/linden/indra/llrender/llrendertarget.h b/linden/indra/llrender/llrendertarget.h
index 5e3c4d9..38a41cb 100644
--- a/linden/indra/llrender/llrendertarget.h
+++ b/linden/indra/llrender/llrendertarget.h
@@ -4,7 +4,7 @@
4 * 4 *
5 * $LicenseInfo:firstyear=2001&license=viewergpl$ 5 * $LicenseInfo:firstyear=2001&license=viewergpl$
6 * 6 *
7 * Copyright (c) 2001-2008, Linden Research, Inc. 7 * Copyright (c) 2001-2009, Linden Research, Inc.
8 * 8 *
9 * Second Life Viewer Source Code 9 * Second Life Viewer Source Code
10 * The source code in this file ("Source Code") is provided by Linden Lab 10 * The source code in this file ("Source Code") is provided by Linden Lab
@@ -33,6 +33,7 @@
33#define LL_LLRENDERTARGET_H 33#define LL_LLRENDERTARGET_H
34 34
35#include "llgl.h" 35#include "llgl.h"
36#include "llrender.h"
36 37
37/* 38/*
38 SAMPLE USAGE: 39 SAMPLE USAGE:
@@ -53,7 +54,7 @@
53 ... 54 ...
54 55
55 //use target as a texture 56 //use target as a texture
56 target.bindTexture(); 57 gGL.getTexUnit(INDEX)->bind(&target);
57 ... <issue drawing commands> ... 58 ... <issue drawing commands> ...
58 59
59*/ 60*/
@@ -71,7 +72,7 @@ public:
71 //allocate resources for rendering 72 //allocate resources for rendering
72 //must be called before use 73 //must be called before use
73 //multiple calls will release previously allocated resources 74 //multiple calls will release previously allocated resources
74 void allocate(U32 resx, U32 resy, U32 color_fmt, BOOL depth, U32 usage = GL_TEXTURE_2D, BOOL use_fbo = FALSE); 75 void allocate(U32 resx, U32 resy, U32 color_fmt, BOOL depth, LLTexUnit::eTextureType usage = LLTexUnit::TT_TEXTURE, BOOL use_fbo = FALSE);
75 76
76 //allocate a depth texture 77 //allocate a depth texture
77 void allocateDepth(); 78 void allocateDepth();
@@ -100,11 +101,11 @@ public:
100 //get Y resolution 101 //get Y resolution
101 U32 getHeight() const { return mResY; } 102 U32 getHeight() const { return mResY; }
102 103
103 //bind results of render for sampling 104 LLTexUnit::eTextureType getUsage(void) const { return mUsage; }
104 void bindTexture();
105 105
106 //bind results of render for sampling depth buffer 106 U32 getTexture(void) const { return mTex; }
107 void bindDepth(); 107
108 U32 getDepth(void) const { return mDepth; }
108 109
109 //flush rendering operations 110 //flush rendering operations
110 //must be called when rendering is complete 111 //must be called when rendering is complete
@@ -128,7 +129,7 @@ private:
128 U32 mStencil; 129 U32 mStencil;
129 BOOL mUseDepth; 130 BOOL mUseDepth;
130 BOOL mRenderDepth; 131 BOOL mRenderDepth;
131 U32 mUsage; 132 LLTexUnit::eTextureType mUsage;
132 133
133}; 134};
134 135