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:
authorCampbell Barton <ideasman42@gmail.com>2012-05-19 17:28:19 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-05-19 17:28:19 +0400
commitaf3e348430218e609c80d86c8dd418bed15e70e8 (patch)
treea93e0453c8fe47a954594060cc5bbda90214a7f3 /source/blender/editors/space_view3d/drawmesh.c
parent2f5173887e0c7f6ba19664f16b177e575d82a241 (diff)
code cleanup: use TRUE/FALSE rather then 1/0 for better readability, also replace do prefix with do_ for bool vars.
Diffstat (limited to 'source/blender/editors/space_view3d/drawmesh.c')
-rw-r--r--source/blender/editors/space_view3d/drawmesh.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/source/blender/editors/space_view3d/drawmesh.c b/source/blender/editors/space_view3d/drawmesh.c
index b5c44fd1a8c..de1d9f22667 100644
--- a/source/blender/editors/space_view3d/drawmesh.c
+++ b/source/blender/editors/space_view3d/drawmesh.c
@@ -233,7 +233,7 @@ static Material *give_current_material_or_def(Object *ob, int matnr)
static struct TextureDrawState {
Object *ob;
- int islit, istex;
+ int is_lit, is_tex;
int color_profile;
unsigned char obcol[4];
} Gtexdraw = {NULL, 0, 0, 0, {0, 0, 0, 0}};
@@ -263,12 +263,12 @@ static int set_draw_settings_cached(int clearcache, MTFace *texface, Material *m
c_has_texface = -1;
}
else {
- textured = gtexdraw.istex;
+ textured = gtexdraw.is_tex;
litob = gtexdraw.ob;
}
/* convert number of lights into boolean */
- if (gtexdraw.islit) lit = 1;
+ if (gtexdraw.is_lit) lit = 1;
if (ma) {
alphablend = ma->game.alpha_blend;
@@ -343,7 +343,7 @@ static int set_draw_settings_cached(int clearcache, MTFace *texface, Material *m
static void draw_textured_begin(Scene *scene, View3D *v3d, RegionView3D *rv3d, Object *ob)
{
unsigned char obcol[4];
- int istex, solidtex;
+ int is_tex, solidtex;
// XXX scene->obedit warning
@@ -351,27 +351,27 @@ static void draw_textured_begin(Scene *scene, View3D *v3d, RegionView3D *rv3d, O
* with face selection in weight paint is not lit. */
if ((v3d->drawtype <= OB_WIRE) && (ob->mode & (OB_MODE_VERTEX_PAINT | OB_MODE_WEIGHT_PAINT))) {
solidtex = FALSE;
- Gtexdraw.islit = 0;
+ Gtexdraw.is_lit = 0;
}
else if (v3d->drawtype == OB_SOLID || ((ob->mode & OB_MODE_EDIT) && v3d->drawtype != OB_TEXTURE)) {
/* draw with default lights in solid draw mode and edit mode */
solidtex = TRUE;
- Gtexdraw.islit = -1;
+ Gtexdraw.is_lit = -1;
}
else {
/* draw with lights in the scene otherwise */
solidtex = FALSE;
- Gtexdraw.islit = GPU_scene_object_lights(scene, ob, v3d->lay, rv3d->viewmat, !rv3d->is_persp);
+ Gtexdraw.is_lit = GPU_scene_object_lights(scene, ob, v3d->lay, rv3d->viewmat, !rv3d->is_persp);
}
rgba_float_to_uchar(obcol, ob->col);
glCullFace(GL_BACK); glEnable(GL_CULL_FACE);
- if (solidtex || v3d->drawtype == OB_TEXTURE) istex = 1;
- else istex = 0;
+ if (solidtex || v3d->drawtype == OB_TEXTURE) is_tex = 1;
+ else is_tex = 0;
Gtexdraw.ob = ob;
- Gtexdraw.istex = istex;
+ Gtexdraw.is_tex = is_tex;
Gtexdraw.color_profile = scene->r.color_mgt_flag & R_COLOR_MANAGEMENT;
memcpy(Gtexdraw.obcol, obcol, sizeof(obcol));
set_draw_settings_cached(1, NULL, NULL, Gtexdraw);