[core] don't force GL state to be set when calling .reset()
We are using Value::reset() to change a piece of GL state to its default value. However, the current implementation always executes the GL call, even if our state tracking system knows that it's already at that value. The new implementation of Value::reset() now respects that, resulting in a lot fewer GL calls.
This commit is contained in:
@@ -140,6 +140,10 @@ struct StencilOp {
|
||||
}
|
||||
};
|
||||
|
||||
constexpr bool operator!=(const StencilOp::Type& a, const StencilOp::Type& b) {
|
||||
return a.sfail != b.sfail || a.dpfail != b.dpfail || a.dppass != b.dppass;
|
||||
}
|
||||
|
||||
struct DepthRange {
|
||||
struct Type { GLfloat near, far; };
|
||||
static const Type Default;
|
||||
|
||||
Reference in New Issue
Block a user