summaryrefslogtreecommitdiff
path: root/dev-games/ogre/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-games/ogre/files
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-games/ogre/files')
-rw-r--r--dev-games/ogre/files/ogre-1.9.0-gcc52.patch63
-rw-r--r--dev-games/ogre/files/ogre-1.9.0-remove_media_path_to_bindir.patch13
-rw-r--r--dev-games/ogre/files/ogre-1.9.0-remove_resource_path_to_bindir.patch14
-rw-r--r--dev-games/ogre/files/ogre-1.9.0-samples.patch13
4 files changed, 103 insertions, 0 deletions
diff --git a/dev-games/ogre/files/ogre-1.9.0-gcc52.patch b/dev-games/ogre/files/ogre-1.9.0-gcc52.patch
new file mode 100644
index 000000000000..030368de29e3
--- /dev/null
+++ b/dev-games/ogre/files/ogre-1.9.0-gcc52.patch
@@ -0,0 +1,63 @@
+--- a/OgreMain/include/OgreProgressiveMeshGenerator.h
++++ b/OgreMain/include/OgreProgressiveMeshGenerator.h
+@@ -215,7 +215,40 @@
+ void tuneContainerSize();
+ void addVertexData(VertexData* vertexData, bool useSharedVertexLookup);
+ template<typename IndexType>
+- void addIndexDataImpl(IndexType* iPos, const IndexType* iEnd, VertexLookupList& lookup, unsigned short submeshID);
++ void addIndexDataImpl(IndexType* iPos, const IndexType* iEnd, VertexLookupList& lookup, unsigned short submeshID)
++ {
++
++ // Loop through all triangles and connect them to the vertices.
++ for (; iPos < iEnd; iPos += 3) {
++ // It should never reallocate or every pointer will be invalid.
++ OgreAssert(mTriangleList.capacity() > mTriangleList.size(), "");
++ mTriangleList.push_back(PMTriangle());
++ PMTriangle* tri = &mTriangleList.back();
++ tri->isRemoved = false;
++ tri->submeshID = submeshID;
++ for (int i = 0; i < 3; i++) {
++ // Invalid index: Index is bigger then vertex buffer size.
++ OgreAssert(iPos[i] < lookup.size(), "");
++ tri->vertexID[i] = iPos[i];
++ tri->vertex[i] = lookup[iPos[i]];
++ }
++ if (tri->isMalformed()) {
++#if OGRE_DEBUG_MODE
++ stringstream str;
++ str << "In " << mMeshName << " malformed triangle found with ID: " << getTriangleID(tri) << ". " <<
++ std::endl;
++ printTriangle(tri, str);
++ str << "It will be excluded from LOD level calculations.";
++ LogManager::getSingleton().stream() << str.str();
++#endif
++ tri->isRemoved = true;
++ mIndexBufferInfoList[tri->submeshID].indexCount -= 3;
++ continue;
++ }
++ tri->computeNormal();
++ addTriangleToEdges(tri);
++ }
++ }
+ void addIndexData(IndexData* indexData, bool useSharedVertexLookup, unsigned short submeshID);
+
+ void computeCosts();
+--- a/OgreMain/src/OgreProgressiveMeshGenerator.cpp
++++ b/OgreMain/src/OgreProgressiveMeshGenerator.cpp
+@@ -219,6 +219,8 @@
+ }
+ vbuf->unlock();
+ }
++/// Called from OgreQueuedProgressiveMeshGenerator.cpp, so it can not be defined in here.
++#if 0
+ template<typename IndexType>
+ void ProgressiveMeshGenerator::addIndexDataImpl(IndexType* iPos, const IndexType* iEnd,
+ VertexLookupList& lookup,
+@@ -256,6 +258,7 @@
+ addTriangleToEdges(tri);
+ }
+ }
++#endif // 0
+
+ void ProgressiveMeshGenerator::addIndexData(IndexData* indexData, bool useSharedVertexLookup, unsigned short submeshID)
+ {
diff --git a/dev-games/ogre/files/ogre-1.9.0-remove_media_path_to_bindir.patch b/dev-games/ogre/files/ogre-1.9.0-remove_media_path_to_bindir.patch
new file mode 100644
index 000000000000..bb2ca551dbe4
--- /dev/null
+++ b/dev-games/ogre/files/ogre-1.9.0-remove_media_path_to_bindir.patch
@@ -0,0 +1,13 @@
+--- a/CMake/InstallResources.cmake
++++ b/CMake/InstallResources.cmake
+@@ -178,10 +178,6 @@
+
+ # CREATE CONFIG FILES - BUILD DIR VERSIONS
+ if (NOT OGRE_BUILD_PLATFORM_APPLE_IOS)
+- set(OGRE_MEDIA_DIR_REL "${OGRE_SOURCE_DIR}/Samples/Media")
+- set(OGRE_MEDIA_DIR_DBG "${OGRE_SOURCE_DIR}/Samples/Media")
+- set(OGRE_TEST_MEDIA_DIR_REL "${OGRE_SOURCE_DIR}/Tests/Media")
+- set(OGRE_TEST_MEDIA_DIR_DBG "${OGRE_SOURCE_DIR}/Tests/Media")
+ else ()
+ # iOS needs to use relative paths in the config files
+ set(OGRE_MEDIA_DIR_REL "${OGRE_MEDIA_PATH}")
diff --git a/dev-games/ogre/files/ogre-1.9.0-remove_resource_path_to_bindir.patch b/dev-games/ogre/files/ogre-1.9.0-remove_resource_path_to_bindir.patch
new file mode 100644
index 000000000000..a26aa3f447bd
--- /dev/null
+++ b/dev-games/ogre/files/ogre-1.9.0-remove_resource_path_to_bindir.patch
@@ -0,0 +1,14 @@
+--- a/CMake/InstallResources.cmake
++++ b/CMake/InstallResources.cmake
+@@ -201,11 +201,6 @@
+ set(OGRE_PLUGIN_DIR_DBG "")
+ set(OGRE_SAMPLES_DIR_REL "")
+ set(OGRE_SAMPLES_DIR_DBG "")
+-elseif (UNIX)
+- set(OGRE_PLUGIN_DIR_REL "${OGRE_BINARY_DIR}/lib")
+- set(OGRE_PLUGIN_DIR_DBG "${OGRE_BINARY_DIR}/lib")
+- set(OGRE_SAMPLES_DIR_REL "${OGRE_BINARY_DIR}/lib")
+- set(OGRE_SAMPLES_DIR_DBG "${OGRE_BINARY_DIR}/lib")
+ endif ()
+
+ if (MSVC AND NOT NMAKE)
diff --git a/dev-games/ogre/files/ogre-1.9.0-samples.patch b/dev-games/ogre/files/ogre-1.9.0-samples.patch
new file mode 100644
index 000000000000..d7573d7662b0
--- /dev/null
+++ b/dev-games/ogre/files/ogre-1.9.0-samples.patch
@@ -0,0 +1,13 @@
+--- CMakeLists.txt.orig
++++ CMakeLists.txt
+@@ -519,7 +519,9 @@
+ endif ()
+
+ # Setup samples
+-add_subdirectory(Samples)
++if (OGRE_BUILD_SAMPLES)
++ add_subdirectory(Samples)
++endif ()
+
+ #Add android JNI binding
+ if(ANDROID)