From 0d89e19481d4d5f770411141906f9df344c6b823 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Wed, 17 Nov 2021 15:49:00 +0200 Subject: [PATCH] Rename some stencil test constants This makes it more apparent what the difference between these and the _WRAP variants is. --- source/backends/opengl/stenciltest_backend.cpp | 4 ++-- source/core/stenciltest.cpp | 12 ++++++------ source/core/stenciltest.h | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/source/backends/opengl/stenciltest_backend.cpp b/source/backends/opengl/stenciltest_backend.cpp index 258bf9b8..1c049ea3 100644 --- a/source/backends/opengl/stenciltest_backend.cpp +++ b/source/backends/opengl/stenciltest_backend.cpp @@ -14,8 +14,8 @@ unsigned get_gl_stencil_op(StencilOp op) case KEEP: return GL_KEEP; case SET_ZERO: return GL_ZERO; case REPLACE: return GL_REPLACE; - case INCR: return GL_INCR; - case DECR: return GL_DECR; + case INCR_CLAMP: return GL_INCR; + case DECR_CLAMP: return GL_DECR; case INVERT: return GL_INVERT; case INCR_WRAP: return GL_INCR_WRAP; case DECR_WRAP: return GL_DECR_WRAP; diff --git a/source/core/stenciltest.cpp b/source/core/stenciltest.cpp index db1a5c0e..4c634977 100644 --- a/source/core/stenciltest.cpp +++ b/source/core/stenciltest.cpp @@ -38,10 +38,10 @@ void operator>>(const LexicalConverter &conv, StencilOp &op) op = SET_ZERO; else if(str=="REPLACE") op = REPLACE; - else if(str=="INCR") - op = INCR; - else if(str=="DECR") - op = DECR; + else if(str=="INCR_CLAMP") + op = INCR_CLAMP; + else if(str=="DECR_CLAMP") + op = DECR_CLAMP; else if(str=="INVERT") op = INVERT; else if(str=="INCR_WRAP") @@ -59,8 +59,8 @@ void operator<<(LexicalConverter &conv, StencilOp op) case KEEP: conv.result("KEEP"); break; case SET_ZERO: conv.result("SET_ZERO"); break; case REPLACE: conv.result("REPLACE"); break; - case INCR: conv.result("INCR"); break; - case DECR: conv.result("DECR"); break; + case INCR_CLAMP: conv.result("INCR_CLAMP"); break; + case DECR_CLAMP: conv.result("DECR_CLAMP"); break; case INVERT: conv.result("INVERT"); break; case INCR_WRAP: conv.result("INCR_WRAP"); break; case DECR_WRAP: conv.result("DECR_WRAP"); break; diff --git a/source/core/stenciltest.h b/source/core/stenciltest.h index 47e7a627..c6a385d3 100644 --- a/source/core/stenciltest.h +++ b/source/core/stenciltest.h @@ -13,8 +13,8 @@ enum StencilOp KEEP, SET_ZERO, REPLACE, - INCR, - DECR, + INCR_CLAMP, + DECR_CLAMP, INVERT, INCR_WRAP, DECR_WRAP -- 2.43.0