[Bf-blender-cvs] [fa1fef50817] master: Cleanup: Correct comments for immediate mode buffer draw functions

Julian Eisel noreply at git.blender.org
Mon Jan 17 18:26:55 CET 2022


Commit: fa1fef50817783bf4e2ba72a3b26807d88090cdd
Author: Julian Eisel
Date:   Mon Jan 17 18:18:22 2022 +0100
Branches: master
https://developer.blender.org/rBfa1fef50817783bf4e2ba72a3b26807d88090cdd

Cleanup: Correct comments for immediate mode buffer draw functions

===================================================================

M	source/blender/editors/include/BIF_glutil.h
M	source/blender/editors/screen/glutil.c

===================================================================

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 <em>state->do_shader_unbind<em> 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;



More information about the Bf-blender-cvs mailing list