diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2019-02-28 12:03:29 +0100 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2019-03-01 09:33:37 +0100 |
commit | 4372ce2b90a26d114fafa555227a5200c421878f (patch) | |
tree | d3995b51c4fe4d2fea83ea57ce308de0cd24b89c /src/mbgl/gl/value.cpp | |
parent | 53628a455bba6448579cbb8e8cedf25de28a8b3f (diff) | |
download | qtlocation-mapboxgl-4372ce2b90a26d114fafa555227a5200c421878f.tar.gz |
[core] move StencilMode to gfx namespace
Diffstat (limited to 'src/mbgl/gl/value.cpp')
-rw-r--r-- | src/mbgl/gl/value.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/mbgl/gl/value.cpp b/src/mbgl/gl/value.cpp index 800c39a9d6..8b46c1ae35 100644 --- a/src/mbgl/gl/value.cpp +++ b/src/mbgl/gl/value.cpp @@ -93,7 +93,7 @@ StencilFunc::Type StencilFunc::Get() { MBGL_CHECK_ERROR(glGetIntegerv(GL_STENCIL_FUNC, &func)); MBGL_CHECK_ERROR(glGetIntegerv(GL_STENCIL_REF, &ref)); MBGL_CHECK_ERROR(glGetIntegerv(GL_STENCIL_VALUE_MASK, &mask)); - return { static_cast<uint32_t>(func), ref, static_cast<uint32_t>(mask) }; + return { Enum<gfx::StencilFunctionType>::from(func), ref, static_cast<uint32_t>(mask) }; } const constexpr StencilTest::Type StencilTest::Default; @@ -111,9 +111,9 @@ StencilTest::Type StencilTest::Get() { const constexpr StencilOp::Type StencilOp::Default; void StencilOp::Set(const Type& value) { - MBGL_CHECK_ERROR(glStencilOp(static_cast<GLenum>(value.sfail), - static_cast<GLenum>(value.dpfail), - static_cast<GLenum>(value.dppass))); + MBGL_CHECK_ERROR(glStencilOp(Enum<gfx::StencilOpType>::to(value.sfail), + Enum<gfx::StencilOpType>::to(value.dpfail), + Enum<gfx::StencilOpType>::to(value.dppass))); } StencilOp::Type StencilOp::Get() { @@ -121,8 +121,9 @@ StencilOp::Type StencilOp::Get() { MBGL_CHECK_ERROR(glGetIntegerv(GL_STENCIL_FAIL, &sfail)); MBGL_CHECK_ERROR(glGetIntegerv(GL_STENCIL_PASS_DEPTH_FAIL, &dpfail)); MBGL_CHECK_ERROR(glGetIntegerv(GL_STENCIL_PASS_DEPTH_PASS, &dppass)); - return { static_cast<StencilMode::Op>(sfail), static_cast<StencilMode::Op>(dpfail), - static_cast<StencilMode::Op>(dppass) }; + return { Enum<gfx::StencilOpType>::from(sfail), + Enum<gfx::StencilOpType>::from(dpfail), + Enum<gfx::StencilOpType>::from(dppass) }; } const constexpr DepthRange::Type DepthRange::Default; |