[Bf-blender-cvs] [13345f1] soc-2013-paint: Use operand for masking. Corrects loading a file with masking not showing the color.

Antony Riakiotakis noreply at git.blender.org
Sat May 10 16:23:00 CEST 2014


Commit: 13345f18c191539353107b4c58d082c2e5c97bc9
Author: Antony Riakiotakis
Date:   Sat May 10 17:22:49 2014 +0300
https://developer.blender.org/rB13345f18c191539353107b4c58d082c2e5c97bc9

Use operand for masking. Corrects loading a file with masking not
showing the color.

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

M	source/blender/editors/space_view3d/drawmesh.c

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

diff --git a/source/blender/editors/space_view3d/drawmesh.c b/source/blender/editors/space_view3d/drawmesh.c
index d2c6b42..b79a60f 100644
--- a/source/blender/editors/space_view3d/drawmesh.c
+++ b/source/blender/editors/space_view3d/drawmesh.c
@@ -389,7 +389,7 @@ static void draw_textured_begin(Scene *scene, View3D *v3d, RegionView3D *rv3d, O
 	/* load the stencil texture here */
 	if ((ob->mode == OB_MODE_TEXTURE_PAINT) && (Gtexdraw.stencil != NULL)) {
 		glActiveTexture(GL_TEXTURE1);
-		if (GPU_verify_image(Gtexdraw.stencil, NULL, 0, 1, 0, false)) {
+		if (GPU_verify_image(Gtexdraw.stencil, NULL, false, false, false, false)) {
 			glEnable(GL_TEXTURE_2D);
 			glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE);
 			glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB, GL_INTERPOLATE);
@@ -401,6 +401,9 @@ static void draw_textured_begin(Scene *scene, View3D *v3d, RegionView3D *rv3d, O
 			if (!Gtexdraw.stencil_invert) {
 				glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND2_RGB, GL_ONE_MINUS_SRC_COLOR);
 			}
+			else {
+				glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND2_RGB, GL_SRC_COLOR);
+			}
 		}
 		glActiveTexture(GL_TEXTURE0);
 	}




More information about the Bf-blender-cvs mailing list