mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-02-04 02:24:00 +00:00
Tiny simplification in render pass logic
This commit is contained in:
parent
4732d10d78
commit
72f2b44620
2 changed files with 4 additions and 3 deletions
|
@ -560,9 +560,7 @@ void RenderObject::renderCall(const RenderState& rs) const
|
||||||
(*i)->render(rs);
|
(*i)->render(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
const int effectivePass = renderPass == RENDER_ALL ? rs.pass : renderPass;
|
if (rs.pass == RENDER_ALL || rs.pass == renderPass)
|
||||||
|
|
||||||
if (rs.pass == RENDER_ALL || rs.pass == effectivePass)
|
|
||||||
{
|
{
|
||||||
if (texture)
|
if (texture)
|
||||||
{
|
{
|
||||||
|
|
|
@ -205,6 +205,9 @@ public:
|
||||||
void setOverrideCullRadius(float ovr);
|
void setOverrideCullRadius(float ovr);
|
||||||
void setRenderPass(int pass) { renderPass = pass; }
|
void setRenderPass(int pass) { renderPass = pass; }
|
||||||
int getRenderPass() const { return renderPass; }
|
int getRenderPass() const { return renderPass; }
|
||||||
|
|
||||||
|
// TODO: remove this once the render loop is split into a per-pass object collection phase
|
||||||
|
// and an actual rendering phase
|
||||||
enum { RENDER_ALL=999 };
|
enum { RENDER_ALL=999 };
|
||||||
|
|
||||||
// Defined in RenderObject_inline.h
|
// Defined in RenderObject_inline.h
|
||||||
|
|
Loading…
Add table
Reference in a new issue