Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37761045
en ru br
Репозитории ALT
S:13.5.1-alt1
5.1: 1.6.4-alt1
www.altlinux.org/Changes

Группа :: Система/Библиотеки
Пакет: ogre

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: ogre-1.9.0-alt-changes.patch
Скачать


 CMake/Packages/FindGLSLOptimizer.cmake          |  2 +-
 OgreMain/include/OgreProgressiveMeshGenerator.h | 40 ++++++++++++-
 OgreMain/src/OgreProgressiveMeshGenerator.cpp   | 38 ------------
 OgreMaterialUpgrade.1                           | 40 +++++++++++++
 OgreMeshUpgrade.1                               | 48 +++++++++++++++
 OgreXMLConverter.1                              | 77 +++++++++++++++++++++++++
 samples.cfg                                     | 37 ++++++++++++
 7 files changed, 241 insertions(+), 41 deletions(-)
diff --git a/CMake/Packages/FindGLSLOptimizer.cmake b/CMake/Packages/FindGLSLOptimizer.cmake
index dd4b179c..70b54383 100644
--- a/CMake/Packages/FindGLSLOptimizer.cmake
+++ b/CMake/Packages/FindGLSLOptimizer.cmake
@@ -29,7 +29,7 @@ clear_if_changed(GLSL_Optimizer_PREFIX_PATH
   GLSL_Optimizer_INCLUDE_DIR
 )
 
-set(GLSL_Optimizer_LIBRARY_NAMES mesaglsl2 glsl_optimizer)
+set(GLSL_Optimizer_LIBRARY_NAMES mesa glsl_optimizer)
 get_debug_names(GLSL_Optimizer_LIBRARY_NAMES)
 
 use_pkgconfig(GLSL_Optimizer_PKGC GLSL_Optimizer)
diff --git a/OgreMain/include/OgreProgressiveMeshGenerator.h b/OgreMain/include/OgreProgressiveMeshGenerator.h
index b3f1af34..fe023a90 100644
--- a/OgreMain/include/OgreProgressiveMeshGenerator.h
+++ b/OgreMain/include/OgreProgressiveMeshGenerator.h
@@ -34,6 +34,7 @@
 #include "OgreSmallVector.h"
 #include "OgreMesh.h"
 #include "OgreLodConfig.h"
+#include "OgreLogManager.h"
 
 namespace Ogre
 {
@@ -214,9 +215,44 @@ protected:
 	size_t calcLodVertexCount(const LodLevel& lodConfig);
 	void tuneContainerSize();
 	void addVertexData(VertexData* vertexData, bool useSharedVertexLookup);
-	template<typename IndexType>
-	void addIndexDataImpl(IndexType* iPos, const IndexType* iEnd, VertexLookupList& lookup, unsigned short submeshID);
 	void addIndexData(IndexData* indexData, bool useSharedVertexLookup, unsigned short submeshID);
+    template<typename IndexType>
+    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 computeCosts();
 	bool isBorderVertex(const PMVertex* vertex) const;
diff --git a/OgreMain/src/OgreProgressiveMeshGenerator.cpp b/OgreMain/src/OgreProgressiveMeshGenerator.cpp
index b0aa854d..67518179 100644
--- a/OgreMain/src/OgreProgressiveMeshGenerator.cpp
+++ b/OgreMain/src/OgreProgressiveMeshGenerator.cpp
@@ -45,7 +45,6 @@
 #include "OgreSubMesh.h"
 #include "OgreMesh.h"
 #include "OgreLodStrategy.h"
-#include "OgreLogManager.h"
 #include "OgrePixelCountLodStrategy.h"
 
 namespace Ogre
@@ -219,43 +218,6 @@ void ProgressiveMeshGenerator::addVertexData(VertexData* vertexData, bool useSha
 	}
 	vbuf->unlock();
 }
-template<typename IndexType>
-void ProgressiveMeshGenerator::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 ProgressiveMeshGenerator::addIndexData(IndexData* indexData, bool useSharedVertexLookup, unsigned short submeshID)
 {
diff --git a/OgreMaterialUpgrade.1 b/OgreMaterialUpgrade.1
new file mode 100644
index 00000000..493d23f3
--- /dev/null
+++ b/OgreMaterialUpgrade.1
@@ -0,0 +1,40 @@
+.\"                                      Hey, EMACS: -*- nroff -*-
+.\" First parameter, NAME, should be all caps
+.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
+.\" other parameters are allowed: see man(7), man(1)
+.TH OGREMATERIALUPGRADE 1 "Nov 17, 2004"
+.\" Please adjust this date whenever revising the manpage.
+.\"
+.\" Some roff macros, for reference:
+.\" .nh        disable hyphenation
+.\" .hy        enable hyphenation
+.\" .ad l      left justify
+.\" .ad b      justify to both left and right margins
+.\" .nf        disable filling
+.\" .fi        enable filling
+.\" .br        insert line break
+.\" .sp <n>    insert n+1 empty lines
+.\" for manpage-specific macros, see man(7)
+.SH NAME
+OgreMaterialUpgrade \- upgrades .material files to the latest version
+.SH SYNOPSIS
+.B OgreMaterialUpgrade
+.RI sourcefile\ [destfile]
+
+.br
+.SH DESCRIPTION
+\fBOgreMaterialUpgrade\fP upgrades an Ogre .material definition to the latest version.
+.SH OPTIONS
+A summary of options is included below.
+.TP
+.B sourcefile
+Name of the file to convert
+
+.TP
+.B destfile
+Optional name of file to write to. If you don't specify this OGRE
+overwrites the existing file.
+
+.SH AUTHOR
+This manual page was written by Moritz Muehlenhoff <jmm@inutil.org>
+for the Debian GNU/Linux system, but may be used by others.
diff --git a/OgreMeshUpgrade.1 b/OgreMeshUpgrade.1
new file mode 100644
index 00000000..f032bbdc
--- /dev/null
+++ b/OgreMeshUpgrade.1
@@ -0,0 +1,48 @@
+.\"                                      Hey, EMACS: -*- nroff -*-
+.\" First parameter, NAME, should be all caps
+.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
+.\" other parameters are allowed: see man(7), man(1)
+.TH OGREMESHUPGRADE 1 "Nov 17, 2004"
+.\" Please adjust this date whenever revising the manpage.
+.\"
+.\" Some roff macros, for reference:
+.\" .nh        disable hyphenation
+.\" .hy        enable hyphenation
+.\" .ad l      left justify
+.\" .ad b      justify to both left and right margins
+.\" .nf        disable filling
+.\" .fi        enable filling
+.\" .br        insert line break
+.\" .sp <n>    insert n+1 empty lines
+.\" for manpage-specific macros, see man(7)
+.SH NAME
+OgreMeshUpgrade \- upgrades .mesh files to the latest version
+.SH SYNOPSIS
+.B OgreMeshUpgrade
+.RI [-e]\ [-t]\ sourcefile\ [destfile]
+
+.br
+.SH DESCRIPTION
+\fBOgreMeshUpgrade\fP upgrades an Ogre .mesh definition to the latest version.
+.SH OPTIONS
+A summary of options is included below.
+.TP
+.B \-e
+DON'T generate edge lists (for stencil shadows)
+
+.TP
+.B \-t
+Generate tangents (for normal mapping)
+
+.TP
+.B sourcefile
+Name of the file to convert
+
+.TP
+.B destfile
+Optional name of file to write to. If you don't specify this OGRE
+overwrites the existing file.
+
+.SH AUTHOR
+This manual page was written by Moritz Muehlenhoff <jmm@inutil.org>
+for the Debian GNU/Linux system, but may be used by others.
diff --git a/OgreXMLConverter.1 b/OgreXMLConverter.1
new file mode 100644
index 00000000..7cf06257
--- /dev/null
+++ b/OgreXMLConverter.1
@@ -0,0 +1,77 @@
+.\"                                      Hey, EMACS: -*- nroff -*-
+.\" First parameter, NAME, should be all caps
+.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
+.\" other parameters are allowed: see man(7), man(1)
+.TH OGREXMLCONVERTER 1 "Nov 17, 2004"
+.\" Please adjust this date whenever revising the manpage.
+.\"
+.\" Some roff macros, for reference:
+.\" .nh        disable hyphenation
+.\" .hy        enable hyphenation
+.\" .ad l      left justify
+.\" .ad b      justify to both left and right margins
+.\" .nf        disable filling
+.\" .fi        enable filling
+.\" .br        insert line break
+.\" .sp <n>    insert n+1 empty lines
+.\" for manpage-specific macros, see man(7)
+.SH NAME
+OgreXMLConverter \- converts data between XML and Ogre binary formats
+.SH SYNOPSIS
+.B OgreXMLConverter
+.RI [-i]\ [-e]\ [-l\ lodlevels]\ [-d\ loddist]\ [[-p\ lodpercent][-f\ lodnumtris]]\ sourcefile\ [destfile]
+
+.br
+.SH DESCRIPTION
+\fBOgreXMLConverter\fP converts data between XML and Ogre binary formats.
+.SH OPTIONS
+A summary of options is included below.
+.TP
+.B \-i
+Interactive mode - prompt for options
+
+.TP
+.B \-e
+DON'T generate edge lists (for stencil shadows)
+
+.TP
+.B \-r
+DON'T reorganise vertex buffers to OGRE recommended format
+
+.TP
+.B \-t
+Generate tangents (for normal mapping)
+
+.TP
+The following options are only applicable when converting XML to Mesh:
+
+.TP
+.B \-l lodlevels
+Number of LOD levels
+
+.TP
+.B \-d loddist
+Distance increment to reduce LOD
+
+.TP
+.B \-p lodpercent
+Percentage triangle reduction amount per LOD
+
+.TP
+.B \-f lodnumtris
+Fixed vertex reduction per LOD
+
+.TP
+.B sourcefile
+Name of the file to convert
+
+.TP
+.B destfile
+Optional name of file to write to. If you don't specify this OGRE
+works it out through the extension and the XML contents if the source
+is XML. For example test.mesh becomes test.xml, test.xml becomes
+test.mesh if the XML document root is <mesh> etc.
+
+.SH AUTHOR
+This manual page was written by Moritz Muehlenhoff <jmm@inutil.org>
+for the Debian GNU/Linux system, but may be used by others.
diff --git a/samples.cfg b/samples.cfg
new file mode 100644
index 00000000..907b4249
--- /dev/null
+++ b/samples.cfg
@@ -0,0 +1,37 @@
+SampleFolder=/usr/lib/OGRE/Samples
+SamplePlugin=Sample_BezierPatch
+SamplePlugin=Sample_BSP
+SamplePlugin=Sample_CameraTrack
+#SamplePlugin=Sample_CelShading
+#SamplePlugin=Sample_Character
+SamplePlugin=Sample_Compositor
+SamplePlugin=Sample_CubeMapping
+#SamplePlugin=Sample_DeferredShading
+SamplePlugin=Sample_Dot3Bump
+#SamplePlugin=Sample_DynTex
+#SamplePlugin=Sample_DualQuaternion
+SamplePlugin=Sample_FacialAnimation
+#SamplePlugin=Sample_Fresnel
+SamplePlugin=Sample_Grass
+SamplePlugin=Sample_Instancing
+SamplePlugin=Sample_Isosurf
+SamplePlugin=Sample_Lighting
+SamplePlugin=Sample_NewInstancing
+SamplePlugin=Sample_Ocean
+SamplePlugin=Sample_ParticleGS
+SamplePlugin=Sample_ParticleFX
+#SamplePlugin=Sample_ShaderSystem
+#SamplePlugin=Sample_Shadows
+SamplePlugin=Sample_SkeletalAnimation
+SamplePlugin=Sample_SkyBox
+SamplePlugin=Sample_SkyDome
+SamplePlugin=Sample_SkyPlane
+SamplePlugin=Sample_Smoke
+SamplePlugin=Sample_SphereMapping
+SamplePlugin=Sample_SSAO
+SamplePlugin=Sample_Terrain
+#SamplePlugin=Sample_TextureArray
+#SamplePlugin=Sample_TextureFX
+SamplePlugin=Sample_Transparency
+SamplePlugin=Sample_VolumeTex
+SamplePlugin=Sample_Water
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin