[Bf-blender-cvs] [553d820b80c] blender2.8: Remove basic shader from paint cursor overlay

Sergey Sharybin noreply at git.blender.org
Wed Apr 19 17:29:26 CEST 2017


Commit: 553d820b80c2e41c21d11657faf8e7284450cadb
Author: Sergey Sharybin
Date:   Wed Apr 19 16:38:18 2017 +0200
Branches: blender2.8
https://developer.blender.org/rB553d820b80c2e41c21d11657faf8e7284450cadb

Remove basic shader from paint cursor overlay

Immediate mode built-in shader is used for this drawing already.
So there is no reason to try building basic shader which is not
supported in the core profile.

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

M	source/blender/editors/sculpt_paint/paint_cursor.c

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

diff --git a/source/blender/editors/sculpt_paint/paint_cursor.c b/source/blender/editors/sculpt_paint/paint_cursor.c
index e8e376b8a69..2094aeabfbc 100644
--- a/source/blender/editors/sculpt_paint/paint_cursor.c
+++ b/source/blender/editors/sculpt_paint/paint_cursor.c
@@ -61,7 +61,6 @@
 #include "GPU_immediate.h"
 #include "GPU_immediate_util.h"
 #include "GPU_matrix.h"
-#include "GPU_basic_shader.h"
 
 #include "UI_resources.h"
 
@@ -352,8 +351,6 @@ static int load_tex(Brush *br, ViewContext *vc, float zoom, bool col, bool prima
 		target->old_col = col;
 	}
 
-	GPU_basic_shader_bind(GPU_SHADER_TEXTURE_2D | GPU_SHADER_USE_COLOR);
-
 	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
 	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
 
@@ -470,8 +467,6 @@ static int load_tex_cursor(Brush *br, ViewContext *vc, float zoom)
 			MEM_freeN(buffer);
 	}
 
-	GPU_basic_shader_bind(GPU_SHADER_TEXTURE_2D | GPU_SHADER_USE_COLOR);
-
 	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
 	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
 
@@ -807,7 +802,6 @@ static void paint_draw_alpha_overlay(UnifiedPaintSettings *ups, Brush *brush,
 	}
 
 	gpuRestoreState(&attribs);
-	GPU_basic_shader_bind(GPU_SHADER_USE_COLOR);
 }




More information about the Bf-blender-cvs mailing list