Metal layer depth range support (#2013)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Alex Cristici <alex.cristici@gmail.com>
This commit is contained in:
mwilsnd
2024-01-16 09:31:44 -05:00
committed by GitHub
parent 29c16a4a81
commit d6c2b148dd
28 changed files with 109 additions and 31 deletions

View File

@@ -490,7 +490,9 @@ void Context::setDirtyState() {
stencilMask.setDirty();
stencilTest.setDirty();
stencilOp.setDirty();
#if MLN_RENDER_BACKEND_OPENGL
depthRange.setDirty();
#endif
depthMask.setDirty();
depthTest.setDirty();
depthFunc.setDirty();
@@ -615,12 +617,16 @@ void Context::setDepthMode(const gfx::DepthMode& depth) {
// https://github.com/mapbox/mapbox-gl-native/issues/9164
depthFunc = depth.func;
depthMask = depth.mask;
#if MLN_RENDER_BACKEND_OPENGL
depthRange = depth.range;
#endif
} else {
depthTest = true;
depthFunc = depth.func;
depthMask = depth.mask;
#if MLN_RENDER_BACKEND_OPENGL
depthRange = depth.range;
#endif
}
}