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>2014-04-09 05:48:04 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-04-09 05:52:34 +0400
commit9de24c82bab8fc6f1b8810979ac492787d32a964 (patch)
tree3c2466ebd791a52859ce19ffee8ff5ed518a6061 /source/blender/gpu
parentb1f97a0cdb1bf6c7e0f80c6edb3182870625b9a6 (diff)
View3D: disable LOD when game engine is disabled or ifdef'd
Diffstat (limited to 'source/blender/gpu')
-rw-r--r--source/blender/gpu/CMakeLists.txt4
-rw-r--r--source/blender/gpu/SConscript2
-rw-r--r--source/blender/gpu/intern/gpu_draw.c8
3 files changed, 12 insertions, 2 deletions
diff --git a/source/blender/gpu/CMakeLists.txt b/source/blender/gpu/CMakeLists.txt
index 93c80c68f24..739deffa519 100644
--- a/source/blender/gpu/CMakeLists.txt
+++ b/source/blender/gpu/CMakeLists.txt
@@ -69,6 +69,10 @@ data_to_c_simple(shaders/gpu_shader_vertex.glsl SRC)
data_to_c_simple(shaders/gpu_shader_vsm_store_frag.glsl SRC)
data_to_c_simple(shaders/gpu_shader_vsm_store_vert.glsl SRC)
+if(WITH_GAMEENGINE)
+ add_definitions(-DWITH_GAMEENGINE)
+endif()
+
if(WITH_MOD_SMOKE)
add_definitions(-DWITH_SMOKE)
endif()
diff --git a/source/blender/gpu/SConscript b/source/blender/gpu/SConscript
index c1c3fa92cb1..e9320f08eff 100644
--- a/source/blender/gpu/SConscript
+++ b/source/blender/gpu/SConscript
@@ -49,6 +49,8 @@ incs = [
env['BF_OPENGL_INC'],
]
+if env['WITH_BF_GAMEENGINE']:
+ defs.append('WITH_GAMEENGINE')
if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc', 'win64-mingw'):
incs.append(env['BF_PTHREADS_INC'])
diff --git a/source/blender/gpu/intern/gpu_draw.c b/source/blender/gpu/intern/gpu_draw.c
index 99f98f713ce..c22c4fbcdf4 100644
--- a/source/blender/gpu/intern/gpu_draw.c
+++ b/source/blender/gpu/intern/gpu_draw.c
@@ -1403,8 +1403,12 @@ void GPU_begin_object_materials(View3D *v3d, RegionView3D *rv3d, Scene *scene, O
const bool new_shading_nodes = BKE_scene_use_new_shading_nodes(scene);
const bool use_matcap = (v3d->flag2 & V3D_SHOW_SOLID_MATCAP) != 0; /* assumes v3d->defmaterial->preview is set */
- ob = BKE_object_lod_matob_get(ob, scene);
-
+#ifdef WITH_GAMEENGINE
+ if (rv3d->rflag & RV3D_IS_GAME_ENGINE) {
+ ob = BKE_object_lod_matob_get(ob, scene);
+ }
+#endif
+
/* initialize state */
memset(&GMS, 0, sizeof(GMS));
GMS.lastmatnr = -1;