Cleanup: DRW: Remove DRW_STATE_OFFSET

This commit is contained in:
Clément Foucault 2019-05-26 02:12:35 +02:00
parent f3fc872171
commit ba75e93c88
2 changed files with 0 additions and 31 deletions

View File

@ -349,10 +349,6 @@ typedef enum {
DRW_STATE_CLIP_PLANES = (1 << 22),
DRW_STATE_WIRE_SMOOTH = (1 << 23),
DRW_STATE_FIRST_VERTEX_CONVENTION = (1 << 24),
/** Polygon offset. Does not work with lines and points. */
DRW_STATE_OFFSET_POSITIVE = (1 << 25),
/** Polygon offset. Does not work with lines and points. */
DRW_STATE_OFFSET_NEGATIVE = (1 << 26),
} DRWState;
#define DRW_STATE_DEFAULT \

View File

@ -306,33 +306,6 @@ void drw_state_set(DRWState state)
}
}
/* Polygon Offset */
{
int test;
if (CHANGED_ANY_STORE_VAR(DRW_STATE_OFFSET_POSITIVE | DRW_STATE_OFFSET_NEGATIVE, test)) {
if (test) {
glEnable(GL_POLYGON_OFFSET_FILL);
glEnable(GL_POLYGON_OFFSET_LINE);
glEnable(GL_POLYGON_OFFSET_POINT);
/* Stencil Write */
if ((state & DRW_STATE_OFFSET_POSITIVE) != 0) {
glPolygonOffset(1.0f, 1.0f);
}
else if ((state & DRW_STATE_OFFSET_NEGATIVE) != 0) {
glPolygonOffset(-1.0f, -1.0f);
}
else {
BLI_assert(0);
}
}
else {
glDisable(GL_POLYGON_OFFSET_FILL);
glDisable(GL_POLYGON_OFFSET_LINE);
glDisable(GL_POLYGON_OFFSET_POINT);
}
}
}
#undef CHANGED_TO
#undef CHANGED_ANY
#undef CHANGED_ANY_STORE_VAR