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:
authorSergey Sharybin <sergey.vfx@gmail.com>2017-05-11 16:57:19 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2017-05-11 17:00:47 +0300
commitd58310fe3702cd07deca46b3a1f9d0c63679fa83 (patch)
tree90b4e0de2c530f87c72e39791c5e18a2c71dc0dd /source/blender/modifiers
parentf129e48993df81c55e0b4ec68708588e4e178e7d (diff)
Support drawing of solid mode CDDM with core profile
Nothing terribly exciting, just a hackish implementation of solid mode CDDM drawing for cases when we are building with core profile. The goal is to be able to see SOMETHING with new OpenGL for thew guys who tests alembic and friends in blender2.8 branch. This is a temporary solution, the whole drawing will be reworked. Limited to hardcoded material and lighting. Selection outline color is also hardcoded because of lack of glColor() in the core profile. After this commit there is no big stoppers from stop worrying about legacy OpenGL, so we can go core profile as the only way for Blender. While some areas will become broken after that, we'd better just fix them after that and for now just focus on more important design work.
Diffstat (limited to 'source/blender/modifiers')
-rw-r--r--source/blender/modifiers/CMakeLists.txt3
-rw-r--r--source/blender/modifiers/intern/MOD_subsurf.c5
2 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/modifiers/CMakeLists.txt b/source/blender/modifiers/CMakeLists.txt
index 15a7ea5d644..d6a7b94505f 100644
--- a/source/blender/modifiers/CMakeLists.txt
+++ b/source/blender/modifiers/CMakeLists.txt
@@ -158,4 +158,7 @@ if(WITH_OPENSUBDIV)
add_definitions(-DWITH_OPENSUBDIV)
endif()
+# So we can have special tricks in modifier system.
+add_definitions(${GL_DEFINITIONS})
+
blender_add_lib(bf_modifiers "${SRC}" "${INC}" "${INC_SYS}")
diff --git a/source/blender/modifiers/intern/MOD_subsurf.c b/source/blender/modifiers/intern/MOD_subsurf.c
index bfe8ababf81..a23026c61da 100644
--- a/source/blender/modifiers/intern/MOD_subsurf.c
+++ b/source/blender/modifiers/intern/MOD_subsurf.c
@@ -148,7 +148,10 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
result = subsurf_make_derived_from_derived(derivedData, smd, NULL, subsurf_flags);
result->cd_flag = derivedData->cd_flag;
- if (do_cddm_convert) {
+#ifndef WITH_GL_PROFILE_CORE
+ if (do_cddm_convert)
+#endif
+ {
DerivedMesh *cddm = CDDM_copy(result);
result->release(result);
result = cddm;