Commit: 3e7968c35f8eead4cb74146754d306afc25a3d62
Author: Campbell Barton
Date:   Fri Apr 21 18:43:54 2017 +1000
Branches: blender2.8
https://developer.blender.org/rB3e7968c35f8eead4cb74146754d306afc25a3d62

Draw Manager: don't assign bool from flags

Some MSVC versions don't support this.

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

M       source/blender/draw/engines/clay/clay.c
M       source/blender/draw/engines/eevee/eevee.c
M       source/blender/draw/intern/draw_view.c
M       source/blender/draw/modes/object_mode.c

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

diff --git a/source/blender/draw/engines/clay/clay.c 
b/source/blender/draw/engines/clay/clay.c
index 861204d3a34..14053c3d5ff 100644
--- a/source/blender/draw/engines/clay/clay.c
+++ b/source/blender/draw/engines/clay/clay.c
@@ -348,7 +348,7 @@ static void CLAY_engine_init(void *vedata)
                int ssao_samples = 32; /* XXX get from render settings */
                float invproj[4][4];
                float dfdyfacs[2];
-               bool is_persp = DRW_viewport_is_persp_get();
+               const bool is_persp = DRW_viewport_is_persp_get();
                /* view vectors for the corners of the view frustum. Can be 
used to recreate the world space position easily */
                float viewvecs[3][4] = {
                    {-1.0f, -1.0f, -1.0f, 1.0f},
diff --git a/source/blender/draw/engines/eevee/eevee.c 
b/source/blender/draw/engines/eevee/eevee.c
index e5b92095c6d..d60a85ddebb 100644
--- a/source/blender/draw/engines/eevee/eevee.c
+++ b/source/blender/draw/engines/eevee/eevee.c
@@ -439,7 +439,7 @@ static void EEVEE_cache_populate(void *vedata, Object *ob)
        struct Batch *geom = DRW_cache_object_surface_get(ob);
        if (geom) {
                IDProperty *ces_mode_ob = BKE_object_collection_engine_get(ob, 
COLLECTION_MODE_OBJECT, "");
-               bool do_cull = 
BKE_collection_engine_property_value_get_bool(ces_mode_ob, 
"show_backface_culling");
+               const bool do_cull = 
BKE_collection_engine_property_value_get_bool(ces_mode_ob, 
"show_backface_culling");
 
                /* Depth Prepass */
                DRW_shgroup_call_add((do_cull) ? stl->g_data->depth_shgrp_cull 
: stl->g_data->depth_shgrp, geom, ob->obmat);
diff --git a/source/blender/draw/intern/draw_view.c 
b/source/blender/draw/intern/draw_view.c
index b6a27c88a9e..4816b66220c 100644
--- a/source/blender/draw/intern/draw_view.c
+++ b/source/blender/draw/intern/draw_view.c
@@ -351,9 +351,9 @@ static void drawfloor(Scene *scene, View3D *v3d, const char 
**grid_unit)
 
                const bool show_floor = (v3d->gridflag & V3D_SHOW_FLOOR) && 
gridlines >= 1;
 
-               bool show_axis_x = v3d->gridflag & V3D_SHOW_X;
-               bool show_axis_y = v3d->gridflag & V3D_SHOW_Y;
-               bool show_axis_z = v3d->gridflag & V3D_SHOW_Z;
+               bool show_axis_x = (v3d->gridflag & V3D_SHOW_X) != 0;
+               bool show_axis_y = (v3d->gridflag & V3D_SHOW_Y) != 0;
+               bool show_axis_z = (v3d->gridflag & V3D_SHOW_Z) != 0;
 
                unsigned char col_grid[3], col_axis[3];
 
diff --git a/source/blender/draw/modes/object_mode.c 
b/source/blender/draw/modes/object_mode.c
index 9887d7f115d..739bbe50439 100644
--- a/source/blender/draw/modes/object_mode.c
+++ b/source/blender/draw/modes/object_mode.c
@@ -259,10 +259,10 @@ static void OBJECT_engine_init(void *vedata)
                float grid_scale = ED_view3d_grid_scale(scene, v3d, NULL);
                float grid_res, offs;
 
-               const bool show_axis_x = v3d->gridflag & V3D_SHOW_X;
-               const bool show_axis_y = v3d->gridflag & V3D_SHOW_Y;
-               const bool show_axis_z = v3d->gridflag & V3D_SHOW_Z;
-               const bool show_floor = (v3d->gridflag & V3D_SHOW_FLOOR);
+               const bool show_axis_x = (v3d->gridflag & V3D_SHOW_X) != 0;
+               const bool show_axis_y = (v3d->gridflag & V3D_SHOW_Y) != 0;
+               const bool show_axis_z = (v3d->gridflag & V3D_SHOW_Z) != 0;
+               const bool show_floor = (v3d->gridflag & V3D_SHOW_FLOOR) != 0;
 
                DRW_viewport_matrix_get(winmat, DRW_MAT_WIN);
                DRW_viewport_matrix_get(viewmat, DRW_MAT_VIEW);

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to