Skip to content

Commit

Permalink
move enablevquery 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 8b884ba commit 434f13f
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/engine/render/renderva.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -662,20 +662,20 @@ namespace
vbuf = 0;
}

void enablevquery(renderstate &cur)
void renderstate::enablevquery()
{
if(cur.colormask)
if(colormask)
{
cur.colormask = false;
colormask = false;
glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE);
}
if(cur.depthmask)
if(depthmask)
{
cur.depthmask = false;
depthmask = false;
glDepthMask(GL_FALSE);
}
startbb(false);
cur.vquery = true;
vquery = true;
}

void renderstate::disablevquery()
Expand All @@ -688,7 +688,7 @@ namespace
{
if(!cur.vquery)
{
enablevquery(cur);
cur.enablevquery();
}
query->startquery();
if(full)
Expand Down

0 comments on commit 434f13f

Please sign in to comment.