[Bf-blender-cvs] [ebdff8c3b8b] blender2.8: OpenGL: simplify initial state

Mike Erwin noreply at git.blender.org
Mon Mar 27 07:50:33 CEST 2017


Commit: ebdff8c3b8b2d0c61c5419d2a71504fcc3cb5d5a
Author: Mike Erwin
Date:   Mon Mar 27 01:49:25 2017 -0400
Branches: blender2.8
https://developer.blender.org/rBebdff8c3b8b2d0c61c5419d2a71504fcc3cb5d5a

OpenGL: simplify initial state

Client vertex array state is deprecated, and these are the default values anyway.

No need to bind any basic shader. Let drawing code decide which shader it wants to use.

Part of T49165 (general OpenGL upgrade)

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

M	source/blender/gpu/intern/gpu_draw.c

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

diff --git a/source/blender/gpu/intern/gpu_draw.c b/source/blender/gpu/intern/gpu_draw.c
index f5d5af3f373..fb246aa802e 100644
--- a/source/blender/gpu/intern/gpu_draw.c
+++ b/source/blender/gpu/intern/gpu_draw.c
@@ -2277,12 +2277,6 @@ void GPU_state_init(void)
 	glDisable(GL_TEXTURE_2D);
 	glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
 
-	/* default disabled, enable should be local per function */
-	glDisableClientState(GL_VERTEX_ARRAY);
-	glDisableClientState(GL_NORMAL_ARRAY);
-	glDisableClientState(GL_COLOR_ARRAY);
-	glDisableClientState(GL_TEXTURE_COORD_ARRAY);
-
 	glDepthRange(0.0, 1.0);
 
 	glMatrixMode(GL_TEXTURE);
@@ -2294,8 +2288,6 @@ void GPU_state_init(void)
 	glDisable(GL_CULL_FACE);
 
 	gpu_multisample(false);
-
-	GPU_basic_shader_bind(GPU_SHADER_USE_COLOR);
 }
 
 void GPU_enable_program_point_size(void)




More information about the Bf-blender-cvs mailing list