Skip to content

Commit

Permalink
move renderstate::alpha to private for #241
Browse files Browse the repository at this point in the history
  • Loading branch information
no-lex committed Feb 1, 2023
1 parent 41b3dbc commit 8703da4
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/engine/render/renderva.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,6 @@ namespace
int alphaing;
GLuint vbuf;
bool vattribs, vquery;
float alphascale;
int globals;

void disablevquery();
Expand All @@ -733,10 +732,11 @@ namespace
void renderbatches(int pass);
void renderzpass(const vtxarray &va);
void invalidatetexgenorient();
void invalidatealphascale();
void cleartexgenmillis();

renderstate() : colormask(true), depthmask(true), alphaing(0), vbuf(0), vattribs(false),
vquery(false), alphascale(0), globals(-1), texgenorient(-1),
vquery(false), globals(-1), alphascale(0), texgenorient(-1),
texgenmillis(lastmillis), tmu(-1), colorscale(1, 1, 1), slot(nullptr),
vslot(nullptr), texgenslot(nullptr), texgenvslot(nullptr),
texgenscroll(0, 0), refractscale(0), refractcolor(1, 1, 1)
Expand All @@ -748,6 +748,7 @@ namespace
}
private:

float alphascale;
int texgenorient, texgenmillis;
int tmu;
GLuint textures[7];
Expand All @@ -773,6 +774,11 @@ namespace
texgenorient = -1;
}

void renderstate::invalidatealphascale()
{
alphascale = -1;
}

void renderstate::cleartexgenmillis()
{
texgenmillis = 0;
Expand Down Expand Up @@ -2824,7 +2830,7 @@ void renderalphageom(int side)

renderstate cur;
cur.alphaing = side;
cur.alphascale = -1;
cur.invalidatealphascale();

setupgeom();

Expand Down

0 comments on commit 8703da4

Please sign in to comment.