install Ogre 1.8
install MyGui
install Bullet 2.80
cmake-gui (point to source folder, Configure, Generate)
make (in the source/build folder)
===
Hello! I found this project yesterday, and as I have played Morrowind long ago, and saw the progress in recreating it on YouTube, I decided to give it a try. Also the idea of using Ogre and Bullet appeals to me very much, having such a big and complete world to work on would be just great!
So, I first tried the 0.14 release, and found some problems with compiling. After some searching I managed to get my hands on the Git repository, cloned it and tried that. Unfortunately there seemd to be the same issues there. These are the changes I had to make to compile:
Code: Select all
diff --git a/apps/openmw/mwrender/water.cpp b/apps/openmw/mwrender/water.cpp
index c81f23f..f30a08c 100644
--- a/apps/openmw/mwrender/water.cpp
+++ b/apps/openmw/mwrender/water.cpp
@@ -275,13 +275,13 @@ void Water::createMaterial()
TexturePtr colorTexture = compositor->getTextureInstance("mrt_output", 0);
TextureUnitState* tus = mMaterial->getTechnique(0)->getPass(0)->getTextureUnitState("refractionMap");
- if (tus != 0)
- tus->setTexture(colorTexture);
+// if (tus != 0)
+// tus->setTexture(colorTexture);
TexturePtr depthTexture = compositor->getTextureInstance("mrt_output", 1);
tus = mMaterial->getTechnique(0)->getPass(0)->getTextureUnitState("depthMap");
- if (tus != 0)
- tus->setTexture(depthTexture);
+// if (tus != 0)
+// tus->setTexture(depthTexture);
}
}
diff --git a/components/bsa/bsa_archive.cpp b/components/bsa/bsa_archive.cpp
index fa197d9..872707b 100644
--- a/components/bsa/bsa_archive.cpp
+++ b/components/bsa/bsa_archive.cpp
@@ -307,7 +307,7 @@ return arc.exists(passed.c_str());
if(cexists(pattern))
{
FileInfo fi;
- fi.archive = this;
+ //fi.archive = this;
fi.filename = pattern;
// It apparently doesn't matter that we return bogus
// information
diff --git a/libs/openengine/bullet/BulletShapeLoader.cpp b/libs/openengine/bullet/BulletShapeLoader.cpp
index 59a414f..4593bad 100644
--- a/libs/openengine/bullet/BulletShapeLoader.cpp
+++ b/libs/openengine/bullet/BulletShapeLoader.cpp
@@ -63,17 +63,17 @@ size_t BulletShape::calculateSize() const
//=============================================================================================================
-template<> BulletShapeManager *Ogre::Singleton<BulletShapeManager>::msSingleton = 0;
+template<> BulletShapeManager *Ogre::Singleton<BulletShapeManager>::ms_Singleton = 0;
BulletShapeManager *BulletShapeManager::getSingletonPtr()
{
- return msSingleton;
+ return ms_Singleton;
}
BulletShapeManager &BulletShapeManager::getSingleton()
{
- assert(msSingleton);
- return(*msSingleton);
+ assert(ms_Singleton);
+ return(*ms_Singleton);
}
BulletShapeManager::BulletShapeManager()
diff --git a/libs/openengine/ogre/imagerotate.cpp b/libs/openengine/ogre/imagerotate.cpp
index 11fd5ee..ccc25b8 100644
--- a/libs/openengine/ogre/imagerotate.cpp
+++ b/libs/openengine/ogre/imagerotate.cpp
@@ -1,4 +1,5 @@
#include "imagerotate.hpp"
+#include "../OgreMaterialManager.h"
#include <OgreRoot.h>
#include <OgreSceneManager.h>
@@ -19,7 +20,7 @@ void ImageRotate::rotate(const std::string& sourceImage, const std::string& dest
SceneManager* sceneMgr = root->createSceneManager(ST_GENERIC);
Camera* camera = sceneMgr->createCamera("ImageRotateCamera");
- MaterialPtr material = MaterialManager::getSingleton().create("ImageRotateMaterial", ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME);
+ MaterialPtr material = MaterialManager::getSingletonPtr()->create("ImageRotateMaterial", ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME);
material->getTechnique(0)->getPass(0)->setLightingEnabled(false);
material->getTechnique(0)->getPass(0)->setDepthCheckEnabled(false);
TextureUnitState* tus = material->getTechnique(0)->getPass(0)->createTextureUnitState(sourceImage);
After those changes the source compiled, but I still have SegFaults at runtime, so tried to pinpoint them with gdb, here is what I have right now:
Code: Select all
diff --git a/apps/openmw/mwrender/renderingmanager.cpp b/apps/openmw/mwrender/renderingmanager.cpp
index a95a179..68a2acc 100644
--- a/apps/openmw/mwrender/renderingmanager.cpp
+++ b/apps/openmw/mwrender/renderingmanager.cpp
@@ -344,9 +344,18 @@ void RenderingManager::configureFog(const float density, const Ogre::ColourValue
mRendering.getViewport()->setBackgroundColour (colour);
CompositorInstance* inst = CompositorManager::getSingleton().getCompositorChain(mRendering.getViewport())->getCompositor("gbuffer");
- if (inst != 0)
- inst->getCompositor()->getTechnique(0)->getTargetPass(0)->getPass(0)->setClearColour(colour);
- if (mWater)
+ if (inst != 0) {
+ if (inst->getCompositor()->getTechnique(0)->getNumTargetPasses() == 0)
+ inst->getCompositor()->getTechnique(0)->createTargetPass();
+
+ CompositionTargetPass* tpass;
+ tpass = inst->getCompositor()->getTechnique(0)->getTargetPass(0);
+ if (tpass->getNumPasses() == 0)
+ tpass->createPass();
+
+ tpass->getPass(0)->setClearColour(colour);
+ }
+ if (mWater)
mWater->setViewportBackground(colour);
}
I'm fixing more as I go along, but I'm wondering if this is the right branch I'm trying to run? Is this the current code? Seems only a few days old in some places, but I read in the Development board that there is a more recent Ogre 1.8 branch in the works, which should I use?