Draw Manager: don't assign bool from flags
Some MSVC versions don't support this.
This commit is contained in:
@@ -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},
|
||||
|
@@ -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);
|
||||
|
@@ -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];
|
||||
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user