Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-07-02 05:30:55 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-07-02 05:34:27 +0300
commita9635c63842d47009cbb9b9de7ca8afa112254bf (patch)
tree2ed19a6e362515bcfbe323cae39329871dd46e69 /source/blender/gpu/intern
parent12788538496a6c63f876926f27a99cf8b0ad9c97 (diff)
Cleanup: rename set_inverted_drawing, move to GPU_state
Diffstat (limited to 'source/blender/gpu/intern')
-rw-r--r--source/blender/gpu/intern/gpu_state.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/gpu/intern/gpu_state.c b/source/blender/gpu/intern/gpu_state.c
index 7a27fea2f0d..caf97a620ab 100644
--- a/source/blender/gpu/intern/gpu_state.c
+++ b/source/blender/gpu/intern/gpu_state.c
@@ -175,3 +175,17 @@ void GPU_finish(void)
{
glFinish();
}
+
+void GPU_logic_op_invert_set(bool enable)
+{
+ if (enable) {
+ glLogicOp(GL_INVERT);
+ glEnable(GL_COLOR_LOGIC_OP);
+ glDisable(GL_DITHER);
+ }
+ else {
+ glLogicOp(GL_COPY);
+ glDisable(GL_COLOR_LOGIC_OP);
+ glEnable(GL_DITHER);
+ }
+}