Skip to content

Commit

Permalink
move disablevbuf 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 01a1e4e commit 8b884ba
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/engine/render/renderva.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -640,6 +640,7 @@ namespace

void changebatchtmus();
void disablevquery();
void disablevbuf();

renderstate() : colormask(true), depthmask(true), alphaing(0), vbuf(0), vattribs(false),
vquery(false), colorscale(1, 1, 1), alphascale(0), refractscale(0),
Expand All @@ -654,11 +655,11 @@ namespace
}
};

void disablevbuf(renderstate &cur)
void renderstate::disablevbuf()
{
gle::clearvbo();
gle::clearebo();
cur.vbuf = 0;
vbuf = 0;
}

void enablevquery(renderstate &cur)
Expand Down Expand Up @@ -1387,7 +1388,7 @@ namespace
}
if(cur.vbuf)
{
disablevbuf(cur);
cur.disablevbuf();
}
}

Expand Down Expand Up @@ -2857,7 +2858,7 @@ void rendergeom()
}
if(cur.vbuf)
{
disablevbuf(cur);
cur.disablevbuf();
}
renderquery(cur, va->query, va);
}
Expand Down Expand Up @@ -2887,7 +2888,7 @@ void rendergeom()
}
if(cur.vbuf)
{
disablevbuf(cur);
cur.disablevbuf();
}
glFlush();
if(cur.colormask)
Expand Down

0 comments on commit 8b884ba

Please sign in to comment.