Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Romanov <a.romanov@blend4web.com>2016-05-16 11:13:21 +0300
committerCampbell Barton <ideasman42@gmail.com>2016-06-09 22:38:17 +0300
commit6798809c7ec8388509f541a64359b3d107e6fd3f (patch)
treecab8d4b80cfca2974814af7598248edd6368b6e5 /source/blender/gpu/intern/gpu_draw.c
parentd733826708f9b562687b78424e5c0835cba8c3c9 (diff)
Flat shading for basic shader
The purpose of the patch is to replace deprecated glShadeModel. To decrease glShadeModel calls I've set GL_SMOOTH by default Reviewers: merwin, brecht Reviewed By: brecht Subscribers: blueprintrandom, Evgeny_Rodygin, AlexKowel, yurikovelenov Differential Revision: https://developer.blender.org/D1958
Diffstat (limited to 'source/blender/gpu/intern/gpu_draw.c')
-rw-r--r--source/blender/gpu/intern/gpu_draw.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/source/blender/gpu/intern/gpu_draw.c b/source/blender/gpu/intern/gpu_draw.c
index b6f977d12ab..f998dc9904e 100644
--- a/source/blender/gpu/intern/gpu_draw.c
+++ b/source/blender/gpu/intern/gpu_draw.c
@@ -1995,8 +1995,9 @@ int GPU_object_material_bind(int nr, void *attribs)
}
else {
/* or do fixed function opengl material */
- GPU_basic_shader_colors(GMS.matbuf[nr].diff,
- GMS.matbuf[nr].spec, GMS.matbuf[nr].hard, GMS.matbuf[nr].alpha);
+ GPU_basic_shader_colors(
+ GMS.matbuf[nr].diff,
+ GMS.matbuf[nr].spec, GMS.matbuf[nr].hard, GMS.matbuf[nr].alpha);
if (GMS.two_sided_lighting)
GPU_basic_shader_bind(GPU_SHADER_LIGHTING | GPU_SHADER_TWO_SIDED);
@@ -2290,8 +2291,6 @@ void GPU_state_init(void)
/* scaling matrices */
glEnable(GL_NORMALIZE);
- glShadeModel(GL_FLAT);
-
glDisable(GL_ALPHA_TEST);
glDisable(GL_BLEND);
glDisable(GL_DEPTH_TEST);