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:
authorDalai Felinto <dfelinto@gmail.com>2017-05-01 16:37:27 +0300
committerDalai Felinto <dfelinto@gmail.com>2017-05-01 16:44:50 +0300
commit6ef497d401e5e7842d1e9d33e491672bb77d60e0 (patch)
treed9552dce6e986750d0dcca33519375b17dcb5450 /source/blender
parent22be057e376f87e49ea376c2306ba4d2b6207dd7 (diff)
WITH_CLAY_ENGINE: Should be used for CLAY only, not drawmanager
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/draw/intern/draw_manager.c17
-rw-r--r--source/blender/makesrna/intern/rna_scene.c2
2 files changed, 4 insertions, 15 deletions
diff --git a/source/blender/draw/intern/draw_manager.c b/source/blender/draw/intern/draw_manager.c
index ad2d241a224..97cd1102406 100644
--- a/source/blender/draw/intern/draw_manager.c
+++ b/source/blender/draw/intern/draw_manager.c
@@ -791,8 +791,6 @@ void DRW_shgroup_uniform_mat4(DRWShadingGroup *shgroup, const char *name, const
DRW_interface_uniform(shgroup, name, DRW_UNIFORM_MAT4, value, 16, 1, 0);
}
-#ifdef WITH_CLAY_ENGINE
-
/* Creates a VBO containing OGL primitives for all DRWCallDynamic */
static void shgroup_dynamic_batch(DRWShadingGroup *shgroup)
{
@@ -905,7 +903,6 @@ static void shgroup_dynamic_batch_from_calls(DRWShadingGroup *shgroup)
shgroup_dynamic_batch(shgroup);
}
}
-#endif /* WITH_CLAY_ENGINE */
/** \} */
@@ -944,7 +941,6 @@ void DRW_pass_free(DRWPass *pass)
/** \name Draw (DRW_draw)
* \{ */
-#ifdef WITH_CLAY_ENGINE
static void set_state(DRWState flag, const bool reset)
{
/* TODO Keep track of the state and only revert what is needed */
@@ -1353,15 +1349,6 @@ void DRW_state_reset(void)
set_state(state, true);
}
-#else /* !WITH_CLAY_ENGINE */
-
-void DRW_draw_pass(DRWPass *UNUSED(pass)) {}
-void DRW_draw_callbacks_pre_scene(void) {}
-void DRW_draw_callbacks_post_scene(void) {}
-void DRW_state_reset(void) {}
-
-#endif /* WITH_CLAY_ENGINE */
-
/** \} */
@@ -2435,6 +2422,7 @@ void DRW_engines_register(void)
{
#ifdef WITH_CLAY_ENGINE
RE_engines_register(NULL, &DRW_engine_viewport_clay_type);
+#endif
RE_engines_register(NULL, &DRW_engine_viewport_eevee_type);
DRW_engine_register(&draw_engine_object_type);
@@ -2451,7 +2439,6 @@ void DRW_engines_register(void)
DRW_engine_register(&draw_engine_particle_type);
DRW_engine_register(&draw_engine_pose_type);
DRW_engine_register(&draw_engine_sculpt_type);
-#endif
/* setup callbacks */
{
@@ -2479,7 +2466,6 @@ void DRW_engines_register(void)
extern struct GPUUniformBuffer *globals_ubo; /* draw_common.c */
void DRW_engines_free(void)
{
-#ifdef WITH_CLAY_ENGINE
DRW_shape_cache_free();
DrawEngineType *next;
@@ -2495,6 +2481,7 @@ void DRW_engines_free(void)
if (globals_ubo)
GPU_uniformbuffer_free(globals_ubo);
+#ifdef WITH_CLAY_ENGINE
BLI_remlink(&R_engines, &DRW_engine_viewport_clay_type);
#endif
}
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index 1691637ec03..559b2e611df 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -2465,6 +2465,7 @@ static void rna_LayerEngineSettings_##_ENGINE_##_##_NAME_##_set(PointerRNA *ptr,
RNA_LAYER_ENGINE_GET_SET(bool, EditMode, COLLECTION_MODE_EDIT, _NAME_)
/* clay engine */
+#ifdef WITH_CLAY_ENGINE
RNA_LAYER_ENGINE_CLAY_GET_SET_INT(matcap_icon)
RNA_LAYER_ENGINE_CLAY_GET_SET_FLOAT(matcap_rotation)
RNA_LAYER_ENGINE_CLAY_GET_SET_FLOAT(matcap_hue)
@@ -2474,6 +2475,7 @@ RNA_LAYER_ENGINE_CLAY_GET_SET_FLOAT(ssao_factor_cavity)
RNA_LAYER_ENGINE_CLAY_GET_SET_FLOAT(ssao_factor_edge)
RNA_LAYER_ENGINE_CLAY_GET_SET_FLOAT(ssao_distance)
RNA_LAYER_ENGINE_CLAY_GET_SET_FLOAT(ssao_attenuation)
+#endif /* WITH_CLAY_ENGINE */
/* object engine */
RNA_LAYER_MODE_OBJECT_GET_SET_BOOL(show_wire)