diff options
author | Jacek Antonelli | 2009-04-30 13:04:20 -0500 |
---|---|---|
committer | Jacek Antonelli | 2009-04-30 13:07:16 -0500 |
commit | ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e (patch) | |
tree | 8348301d0ac44a524f1819b777686bf086907d76 /linden/indra/newview/lldrawpoolsimple.h | |
parent | Second Life viewer sources 1.22.11 (diff) | |
download | meta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.zip meta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.tar.gz meta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.tar.bz2 meta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.tar.xz |
Second Life viewer sources 1.23.0-RC
Diffstat (limited to 'linden/indra/newview/lldrawpoolsimple.h')
-rw-r--r-- | linden/indra/newview/lldrawpoolsimple.h | 70 |
1 files changed, 67 insertions, 3 deletions
diff --git a/linden/indra/newview/lldrawpoolsimple.h b/linden/indra/newview/lldrawpoolsimple.h index 6b81022..f561510 100644 --- a/linden/indra/newview/lldrawpoolsimple.h +++ b/linden/indra/newview/lldrawpoolsimple.h | |||
@@ -17,7 +17,8 @@ | |||
17 | * There are special exceptions to the terms and conditions of the GPL as | 17 | * There are special exceptions to the terms and conditions of the GPL as |
18 | * it is applied to this Source Code. View the full text of the exception | 18 | * it is applied to this Source Code. View the full text of the exception |
19 | * in the file doc/FLOSS-exception.txt in this software distribution, or | 19 | * in the file doc/FLOSS-exception.txt in this software distribution, or |
20 | * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception | 20 | * online at |
21 | * http://secondlifegrid.net/programs/open_source/licensing/flossexception | ||
21 | * | 22 | * |
22 | * By copying, modifying or distributing this software, you acknowledge | 23 | * By copying, modifying or distributing this software, you acknowledge |
23 | * that you have read and understood your obligations described above, | 24 | * that you have read and understood your obligations described above, |
@@ -41,19 +42,77 @@ public: | |||
41 | { | 42 | { |
42 | VERTEX_DATA_MASK = LLVertexBuffer::MAP_VERTEX | | 43 | VERTEX_DATA_MASK = LLVertexBuffer::MAP_VERTEX | |
43 | LLVertexBuffer::MAP_NORMAL | | 44 | LLVertexBuffer::MAP_NORMAL | |
44 | LLVertexBuffer::MAP_TEXCOORD | | 45 | LLVertexBuffer::MAP_TEXCOORD0 | |
45 | LLVertexBuffer::MAP_COLOR | 46 | LLVertexBuffer::MAP_COLOR |
46 | }; | 47 | }; |
47 | virtual U32 getVertexDataMask() { return VERTEX_DATA_MASK; } | 48 | virtual U32 getVertexDataMask() { return VERTEX_DATA_MASK; } |
48 | 49 | ||
49 | LLDrawPoolSimple(); | 50 | LLDrawPoolSimple(); |
50 | 51 | ||
52 | /*virtual*/ S32 getNumDeferredPasses() { return 1; } | ||
53 | /*virtual*/ void beginDeferredPass(S32 pass); | ||
54 | /*virtual*/ void endDeferredPass(S32 pass); | ||
55 | /*virtual*/ void renderDeferred(S32 pass); | ||
56 | |||
57 | /*virtual*/ void beginRenderPass(S32 pass); | ||
58 | /*virtual*/ void endRenderPass(S32 pass); | ||
59 | /// We need two passes so we can handle emissive materials separately. | ||
60 | /*virtual*/ S32 getNumPasses() { return 1; } | ||
61 | /*virtual*/ void render(S32 pass = 0); | ||
62 | /*virtual*/ void prerender(); | ||
63 | |||
64 | }; | ||
65 | |||
66 | class LLDrawPoolGrass : public LLRenderPass | ||
67 | { | ||
68 | public: | ||
69 | enum | ||
70 | { | ||
71 | VERTEX_DATA_MASK = LLVertexBuffer::MAP_VERTEX | | ||
72 | LLVertexBuffer::MAP_NORMAL | | ||
73 | LLVertexBuffer::MAP_TEXCOORD0 | | ||
74 | LLVertexBuffer::MAP_COLOR | ||
75 | }; | ||
76 | virtual U32 getVertexDataMask() { return VERTEX_DATA_MASK; } | ||
77 | |||
78 | LLDrawPoolGrass(); | ||
79 | |||
80 | /*virtual*/ S32 getNumDeferredPasses() { return 1; } | ||
81 | /*virtual*/ void beginDeferredPass(S32 pass); | ||
82 | /*virtual*/ void endDeferredPass(S32 pass); | ||
83 | /*virtual*/ void renderDeferred(S32 pass); | ||
84 | |||
51 | /*virtual*/ void beginRenderPass(S32 pass); | 85 | /*virtual*/ void beginRenderPass(S32 pass); |
52 | /*virtual*/ void endRenderPass(S32 pass); | 86 | /*virtual*/ void endRenderPass(S32 pass); |
53 | /// We need two passes so we can handle emissive materials separately. | 87 | /// We need two passes so we can handle emissive materials separately. |
54 | /*virtual*/ S32 getNumPasses() { return 1; } | 88 | /*virtual*/ S32 getNumPasses() { return 1; } |
55 | /*virtual*/ void render(S32 pass = 0); | 89 | /*virtual*/ void render(S32 pass = 0); |
56 | /*virtual*/ void prerender(); | 90 | /*virtual*/ void prerender(); |
91 | }; | ||
92 | |||
93 | class LLDrawPoolFullbright : public LLRenderPass | ||
94 | { | ||
95 | public: | ||
96 | enum | ||
97 | { | ||
98 | VERTEX_DATA_MASK = LLVertexBuffer::MAP_VERTEX | | ||
99 | LLVertexBuffer::MAP_TEXCOORD0 | | ||
100 | LLVertexBuffer::MAP_COLOR | ||
101 | }; | ||
102 | virtual U32 getVertexDataMask() { return VERTEX_DATA_MASK; } | ||
103 | |||
104 | LLDrawPoolFullbright(); | ||
105 | |||
106 | /*virtual*/ S32 getNumPostDeferredPasses() { return 1; } | ||
107 | /*virtual*/ void beginPostDeferredPass(S32 pass) { beginRenderPass(pass); } | ||
108 | /*virtual*/ void endPostDeferredPass(S32 pass) { endRenderPass(pass); } | ||
109 | /*virtual*/ void renderPostDeferred(S32 pass) { render(pass); } | ||
110 | |||
111 | /*virtual*/ void beginRenderPass(S32 pass); | ||
112 | /*virtual*/ void endRenderPass(S32 pass); | ||
113 | /*virtual*/ S32 getNumPasses(); | ||
114 | /*virtual*/ void render(S32 pass = 0); | ||
115 | /*virtual*/ void prerender(); | ||
57 | 116 | ||
58 | }; | 117 | }; |
59 | 118 | ||
@@ -65,13 +124,18 @@ public: | |||
65 | enum | 124 | enum |
66 | { | 125 | { |
67 | VERTEX_DATA_MASK = LLVertexBuffer::MAP_VERTEX | | 126 | VERTEX_DATA_MASK = LLVertexBuffer::MAP_VERTEX | |
68 | LLVertexBuffer::MAP_TEXCOORD | 127 | LLVertexBuffer::MAP_TEXCOORD0 |
69 | }; | 128 | }; |
70 | 129 | ||
71 | virtual U32 getVertexDataMask() { return VERTEX_DATA_MASK; } | 130 | virtual U32 getVertexDataMask() { return VERTEX_DATA_MASK; } |
72 | 131 | ||
73 | virtual void prerender() { } | 132 | virtual void prerender() { } |
74 | 133 | ||
134 | /*virtual*/ S32 getNumPostDeferredPasses() { return 1; } | ||
135 | /*virtual*/ void beginPostDeferredPass(S32 pass) { beginRenderPass(pass); } | ||
136 | /*virtual*/ void endPostDeferredPass(S32 pass) { endRenderPass(pass); } | ||
137 | /*virtual*/ void renderPostDeferred(S32 pass) { render(pass); } | ||
138 | |||
75 | void render(S32 pass = 0); | 139 | void render(S32 pass = 0); |
76 | void pushBatch(LLDrawInfo& params, U32 mask, BOOL texture = TRUE); | 140 | void pushBatch(LLDrawInfo& params, U32 mask, BOOL texture = TRUE); |
77 | 141 | ||