Skip to content

Commit

Permalink
move changebatchtmus() to renderstate for #241
Browse files Browse the repository at this point in the history
  • Loading branch information
no-lex committed Nov 6, 2022
1 parent e281f57 commit 8bd9aa8
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/engine/render/renderva.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -638,6 +638,8 @@ namespace
vec2 texgenscroll;
int texgenorient, texgenmillis;

void changebatchtmus();

renderstate() : colormask(true), depthmask(true), alphaing(0), vbuf(0), vattribs(false),
vquery(false), colorscale(1, 1, 1), alphascale(0), refractscale(0),
refractcolor(1, 1, 1), globals(-1), tmu(-1), slot(nullptr),
Expand Down Expand Up @@ -944,11 +946,11 @@ namespace
}
}

void changebatchtmus(renderstate &cur)
void renderstate::changebatchtmus()
{
if(cur.tmu != 0)
if(tmu != 0)
{
cur.tmu = 0;
tmu = 0;
glActiveTexture(GL_TEXTURE0);
}
}
Expand Down Expand Up @@ -1195,7 +1197,7 @@ namespace
}
if(pass == RenderPass_GBuffer || pass == RenderPass_ReflectiveShadowMap)
{
changebatchtmus(cur);
cur.changebatchtmus();
}
if(cur.vslot != &b.vslot)
{
Expand Down

0 comments on commit 8bd9aa8

Please sign in to comment.