diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-02-26 01:27:45 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-02-26 01:27:45 +0400 |
commit | 72e1316dc4b607440430779d78a26a76a4527c4b (patch) | |
tree | 70dd28c09f303e1776da7290a8fefea4d153feaf /source/blender | |
parent | ed46c2344e93a39cdcf6bb51484a0e515bad4ac8 (diff) |
minor style edits
- use GL_TRUE/FALSE for glLightModeli
- use set for python checks against multiple string values.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/space_view3d/drawobject.c | 8 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_extensions.c | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index 2abfb9bac98..15278233552 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -3013,7 +3013,7 @@ static void draw_em_fancy(Scene *scene, View3D *v3d, RegionView3D *rv3d, else { /* 3 floats for position, * 3 for normal and times two because the faces may actually be quads instead of triangles */ - glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, me->flag & ME_TWOSIDED); + glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, (me->flag & ME_TWOSIDED) ? GL_TRUE : GL_FALSE); glEnable(GL_LIGHTING); glFrontFace((ob->transflag&OB_NEG_SCALE)?GL_CW:GL_CCW); @@ -3021,7 +3021,7 @@ static void draw_em_fancy(Scene *scene, View3D *v3d, RegionView3D *rv3d, glFrontFace(GL_CCW); glDisable(GL_LIGHTING); - glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, 0); + glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, GL_FALSE); } // Setup for drawing wire over, disable zbuffer @@ -3338,7 +3338,7 @@ static void draw_mesh_fancy(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D draw_mesh_object_outline(v3d, ob, dm); } - glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, me->flag & ME_TWOSIDED ); + glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, (me->flag & ME_TWOSIDED) ? GL_TRUE : GL_FALSE); glEnable(GL_LIGHTING); glFrontFace((ob->transflag&OB_NEG_SCALE)?GL_CW:GL_CCW); @@ -3366,7 +3366,7 @@ static void draw_mesh_fancy(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D glFrontFace(GL_CCW); glDisable(GL_LIGHTING); - glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, 0); + glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, GL_FALSE); if (base->flag & SELECT) { UI_ThemeColor(is_obact ? TH_ACTIVE : TH_SELECT); diff --git a/source/blender/gpu/intern/gpu_extensions.c b/source/blender/gpu/intern/gpu_extensions.c index 002563ada4b..dfbb243aa7a 100644 --- a/source/blender/gpu/intern/gpu_extensions.c +++ b/source/blender/gpu/intern/gpu_extensions.c @@ -181,7 +181,7 @@ void GPU_extensions_init(void) /* make sure double side isn't used by defautl and only getting enabled in places where it's * really needed to prevent different unexpected behaviors like with intel gme965 card (sergey) */ - glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, 0); + glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, GL_FALSE); GG.os = GPU_OS_UNIX; #ifdef _WIN32 |