masterthegames
01-08-2011 09:03:26
Hello all
I'm New In NxOgre
1st i successfully run the NxOgre With Release Mode and take the Dll And *.lib that was created in Release Sub Folder And Paste it in OgreSdk/bin/Release
and tack the phiscksloader.dll and past it in the same place
note:i add the path to NxOgre.lib
NxOgreOGRE3D.lib and added it to mt project
i follow the steps with BloodyMess Tutorial 2 but when i add this line to code
NxOgre::World* mWorld = NxOgre::World::createWorld();
i have error Unhandled Exption 0x00386ad0(NxOgre.dll) test.exe:0xc0000005:access Violation reading Loaction 0x00000000
and this is the code
Please Help
I'm New In NxOgre
1st i successfully run the NxOgre With Release Mode and take the Dll And *.lib that was created in Release Sub Folder And Paste it in OgreSdk/bin/Release
and tack the phiscksloader.dll and past it in the same place
note:i add the path to NxOgre.lib
NxOgreOGRE3D.lib and added it to mt project
i follow the steps with BloodyMess Tutorial 2 but when i add this line to code
NxOgre::World* mWorld = NxOgre::World::createWorld();
i have error Unhandled Exption 0x00386ad0(NxOgre.dll) test.exe:0xc0000005:access Violation reading Loaction 0x00000000
and this is the code
***************************************************
#include "ExampleApplication.h"
#include <NxOgre.h>
#include <NxOgreOGRE3D.h>
class mioListener : public ExampleFrameListener
{
public:
mioListener(RenderWindow *win, Camera *cam)
: ExampleFrameListener(win, cam)
{
}
bool frameStarted(const FrameEvent& evt)
{
return ExampleFrameListener::frameStarted(evt);
}
protected:
NxOgre::Scene* mScene;
OGRE3DRenderSystem* mRenderSystem;
};
class mio : public ExampleApplication
{
protected:
void createScene()
{NxOgre::World* mWorld = NxOgre::World::createWorld();
// Set ambient light
mSceneMgr->setAmbientLight(ColourValue(0.5f, 0.5f, 0.5f));
// Create a light
Light* l = mSceneMgr->createLight("MainLight");
l->setPosition(20, 80, 50);
// Position the camera
mCamera->setPosition(0, 20, 80);
mCamera->lookAt(0, 20, 0);
}
// Create a new frame listener
void createFrameListener()
{
mFrameListener = new mioListener(mWindow, mCamera);
mRoot->addFrameListener(mFrameListener);
}
};
#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
#define WIN32_LEAN_AND_MEAN
#include "windows.h"
#endif
#ifdef __cplusplus
extern "C" {
#endif
#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
INT WINAPI WinMain(HINSTANCE hInst, HINSTANCE, LPSTR strCmdLine, INT)
#else
int main(int argc, char **argv)
#endif
{
// Create application object
mio app;
try {
app.go();
} catch(Exception& e) {
#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
MessageBoxA(NULL, e.getFullDescription().c_str(),
"An exception has occurred!", MB_OK | MB_ICONERROR | MB_TASKMODAL);
#else
std::cerr << "An exception has occurred: " << e.getFullDescription();
#endif
}
return 0;
}
#ifdef __cplusplus
}
#endif
*****************************************************************************************
Please Help



