de-Windownizing and some build-fixes

actorid
Marc Zinnschlag 14 years ago
parent 33f22fd68b
commit 1e9dc4b435

@ -166,6 +166,19 @@ set(OENGINE_GUI
${LIBDIR}/openengine/gui/manager.cpp ${LIBDIR}/openengine/gui/manager.cpp
) )
set(OENGINE_BULLET
${LIBDIR}/openengine/bullet/btKinematicCharacterController.cpp
${LIBDIR}/openengine/bullet/btKinematicCharacterController.h
${LIBDIR}/openengine/bullet/BtOgre.cpp
${LIBDIR}/openengine/bullet/BtOgreExtras.h
${LIBDIR}/openengine/bullet/BtOgreGP.h
${LIBDIR}/openengine/bullet/BtOgrePG.h
${LIBDIR}/openengine/bullet/CMotionState.cpp
${LIBDIR}/openengine/bullet/CMotionState.h
${LIBDIR}/openengine/bullet/physic.cpp
${LIBDIR}/openengine/bullet/physic.hpp
)
# Sound setup # Sound setup
if (USE_AUDIERE) if (USE_AUDIERE)
set(MANGLE_SOUND_OUTPUT set(MANGLE_SOUND_OUTPUT
@ -206,7 +219,7 @@ set(OENGINE_SOUND
${LIBDIR}/mangle/sound/outputs/openal_out.cpp ${LIBDIR}/mangle/sound/outputs/openal_out.cpp
${MANGLE_SOUND_OUTPUT} ${MANGLE_SOUND_OUTPUT}
) )
set(OENGINE_ALL ${OENGINE_OGRE} ${OENGINE_GUI} ${OENGINE_SOUND}) set(OENGINE_ALL ${OENGINE_OGRE} ${OENGINE_GUI} ${OENGINE_SOUND} ${OENGINE_BULLET})
source_group(libs\\openengine FILES ${OENGINE_ALL}) source_group(libs\\openengine FILES ${OENGINE_ALL})
set(OPENMW_LIBS ${MANGLE_ALL} ${OENGINE_ALL}) set(OPENMW_LIBS ${MANGLE_ALL} ${OENGINE_ALL})

@ -3,7 +3,7 @@
#include <utility> #include <utility>
#include <openengine/ogre/renderer.hpp> #include <openengine/ogre/renderer.hpp>
#include <openengine\bullet\physic.hpp> #include <openengine/bullet/physic.hpp>
#include <vector> #include <vector>
#include <string> #include <string>

@ -14,7 +14,7 @@
#include "ptr.hpp" #include "ptr.hpp"
#include "globals.hpp" #include "globals.hpp"
#include "openengine\bullet\physic.hpp" #include <openengine/bullet/physic.hpp>
namespace Ogre namespace Ogre
{ {

@ -29,8 +29,8 @@
#include <OgreMesh.h> #include <OgreMesh.h>
#include <assert.h> #include <assert.h>
#include <string> #include <string>
#include <BulletCollision\CollisionShapes\btBvhTriangleMeshShape.h> #include <BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h>
#include <BulletCollision\CollisionShapes\btConvexTriangleMeshShape.h> #include <BulletCollision/CollisionShapes/btConvexTriangleMeshShape.h>
#include <btBulletDynamicsCommon.h> #include <btBulletDynamicsCommon.h>
#include <btBulletCollisionCommon.h> #include <btBulletCollisionCommon.h>
@ -77,8 +77,8 @@ protected:
public: public:
BulletShape(Ogre::ResourceManager *creator, const Ogre::String &name, BulletShape(Ogre::ResourceManager *creator, const Ogre::String &name,
Ogre::ResourceHandle handle, const Ogre::String &group, bool isManual = false, Ogre::ResourceHandle handle, const Ogre::String &group, bool isManual = false,
Ogre::ManualResourceLoader *loader = 0); Ogre::ManualResourceLoader *loader = 0);
virtual ~BulletShape(); virtual ~BulletShape();
@ -91,12 +91,12 @@ public:
/** /**
* *
*/ */
class BulletShapePtr : public Ogre::SharedPtr<BulletShape> class BulletShapePtr : public Ogre::SharedPtr<BulletShape>
{ {
public: public:
BulletShapePtr() : Ogre::SharedPtr<BulletShape>() {} BulletShapePtr() : Ogre::SharedPtr<BulletShape>() {}
explicit BulletShapePtr(BulletShape *rep) : Ogre::SharedPtr<BulletShape>(rep) {} explicit BulletShapePtr(BulletShape *rep) : Ogre::SharedPtr<BulletShape>(rep) {}
BulletShapePtr(const BulletShapePtr &r) : Ogre::SharedPtr<BulletShape>(r) {} BulletShapePtr(const BulletShapePtr &r) : Ogre::SharedPtr<BulletShape>(r) {}
BulletShapePtr(const Ogre::ResourcePtr &r) : Ogre::SharedPtr<BulletShape>() BulletShapePtr(const Ogre::ResourcePtr &r) : Ogre::SharedPtr<BulletShape>()
{ {
if( r.isNull() ) if( r.isNull() )
@ -136,7 +136,7 @@ public:
}; };
/** /**
*Hold any BulletShape that was created by the ManualBulletShapeLoader. *Hold any BulletShape that was created by the ManualBulletShapeLoader.
* *
*To get a bulletShape, you must load it first. *To get a bulletShape, you must load it first.
*First, create a manualBulletShapeLoader. Then call ManualBulletShapeManager->load(). This create an "empty" resource. *First, create a manualBulletShapeLoader. Then call ManualBulletShapeManager->load(). This create an "empty" resource.
@ -145,7 +145,7 @@ public:
*When you use the resource no more, just use BulletShapeManager->unload(). It won't completly delete the resource, but it will *When you use the resource no more, just use BulletShapeManager->unload(). It won't completly delete the resource, but it will
*"empty" it.This allow a better management of memory: when you are leaving a cell, just unload every useless shape. *"empty" it.This allow a better management of memory: when you are leaving a cell, just unload every useless shape.
* *
*Alternatively, you can call BulletShape->load() in order to actually load the resource. *Alternatively, you can call BulletShape->load() in order to actually load the resource.
*When you are finished with it, just call BulletShape->unload(). *When you are finished with it, just call BulletShape->unload().
* *
*IMO: prefere the first methode, i am not completly sure about the 2nd. *IMO: prefere the first methode, i am not completly sure about the 2nd.
@ -156,10 +156,10 @@ public:
class BulletShapeManager : public Ogre::ResourceManager, public Ogre::Singleton<BulletShapeManager> class BulletShapeManager : public Ogre::ResourceManager, public Ogre::Singleton<BulletShapeManager>
{ {
protected: protected:
// must implement this from ResourceManager's interface // must implement this from ResourceManager's interface
Ogre::Resource *createImpl(const Ogre::String &name, Ogre::ResourceHandle handle, Ogre::Resource *createImpl(const Ogre::String &name, Ogre::ResourceHandle handle,
const Ogre::String &group, bool isManual, Ogre::ManualResourceLoader *loader, const Ogre::String &group, bool isManual, Ogre::ManualResourceLoader *loader,
const Ogre::NameValuePairList *createParams); const Ogre::NameValuePairList *createParams);
public: public:
@ -200,7 +200,7 @@ public:
void loadResource(Ogre::Resource *resource); void loadResource(Ogre::Resource *resource);
/** /**
*This function load a new bulletShape from a NIF file into the BulletShapeManager. *This function load a new bulletShape from a NIF file into the BulletShapeManager.
*When the file is loaded, you can then use BulletShapeManager::getByName() to retrive the bulletShape. *When the file is loaded, you can then use BulletShapeManager::getByName() to retrive the bulletShape.
*Warning: this function will just crash if the resourceGroup doesn't exist! *Warning: this function will just crash if the resourceGroup doesn't exist!
*/ */

@ -1 +1 @@
Subproject commit 7185eab18c29a0a5e03e44690d6bd8ece7e3792b Subproject commit 6c1338821e6bf640a0d54f36effc943aa4d86c6a
Loading…
Cancel
Save