mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-14 07:36:15 +00:00
Use explicit front and back stencil state.
Previously stencil states were stored in array. This commit changes the DepthStencilState to explicitly store a front and back stencil.
This commit is contained in:
committed by
Corentin Wallez
parent
376f1c6a8e
commit
f51be34864
@@ -214,8 +214,8 @@ namespace opengl {
|
||||
|
||||
if (StencilIsEnabled()) {
|
||||
glEnable(GL_STENCIL_TEST);
|
||||
auto& back = GetStencil(nxt::Face::Back);
|
||||
auto& front = GetStencil(nxt::Face::Front);
|
||||
auto& back = GetBackStencil();
|
||||
auto& front = GetFrontStencil();
|
||||
|
||||
glStencilOpSeparate(GL_BACK,
|
||||
OpenGLStencilOperation(back.stencilFail),
|
||||
@@ -238,8 +238,8 @@ namespace opengl {
|
||||
|
||||
void DepthStencilState::ApplyStencilReferenceNow(uint32_t backReference, uint32_t frontReference) {
|
||||
if (StencilIsEnabled()) {
|
||||
auto& back = GetStencil(nxt::Face::Back);
|
||||
auto& front = GetStencil(nxt::Face::Front);
|
||||
auto& back = GetBackStencil();
|
||||
auto& front = GetFrontStencil();
|
||||
glStencilFuncSeparate(GL_BACK,
|
||||
OpenGLCompareFunction(back.compareFunction),
|
||||
backReference,
|
||||
|
||||
Reference in New Issue
Block a user