Code: Select all
#include<Ogre.h>
using namespace Ogre;
int main()
{
Root *root= new Root("plugins_d.cfg","game.cfg","game.log");
root->loadPlugin("/usr/local/lib/OGRE/RenderSystem_GL");
const RenderSystemList& rs = root->getAvailableRenderers();
RenderSystem * r=rs[0];
root->setRenderSystem(r);
r->setConfigOption("Full Screen","No");
r->setConfigOption("Video Mode","800 x 600 @ 32-bit colour");
//root->showConfigDialog();
//root->initialise(true, "Hello World!","");
RenderWindow *window = root->createRenderWindow("Hello",800,600,false);
SceneManager *smgr = root->createSceneManager(ST_GENERIC, "SceneManager");
Camera *cam = smgr->createCamera("MainCamera");
Viewport *vp = window->addViewport(cam);
vp->setBackgroundColour(ColourValue(0.3, 0.6, 0.9));
root->startRendering();
return 0;
}
The actual exception is:
Code: Select all
Unhandled exception at 0x7486277c in Tutorial.exe: Microsoft C++ exception: Ogre::InternalErrorException at memory location 0x0110f7bc..
Code: Select all
OgreMain_d.dll!0f7626b6()
[Frames below may be incorrect and/or missing, no symbols loaded for OgreMain_d.dll]
> Tutorial.exe!WinMain(HINSTANCE__ * hInst=0x01120000, HINSTANCE__ * __formal=0x00000000, char * strCmdLine=0x007922b0, HINSTANCE__ * __formal=0x00000000) Line 10 + 0x30 bytes C++
Tutorial.exe!__tmainCRTStartup() Line 547 + 0x2c bytes C
Tutorial.exe!WinMainCRTStartup() Line 371 C
kernel32.dll!74c81866()
ntdll.dll!770668f1()
ntdll.dll!7706689d()