Renamed all .h to .hpp. Started porting rendering code.
parent
2d2804b30c
commit
dc2c9f06d0
@ -0,0 +1,18 @@
|
||||
#ifndef _GAME_RENDER_CELL_H
|
||||
#define _GAME_RENDER_CELL_H
|
||||
|
||||
#include "../cell_store.hpp"
|
||||
|
||||
namespace Render
|
||||
{
|
||||
class CellRender
|
||||
{
|
||||
const ESMS::CellStore *cell;
|
||||
|
||||
public:
|
||||
CellRender(const ESMS::CellStore &_cell)
|
||||
: cell(&_cell) {}
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
@ -1,36 +0,0 @@
|
||||
/* Split off into a separate file just to increase compile
|
||||
speed. Parsing Ogre.h takes a long time, and the Ogre-dependent
|
||||
part doesn't change much. This entire layout will change later.
|
||||
*/
|
||||
|
||||
#include <iostream>
|
||||
#include "bsa/bsa_archive.h"
|
||||
#include "Ogre.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
// Absolute minimal OGRE setup
|
||||
void ogre_setup()
|
||||
{
|
||||
using namespace Ogre;
|
||||
|
||||
// Disable Ogre logging
|
||||
new LogManager;
|
||||
Log *log = LogManager::getSingleton().createLog("");
|
||||
log->setDebugOutputEnabled(false);
|
||||
|
||||
// Set up Root.
|
||||
new Root();
|
||||
}
|
||||
|
||||
void main_setup(const char* bsaFile)
|
||||
{
|
||||
cout << "Hello, fellow traveler!\n";
|
||||
|
||||
cout << "Initializing OGRE\n";
|
||||
ogre_setup();
|
||||
|
||||
cout << "Adding " << bsaFile << endl;
|
||||
addBSA(bsaFile);
|
||||
}
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 52e7570b4fddd868cc0483e0fa2e49c50d5a1334
|
||||
Subproject commit 6b0b7c95f8a40a53b4c26d551d4fb5118deb7e12
|
@ -0,0 +1 @@
|
||||
old
|
@ -0,0 +1,34 @@
|
||||
#include "render.hpp"
|
||||
|
||||
using namespace Ogre;
|
||||
|
||||
bool OgreRenderer::configure(bool showConfig,
|
||||
const std::string &pluginCfg,
|
||||
bool _logging);
|
||||
{
|
||||
// Set up logging first
|
||||
new LogManager;
|
||||
Log *log = LogManager::getSingleton().createLog("Ogre.log");
|
||||
logging = _logging;
|
||||
|
||||
if(logging)
|
||||
// Full log detail
|
||||
log->setLogDetail(LL_BOREME);
|
||||
else
|
||||
// Disable logging
|
||||
log->setDebugOutputEnabled(false);
|
||||
|
||||
mRoot = new Root(plugincfg, "ogre.cfg", "");
|
||||
|
||||
// Show the configuration dialog and initialise the system, if the
|
||||
// showConfig parameter is specified. The settings are stored in
|
||||
// ogre.cfg. If showConfig is false, the settings are assumed to
|
||||
// already exist in ogre.cfg.
|
||||
int result;
|
||||
if(showConfig)
|
||||
result = mRoot->showConfigDialog();
|
||||
else
|
||||
result = mRoot->restoreConfig();
|
||||
|
||||
return !result;
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
#ifndef _OGRE_RENDERER_H
|
||||
#define _OGRE_RENDERER_H
|
||||
|
||||
/*
|
||||
Ogre renderer class
|
||||
*/
|
||||
|
||||
#include <Ogre.h>
|
||||
#include <string>
|
||||
|
||||
namespace Render
|
||||
{
|
||||
class OgreRenderer
|
||||
{
|
||||
Ogre::Root *mRoot;
|
||||
bool logging;
|
||||
|
||||
public:
|
||||
OgreRenderer()
|
||||
: mRoot(NULL) {}
|
||||
|
||||
/** Configure the renderer. This will load configuration files and
|
||||
set up the Root and logging classes. */
|
||||
|
||||
bool configure(bool showConfig, // Show config dialog box?
|
||||
const std::string &pluginCfg, // plugin.cfg file
|
||||
bool _logging); // Enable or disable logging
|
||||
|
||||
/// Kill the renderer.
|
||||
void cleanup();
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue