1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2025-02-03 18:14:01 +00:00

Tiny simplification in render pass logic

This commit is contained in:
fgenesis 2022-06-09 02:32:19 +02:00
parent 4732d10d78
commit 72f2b44620
2 changed files with 4 additions and 3 deletions

View file

@ -560,9 +560,7 @@ void RenderObject::renderCall(const RenderState& rs) const
(*i)->render(rs);
}
const int effectivePass = renderPass == RENDER_ALL ? rs.pass : renderPass;
if (rs.pass == RENDER_ALL || rs.pass == effectivePass)
if (rs.pass == RENDER_ALL || rs.pass == renderPass)
{
if (texture)
{

View file

@ -205,6 +205,9 @@ public:
void setOverrideCullRadius(float ovr);
void setRenderPass(int pass) { renderPass = pass; }
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 };
// Defined in RenderObject_inline.h