summaryrefslogtreecommitdiff
path: root/indra/newview/lldrawpoolsimple.h
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2021-12-02 20:11:43 +0000
committerDave Parks <davep@lindenlab.com>2021-12-02 20:11:43 +0000
commit511de439a35ddb22c6f174b85c599d4881b9c139 (patch)
tree55a0def0bd0a5613b855f3b6843bc8e9c574993e /indra/newview/lldrawpoolsimple.h
parent2ed229473d7473593e8d502003991487bb622018 (diff)
SL-16405 Remove “pass == <magic number>” anti-pattern from various drawpools.
Diffstat (limited to 'indra/newview/lldrawpoolsimple.h')
-rw-r--r--indra/newview/lldrawpoolsimple.h34
1 files changed, 8 insertions, 26 deletions
diff --git a/indra/newview/lldrawpoolsimple.h b/indra/newview/lldrawpoolsimple.h
index d6fecdd23c..cccbe5e495 100644
--- a/indra/newview/lldrawpoolsimple.h
+++ b/indra/newview/lldrawpoolsimple.h
@@ -46,18 +46,12 @@ public:
LLDrawPoolSimple();
S32 getNumDeferredPasses() override;
- void beginDeferredPass(S32 pass) override;
- void endDeferredPass(S32 pass) override;
void renderDeferred(S32 pass) override;
- void beginRenderPass(S32 pass) override;
- void endRenderPass(S32 pass) override;
/// We need two passes so we can handle emissive materials separately.
S32 getNumPasses() override;
void render(S32 pass = 0) override;
void prerender() override;
-
- LLGLSLShader* mShader = nullptr;
};
class LLDrawPoolGrass : public LLRenderPass
@@ -101,14 +95,10 @@ public:
LLDrawPoolAlphaMask();
- /*virtual*/ S32 getNumDeferredPasses() { return 2; }
- /*virtual*/ void beginDeferredPass(S32 pass);
- /*virtual*/ void endDeferredPass(S32 pass);
+ /*virtual*/ S32 getNumDeferredPasses() { return 1; }
/*virtual*/ void renderDeferred(S32 pass);
- /*virtual*/ S32 getNumPasses() { return 2; }
- /*virtual*/ void beginRenderPass(S32 pass);
- /*virtual*/ void endRenderPass(S32 pass);
+ /*virtual*/ S32 getNumPasses() { return 1; }
/*virtual*/ void render(S32 pass = 0);
/*virtual*/ void prerender();
@@ -127,14 +117,10 @@ public:
LLDrawPoolFullbrightAlphaMask();
- /*virtual*/ S32 getNumPostDeferredPasses() { return 2; }
- /*virtual*/ void beginPostDeferredPass(S32 pass);
- /*virtual*/ void endPostDeferredPass(S32 pass);
+ /*virtual*/ S32 getNumPostDeferredPasses() { return 1; }
/*virtual*/ void renderPostDeferred(S32 pass);
- /*virtual*/ S32 getNumPasses() { return 2; }
- /*virtual*/ void beginRenderPass(S32 pass);
- /*virtual*/ void endRenderPass(S32 pass);
+ /*virtual*/ S32 getNumPasses() { return 1; }
/*virtual*/ void render(S32 pass = 0);
/*virtual*/ void prerender();
};
@@ -153,13 +139,9 @@ public:
LLDrawPoolFullbright();
- /*virtual*/ S32 getNumPostDeferredPasses() { return 2; }
- /*virtual*/ void beginPostDeferredPass(S32 pass);
- /*virtual*/ void endPostDeferredPass(S32 pass);
+ /*virtual*/ S32 getNumPostDeferredPasses() { return 1; }
/*virtual*/ void renderPostDeferred(S32 pass);
- /*virtual*/ void beginRenderPass(S32 pass);
- /*virtual*/ void endRenderPass(S32 pass);
/*virtual*/ S32 getNumPasses();
/*virtual*/ void render(S32 pass = 0);
/*virtual*/ void prerender();
@@ -182,11 +164,11 @@ public:
virtual void prerender() { }
- /*virtual*/ S32 getNumPostDeferredPasses() { return 2; }
- /*virtual*/ void beginPostDeferredPass(S32 pass);
- /*virtual*/ void endPostDeferredPass(S32 pass);
+ /*virtual*/ S32 getNumPostDeferredPasses() { return 1; }
/*virtual*/ void renderPostDeferred(S32 pass);
+ void render(LLGLSLShader* shader);
+
/*virtual*/ S32 getNumPasses();
void render(S32 pass = 0);