tseronni
30-01-2008 19:15:55
Hi, everybody
OgreSDK-------------------------------------------------C:\OgreSDK
PhysX_7.11.13_SystemSoftware----------------------------in default folder
PhysX_2.7.3_SDK_Core------------------------------------C:\OgreSDK\Physx
NxOgre--------------------------------------------------C:\OgreSDK\NxOgre
now i made my first app with NxOgre like:
but, when i try to enter in the project i receive this erro:
By seronni at 2008-01-30
Anyone, knows what is this?why?and how i fix it?
thanks,
OgreSDK-------------------------------------------------C:\OgreSDK
PhysX_7.11.13_SystemSoftware----------------------------in default folder
PhysX_2.7.3_SDK_Core------------------------------------C:\OgreSDK\Physx
NxOgre--------------------------------------------------C:\OgreSDK\NxOgre
now i made my first app with NxOgre like:
#include <Ogre.h>
#include <OIS/OIS.h>
#include <CEGUI/CEGUI.h>
#include <OgreCEGUIRenderer.h>
#include <NxOgre.h>
#include <Player.h>
using namespace Ogre;
using namespace NxOgre;
class Application
{
public:
void go()
{
createRoot();
defineResources();
setupRenderSystem();
createRenderWindow();
initializeResourceGroups();
Physics();
setupScene();
setupInputSystem();
setupCEGUI();
createFrameListener();
startRenderLoop();
}
~Application()
{
mInputManager->destroyInputObject( mMouse );
mInputManager->destroyInputObject(mKeyboard);
OIS::InputManager::destroyInputSystem(mInputManager);
delete mRenderer;
delete mSystem;
delete mWorld;
delete mRoot;
}
private:
Root *mRoot;
OIS::Keyboard *mKeyboard;
OIS::Mouse *mMouse;
OIS::InputManager *mInputManager;
CEGUI::OgreCEGUIRenderer *mRenderer;
CEGUI::System *mSystem;
SceneManager *mSceneMgr;
World* mWorld;
void createRoot()
{
mRoot = new Root();
}
void defineResources()
{
String secName, typeName, archName;
ConfigFile cf;
cf.load("resources.cfg");
ConfigFile::SectionIterator seci = cf.getSectionIterator();
while (seci.hasMoreElements())
{
secName = seci.peekNextKey();
ConfigFile::SettingsMultiMap *settings = seci.getNext();
ConfigFile::SettingsMultiMap::iterator i;
for (i = settings->begin(); i != settings->end(); ++i)
{
typeName = i->first;
archName = i->second;
ResourceGroupManager::getSingleton().addResourceLocation(archName, typeName, secName);
}
}
}
void setupRenderSystem()
{
if (!mRoot->restoreConfig() && !mRoot->showConfigDialog())
{
throw Exception(52, "User canceled the config dialog!", "Application::setupRenderSystem()");
}
}
void createRenderWindow()
{
mRoot->initialise(true, "Tutorial Render Window");
}
void initializeResourceGroups()
{
TextureManager::getSingleton().setDefaultNumMipmaps(5);
ResourceGroupManager::getSingleton().initialiseAllResourceGroups();
}
void setupScene()
{
}
void setupInputSystem()
{
size_t windowHnd = 0;
std::ostringstream windowHndStr;
OIS::ParamList pl;
RenderWindow *win = mRoot->getAutoCreatedWindow();
win->getCustomAttribute("WINDOW", &windowHnd);
windowHndStr << windowHnd;
pl.insert(std::make_pair(std::string("WINDOW"), windowHndStr.str()));
mInputManager = OIS::InputManager::createInputSystem(pl);
try
{
mKeyboard = static_cast<OIS::Keyboard*>(mInputManager->createInputObject(OIS::OISKeyboard, true));
mMouse = static_cast<OIS::Mouse*>(mInputManager->createInputObject(OIS::OISMouse, true));
}
catch (const OIS::Exception &e)
{
throw new Exception(42, e.eText, "Application::setupInputSystem");
}
}
void setupCEGUI()
{
}
void createFrameListener()
{
}
void startRenderLoop()
{
mRoot->startRendering();
}
void Physics()
{
mWorld = new World();
Scene* mScene = mWorld->createScene("myFirstScene", mSceneMgr, "gravity: yes, floor: yes");
Actor* mActor = mScene->createActor("Spot", new CubeShape(1.0f), Vector3(0, 2, 0), "mass: 10");
}
};
#if OGRE_PLATFORM == PLATFORM_WIN32 || OGRE_PLATFORM == OGRE_PLATFORM_WIN32
#define WIN32_LEAN_AND_MEAN
#include "windows.h"
INT WINAPI WinMain(HINSTANCE hInst, HINSTANCE, LPSTR strCmdLine, INT)
#else
int main(int argc, char **argv)
#endif
{
try
{
Application app;
app.go();
}
catch(Exception& e)
{
#if OGRE_PLATFORM == PLATFORM_WIN32 || OGRE_PLATFORM == OGRE_PLATFORM_WIN32
MessageBoxA(NULL, e.getFullDescription().c_str(), "An exception has occurred!", MB_OK | MB_ICONERROR | MB_TASKMODAL);
#else
fprintf(stderr, "An exception has occurred: %s\n",
e.getFullDescription().c_str());
#endif
}
return 0;
}
but, when i try to enter in the project i receive this erro:
By seronni at 2008-01-30
Anyone, knows what is this?why?and how i fix it?
thanks,