[Bf-blender-cvs] [c3034af] blender2.8: OpenGL: simplify basic_shader_bind
Mike Erwin
noreply at git.blender.org
Sat Sep 17 13:34:30 CEST 2016
Commit: c3034afa586e3c5009f852e42c6a46000daa2551
Author: Mike Erwin
Date: Fri Sep 16 18:05:00 2016 +0200
Branches: blender2.8
https://developer.blender.org/rBc3034afa586e3c5009f852e42c6a46000daa2551
OpenGL: simplify basic_shader_bind
No need to enable/disable texturing with GLSL, just use textures in the fragment shader.
===================================================================
M source/blender/gpu/intern/gpu_basic_shader.c
===================================================================
diff --git a/source/blender/gpu/intern/gpu_basic_shader.c b/source/blender/gpu/intern/gpu_basic_shader.c
index a2b8923..c1b9d9a 100644
--- a/source/blender/gpu/intern/gpu_basic_shader.c
+++ b/source/blender/gpu/intern/gpu_basic_shader.c
@@ -422,23 +422,6 @@ void GPU_basic_shader_bind(int options)
{
if (USE_GLSL) {
if (options) {
- const int bound_options = GPU_MATERIAL_STATE.bound_options;
-
- /* texture options need to be set for basic shader too */
- if (options & GPU_SHADER_TEXTURE_2D) {
- glEnable(GL_TEXTURE_2D);
- }
- else if (bound_options & GPU_SHADER_TEXTURE_2D) {
- glDisable(GL_TEXTURE_2D);
- }
-
- if (options & GPU_SHADER_TEXTURE_RECT) {
- glEnable(GL_TEXTURE_RECTANGLE);
- }
- else if (bound_options & GPU_SHADER_TEXTURE_RECT) {
- glDisable(GL_TEXTURE_RECTANGLE);
- }
-
GPUShader *shader = gpu_basic_shader(options);
if (shader) {
More information about the Bf-blender-cvs
mailing list