moore
18-03-2011 16:19:05
Hi, i finally build nxogre tutorials, but now i want to do separate application(without running samplebrowser). I use code from this page and changed tutorialapplication.cpp:
But i get error:
My second question is whether it is better to build applications with the dll or same exe?
void TutorialApplication::createScene(void)
{
// Create the world.
mWorld = NxOgre::World::createWorld();
mWorld->getRemoteDebugger()->connect();
// Create the scene
NxOgre::SceneDescription scene_description;
scene_description.mGravity = NxOgre::Constants::MEAN_EARTH_GRAVITY;
scene_description.mUseHardware = false;
mScene = mWorld->createScene(scene_description);
// Set default material properties
mDefaultMaterial = mScene->getMaterial(0);
mDefaultMaterial->setRestitution(0.1f);
mDefaultMaterial->setDynamicFriction(0.9);
mDefaultMaterial->setStaticFriction(0.5);
// Plane creation
mScene->createSceneGeometry(NxOgre::PlaneGeometryDescription());
// Create the rendersystem.
mRenderSystem = new Critter::RenderSystem(mScene, mSceneMgr);
mRenderSystem->createVisualDebugger();
// Setup a BodyDescription.
Critter::BodyDescription bodyDescription;
bodyDescription.mMass = 40.0f; // Set the mass to 40kg.
// Finally create the body.
mBody = mRenderSystem->createBody(NxOgre::BoxDescription(1,1,1), NxOgre::Vec3(0,5,0), "cube.1m.mesh", bodyDescription);
// create a floor mesh resource
Ogre::MeshManager::getSingleton().createPlane("floor", ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME,
Plane(Vector3::UNIT_Y, 0), 1000, 1000, 1,1 , true, 1, 1, 1, Vector3::UNIT_Z);
// create a floor entity, give it a material, and place it at the origin
Entity* floor = mSceneMgr->createEntity("Floor", "floor");
floor->setMaterialName("ground-from-nxogre.org");
floor->setCastShadows(false);
mSceneMgr->getRootSceneNode()->attachObject(floor);
}
But i get error:
e:\ogre\ogresdk_vc10\add-ons\nxogre\critter\sdk\CritterStable.h(45): fatal error C1083: Cannot open include file: 'OGRE/Ogre.h': No such file or directory
My second question is whether it is better to build applications with the dll or same exe?