diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2020-02-11 17:18:55 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2020-02-11 17:19:04 +0300 |
commit | 804e90b42d728ecb1073af8d0bae15a91b13a469 (patch) | |
tree | 309de25d99c92286b10c9d27e547fd43a69299c1 /source/blender/gpu/intern/gpu_batch.c | |
parent | 58cdab8b9759dd59b55895f2f76b9624addbb324 (diff) |
DRW: Color Management improvement
Reviewed By: brecht sergey jbakker
Differential Revision: http://developer.blender.org/D6729
Diffstat (limited to 'source/blender/gpu/intern/gpu_batch.c')
-rw-r--r-- | source/blender/gpu/intern/gpu_batch.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/gpu/intern/gpu_batch.c b/source/blender/gpu/intern/gpu_batch.c index 6b5d3053594..75989db9ecf 100644 --- a/source/blender/gpu/intern/gpu_batch.c +++ b/source/blender/gpu/intern/gpu_batch.c @@ -979,6 +979,17 @@ void GPU_batch_program_set_builtin(GPUBatch *batch, eGPUBuiltinShader shader_id) GPU_batch_program_set_builtin_with_config(batch, shader_id, GPU_SHADER_CFG_DEFAULT); } +/* Bind program bound to IMM to the batch. + * XXX Use this with much care. Drawing with the GPUBatch API is not compatible with IMM. + * DO NOT DRAW WITH THE BATCH BEFORE CALLING immUnbindProgram. */ +void GPU_batch_program_set_imm_shader(GPUBatch *batch) +{ + GLuint program; + GPUShaderInterface *interface; + immGetProgram(&program, &interface); + GPU_batch_program_set(batch, program, interface); +} + /** \} */ /* -------------------------------------------------------------------- */ |