diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2020-08-16 16:33:05 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2020-08-18 22:30:10 +0300 |
commit | 10558d6973be8fc461a4b8aad734ba0881d18e85 (patch) | |
tree | 27b0183af1254e75561c7d3363305b05b3a82283 /source/blender/gpu | |
parent | 969bcf0793dca0e75bf42998aba92b1abd90ec23 (diff) |
Cleanup: GPUState: remove use of GPU_blend_set_func
Diffstat (limited to 'source/blender/gpu')
-rw-r--r-- | source/blender/gpu/GPU_state.h | 10 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_state.cc | 25 |
2 files changed, 0 insertions, 35 deletions
diff --git a/source/blender/gpu/GPU_state.h b/source/blender/gpu/GPU_state.h index cb580adf23a..94dd2f18927 100644 --- a/source/blender/gpu/GPU_state.h +++ b/source/blender/gpu/GPU_state.h @@ -88,15 +88,6 @@ typedef enum eGPUStencilOp { GPU_STENCIL_OP_COUNT_DEPTH_FAIL, } eGPUStencilOp; -/* These map directly to the GL_ blend functions, to minimize API add as needed*/ -typedef enum eGPUBlendFunction { - GPU_ONE, - GPU_SRC_ALPHA, - GPU_ONE_MINUS_SRC_ALPHA, - GPU_DST_COLOR, - GPU_ZERO, -} eGPUBlendFunction; - typedef enum eGPUFaceCullTest { GPU_CULL_NONE = 0, /* Culling disabled. */ GPU_CULL_FRONT, @@ -115,7 +106,6 @@ typedef enum eGPUProvokingVertex { void GPU_state_init(void); void GPU_blend(bool enable); -void GPU_blend_set_func(eGPUBlendFunction sfactor, eGPUBlendFunction dfactor); void GPU_blend_set_func_separate(eGPUBlend blend); void GPU_face_culling(eGPUFaceCullTest culling); void GPU_front_facing(bool invert); diff --git a/source/blender/gpu/intern/gpu_state.cc b/source/blender/gpu/intern/gpu_state.cc index be4450193f5..c670e034585 100644 --- a/source/blender/gpu/intern/gpu_state.cc +++ b/source/blender/gpu/intern/gpu_state.cc @@ -40,12 +40,6 @@ using namespace blender::gpu; -// /* This should replace GPU_blend, GPU_blend_set_func and GPU_blend_set_func_separate. */ -// void GPU_blend_set(eGPUBlend blend) -// { -// GLStateStack::set_blend(blend); -// } - void GPU_blend(bool enable) { if (enable) { @@ -56,25 +50,6 @@ void GPU_blend(bool enable) } } -void GPU_blend_set_func(eGPUBlendFunction sfactor, eGPUBlendFunction dfactor) -{ - if (sfactor == GPU_ONE && dfactor == GPU_ONE) { - GLStateStack::set_blend(GPU_BLEND_ADDITIVE); - } - else if (sfactor == GPU_ONE && dfactor == GPU_ONE_MINUS_SRC_ALPHA) { - GLStateStack::set_blend(GPU_BLEND_ALPHA_PREMULT); - } - else if (sfactor == GPU_SRC_ALPHA && dfactor == GPU_ONE_MINUS_SRC_ALPHA) { - GLStateStack::set_blend(GPU_BLEND_ALPHA); - } - else if (sfactor == GPU_DST_COLOR && dfactor == GPU_ZERO) { - GLStateStack::set_blend(GPU_BLEND_MULTIPLY); - } - else { - BLI_assert(0); - } -} - void GPU_blend_set_func_separate(eGPUBlend blend) { GLStateStack::set_blend(blend); |