Browse Source

Hooking in C++ feature examples

Josh Engebretson 9 years ago
parent
commit
7949d5dbf9
3 changed files with 15 additions and 2 deletions
  1. 12 0
      CMakeLists.txt
  2. 2 1
      Source/Atomic/Graphics/Model.cpp
  3. 1 1
      Submodules/AtomicExamples

+ 12 - 0
CMakeLists.txt

@@ -74,3 +74,15 @@ if (ATOMIC_WEBVIEW)
 endif()
 endif()
 
 
 add_subdirectory(Source)
 add_subdirectory(Source)
+
+
+
+if (ATOMIC_DESKTOP AND ATOMIC_DEV_BUILD)
+
+    set (ATOMIC_CPLUSPLUS_EXAMPLES 1)
+
+    if (ATOMIC_CPLUSPLUS_EXAMPLES)
+        add_subdirectory(Submodules/AtomicExamples/FeatureExamples/CPlusPlus)
+    endif()
+
+endif()

+ 2 - 1
Source/Atomic/Graphics/Model.cpp

@@ -718,7 +718,8 @@ SharedPtr<Model> Model::Clone(const String& cloneName) const
         for (unsigned j = 0; j < geometries_[i].Size(); ++j)
         for (unsigned j = 0; j < geometries_[i].Size(); ++j)
         {
         {
             // ATOMIC BEGIN
             // ATOMIC BEGIN
-            ret->geometryNames_[i] = geometryNames_[i];
+            if (ret->geometryNames_.Size())
+                ret->geometryNames_[i] = geometryNames_[i];
             // ATOMIC END
             // ATOMIC END
 
 
             SharedPtr<Geometry> cloneGeometry;
             SharedPtr<Geometry> cloneGeometry;

+ 1 - 1
Submodules/AtomicExamples

@@ -1 +1 @@
-Subproject commit 99cf8f6c51ad2702899d44e236ae9765b562970d
+Subproject commit d5ae346b14e074365dce287f14d88f20853dcaf3