From fa1fef50817783bf4e2ba72a3b26807d88090cdd Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Mon, 17 Jan 2022 18:18:22 +0100 Subject: Cleanup: Correct comments for immediate mode buffer draw functions --- source/blender/editors/include/BIF_glutil.h | 4 ++-- source/blender/editors/screen/glutil.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/source/blender/editors/include/BIF_glutil.h b/source/blender/editors/include/BIF_glutil.h index e8d5bc4c868..61dd0adc84d 100644 --- a/source/blender/editors/include/BIF_glutil.h +++ b/source/blender/editors/include/BIF_glutil.h @@ -148,8 +148,8 @@ void immDrawPixelsTexTiled_scaling(IMMDrawPixelsTexState *state, * * If color is NULL then use white by default * - * Be also aware that this function unbinds the shader when - * it's finished. + * Unless state->do_shader_unbind is explicitly set to `false`, the shader is unbound when + * finished. */ void immDrawPixelsTexTiled_scaling_clipping(IMMDrawPixelsTexState *state, float x, diff --git a/source/blender/editors/screen/glutil.c b/source/blender/editors/screen/glutil.c index 1c00040a894..0ddede017e2 100644 --- a/source/blender/editors/screen/glutil.c +++ b/source/blender/editors/screen/glutil.c @@ -64,7 +64,7 @@ IMMDrawPixelsTexState immDrawPixelsTexSetup(int builtin) state.shader = GPU_shader_get_builtin_shader(builtin); - /* Shader will be unbind by immUnbindProgram in immDrawPixelsTexScaled_clipping */ + /* Shader will be unbind by immUnbindProgram in a `immDrawPixelsTex` function. */ immBindBuiltinProgram(builtin); immUniform1i("image", 0); state.do_shader_unbind = true; -- cgit v1.2.3