Compile error fix;RenderingInterface separated; buildStaticGeometry argument changed

actorid
Jason Hooks 13 years ago
parent c11b3a57c1
commit 469086747e

@ -16,7 +16,7 @@ set(GAME_HEADER
source_group(game FILES ${GAME} ${GAME_HEADER})
add_openmw_dir (mwrender
renderingmanager debugging cellimp interior exterior sky player npcs creatures objects
renderingmanager debugging cellimp interior exterior sky player npcs creatures objects renderinginterface
)
add_openmw_dir (mwinput

@ -2,8 +2,9 @@
#include <OgreSceneNode.h>
#include <components/nifogre/ogre_nif_loader.hpp>
using namespace MWRender;
using namespace Ogre;
using namespace MWRender;
bool Objects::lightConst = false;
float Objects::lightConstValue = 0.0f;
@ -159,10 +160,10 @@ void Objects::removeCell(const MWWorld::Ptr& ptr){
sg = 0;
}
}
void Objects::buildStaticGeometry(const MWWorld::Ptr& ptr){
if(mSG.find(ptr.getCell()) != mSG.end())
void Objects::buildStaticGeometry(ESMS::CellStore<MWWorld::RefData>& cell){
if(mSG.find(&cell) != mSG.end())
{
Ogre::StaticGeometry* sg = mSG[ptr.getCell()];
Ogre::StaticGeometry* sg = mSG[&cell];
sg->build();
}
}

@ -5,8 +5,8 @@
#include <openengine/ogre/renderer.hpp>
namespace MWRender{
class Objects{
private:
OEngine::Render::OgreRenderer &mRend;
std::map<MWWorld::Ptr::CellStore *, Ogre::SceneNode *> mCellSceneNodes;
std::map<MWWorld::Ptr::CellStore *, Ogre::StaticGeometry*> mSG;
@ -34,7 +34,7 @@ public:
void insertLight (const MWWorld::Ptr& ptr, float r, float g, float b, float radius);
void deleteObject (const std::string& handle);
void removeCell(const MWWorld::Ptr& ptr);
void buildStaticGeometry(const MWWorld::Ptr& ptr);
void buildStaticGeometry(ESMS::CellStore<MWWorld::RefData> &cell);
/// insert a light related to the most recent insertBegin call.

@ -0,0 +1,12 @@
#include "objects.hpp"
#include "npcs.hpp"
#include "creatures.hpp"
namespace MWRender{
class RenderingInterface{
public:
virtual MWRender::Npcs& getNPCs() = 0;
virtual MWRender::Creatures& getCreatures() = 0;
virtual MWRender::Objects& getObjects() = 0;
virtual MWRender::Player& getPlayer() = 0;
};
}

@ -1,5 +1,4 @@
#include "renderingmanager.hpp"
#include "objects.hpp"
#include <assert.h>

@ -4,6 +4,7 @@
#include "sky.hpp"
#include "debugging.hpp"
#include "renderinginterface.hpp"
#include <utility>
#include <openengine/ogre/renderer.hpp>
@ -15,9 +16,8 @@
#include "../mwworld/ptr.hpp"
#include <boost/filesystem.hpp>
#include "objects.hpp"
#include "npcs.hpp"
#include "creatures.hpp"
namespace Ogre
{
@ -38,13 +38,7 @@ namespace MWWorld
namespace MWRender
{
class Player;
class RenderingInterface{
public:
virtual MWRender::Npcs& getNPCs();
virtual MWRender::Creatures& getCreatures();
virtual MWRender::Objects& getObjects();
virtual MWRender::Player& getPlayer();
};
class RenderingManager: private RenderingInterface {

Loading…
Cancel
Save