Ogreode example runtime error

consti19

05-12-2009 11:09:35

Hi i have compiled ogreode with ogre 1.6.4 I started .exe . But i only get the menu. If I click on OK I get a black window and the programm shutts down.
Please help me .

My logfile
12:17:31: Creating resource group General
12:17:31: Creating resource group Internal
12:17:31: Creating resource group Autodetect
12:17:31: SceneManagerFactory for type 'DefaultSceneManager' registered.
12:17:31: Registering ResourceManager for type Material
12:17:31: Registering ResourceManager for type Mesh
12:17:31: Registering ResourceManager for type Skeleton
12:17:31: MovableObjectFactory for type 'ParticleSystem' registered.
12:17:31: OverlayElementFactory for type Panel registered.
12:17:31: OverlayElementFactory for type BorderPanel registered.
12:17:31: OverlayElementFactory for type TextArea registered.
12:17:31: Registering ResourceManager for type Font
12:17:31: ArchiveFactory for archive type FileSystem registered.
12:17:31: ArchiveFactory for archive type Zip registered.
12:17:31: FreeImage version: 3.10.0
12:17:31: This program uses FreeImage, a free, open source image library supporting all common bitmap formats. See http://freeimage.sourceforge.net for details
12:17:31: Supported formats: bmp,ico,jpg,jif,jpeg,jpe,jng,koa,iff,lbm,mng,pbm,pbm,pcd,pcx,pgm,pgm,png,ppm,ppm,ras,tga,targa,tif,tiff,wap,wbmp,wbm,psd,cut,xbm,xpm,gif,hdr,g3,sgi,exr,j2k,j2c,jp2
12:17:31: DDS codec registering
12:17:31: Registering ResourceManager for type HighLevelGpuProgram
12:17:31: Registering ResourceManager for type Compositor
12:17:31: MovableObjectFactory for type 'Entity' registered.
12:17:31: MovableObjectFactory for type 'Light' registered.
12:17:31: MovableObjectFactory for type 'BillboardSet' registered.
12:17:31: MovableObjectFactory for type 'ManualObject' registered.
12:17:31: MovableObjectFactory for type 'BillboardChain' registered.
12:17:31: MovableObjectFactory for type 'RibbonTrail' registered.
12:17:31: Loading library .\RenderSystem_Direct3D9
12:17:31: Installing plugin: D3D9 RenderSystem
12:17:31: D3D9 : Direct3D9 Rendering Subsystem created.
12:17:31: D3D9: Driver Detection Starts
12:17:31: D3D9: Driver Detection Ends
12:17:31: Plugin successfully installed
12:17:31: Loading library .\RenderSystem_GL
12:17:31: Installing plugin: GL RenderSystem
12:17:31: OpenGL Rendering Subsystem created.
12:17:31: Plugin successfully installed
12:17:31: Loading library .\Plugin_ParticleFX
12:17:31: Installing plugin: ParticleFX
12:17:31: Particle Emitter Type 'Point' registered
12:17:31: Particle Emitter Type 'Box' registered
12:17:31: Particle Emitter Type 'Ellipsoid' registered
12:17:31: Particle Emitter Type 'Cylinder' registered
12:17:31: Particle Emitter Type 'Ring' registered
12:17:31: Particle Emitter Type 'HollowEllipsoid' registered
12:17:31: Particle Affector Type 'LinearForce' registered
12:17:31: Particle Affector Type 'ColourFader' registered
12:17:31: Particle Affector Type 'ColourFader2' registered
12:17:31: Particle Affector Type 'ColourImage' registered
12:17:31: Particle Affector Type 'ColourInterpolator' registered
12:17:31: Particle Affector Type 'Scaler' registered
12:17:31: Particle Affector Type 'Rotator' registered
12:17:31: Particle Affector Type 'DirectionRandomiser' registered
12:17:31: Particle Affector Type 'DeflectorPlane' registered
12:17:31: Plugin successfully installed
12:17:31: Loading library .\Plugin_BSPSceneManager
12:17:31: Installing plugin: BSP Scene Manager
12:17:31: Plugin successfully installed
12:17:31: Loading library .\Plugin_CgProgramManager
12:17:31: Installing plugin: Cg Program Manager
12:17:34: Plugin successfully installed
12:17:34: Loading library .\Plugin_PCZSceneManager.dll
12:17:34: Installing plugin: Portal Connected Zone Scene Manager
12:17:34: PCZone Factory Type 'ZoneType_Default' registered
12:17:34: Plugin successfully installed
12:17:34: Loading library .\Plugin_OctreeZone.dll
12:17:34: Installing plugin: Octree Zone Factory
12:17:34: Plugin successfully installed
12:17:34: Loading library .\Plugin_OctreeSceneManager
12:17:34: Installing plugin: Octree & Terrain Scene Manager
12:17:34: Plugin successfully installed
12:17:34: *-*-* OGRE Initialising
12:17:34: *-*-* Version 1.6.4 (Shoggoth)
12:17:34: Creating resource group Bootstrap
12:17:34: Added resource location '../../media/packs/OgreCore.zip' of type 'Zip' to resource group 'Bootstrap'
12:17:34: Added resource location '../../media' of type 'FileSystem' to resource group 'General'
12:17:34: Added resource location '../../media/fonts' of type 'FileSystem' to resource group 'General'
12:17:34: Added resource location '../../media/materials/programs' of type 'FileSystem' to resource group 'General'
12:17:34: Added resource location '../../media/materials/scripts' of type 'FileSystem' to resource group 'General'
12:17:34: Added resource location '../../media/materials/textures' of type 'FileSystem' to resource group 'General'
12:17:34: Added resource location '../../media/models' of type 'FileSystem' to resource group 'General'
12:17:34: Added resource location '../../media/overlays' of type 'FileSystem' to resource group 'General'
12:17:34: Added resource location '../../media/particle' of type 'FileSystem' to resource group 'General'
12:17:34: Added resource location '../../media/gui' of type 'FileSystem' to resource group 'General'
12:17:34: Added resource location '../../media/DeferredShadingMedia' of type 'FileSystem' to resource group 'General'
12:17:34: Added resource location '../../media/PCZAppMedia' of type 'FileSystem' to resource group 'General'
12:17:34: Added resource location '../../media/packs/cubemap.zip' of type 'Zip' to resource group 'General'
12:17:34: Added resource location '../../media/packs/cubemapsJS.zip' of type 'Zip' to resource group 'General'
12:17:34: Added resource location '../../media/packs/dragon.zip' of type 'Zip' to resource group 'General'
12:17:34: Added resource location '../../media/packs/fresneldemo.zip' of type 'Zip' to resource group 'General'
12:17:34: Added resource location '../../media/packs/ogretestmap.zip' of type 'Zip' to resource group 'General'
12:17:34: Added resource location '../../media/packs/skybox.zip' of type 'Zip' to resource group 'General'
12:17:34: Creating resource group OgreOde
12:17:34: Added resource location 'I:/OgreOdeBuild/OgreOde/demos/Media' of type 'FileSystem' to resource group 'OgreOde'
12:17:34: D3D9 : RenderSystem Option: Allow NVPerfHUD = Yes
12:17:34: D3D9 : RenderSystem Option: Anti aliasing = None
12:17:34: D3D9 : RenderSystem Option: Floating-point mode = Consistent
12:17:34: D3D9 : RenderSystem Option: Full Screen = No
12:17:34: D3D9 : RenderSystem Option: Rendering Device = Intel(R) 82852/82855 GM/GME Graphics Controller
12:17:34: D3D9 : RenderSystem Option: VSync = No
12:17:34: D3D9 : RenderSystem Option: Video Mode = 1024 x 768 @ 32-bit colour
12:17:34: D3D9 : RenderSystem Option: sRGB Gamma Conversion = Yes
12:18:58: CPU Identifier & Features
12:18:58: -------------------------
12:18:58: * CPU ID: GenuineIntel: Intel(R) Celeron(R) CPU 2.50GHz
12:18:58: * SSE: yes
12:18:58: * SSE2: yes
12:18:58: * SSE3: no
12:18:58: * MMX: yes
12:18:58: * MMXEXT: yes
12:18:58: * 3DNOW: no
12:18:58: * 3DNOWEXT: no
12:18:58: * CMOV: yes
12:18:58: * TSC: yes
12:18:58: * FPU: yes
12:18:58: * PRO: no
12:18:58: * HT: yes
12:18:58: -------------------------
12:18:58: D3D9 : Subsystem Initialising
12:18:58: D3D9RenderSystem::_createRenderWindow "OGRE Render Window", 1024x768 windowed miscParams: FSAA=0 FSAAQuality=0 colourDepth=32 gamma=true useNVPerfHUD=true vsync=false
12:18:58: D3D9 : Created D3D9 Rendering Window 'OGRE Render Window' : 1016x741, 32bpp
12:18:58: D3D9 : WARNING - disabling VSync in windowed mode can cause timing issues at lower frame rates, turn VSync on if you observe this problem.
12:18:58: Registering ResourceManager for type Texture
12:18:58: Registering ResourceManager for type GpuProgram
12:18:58: RenderSystem capabilities
12:18:58: -------------------------
12:18:58: RenderSystem Name: Direct3D9 Rendering Subsystem
12:18:58: GPU Vendor: intel
12:18:58: Device Name: Intel(R) 82852/82855 GM/GME Graphics Controller
12:18:58: Driver Version: 6.14.10.4497
12:18:58: * Fixed function pipeline: yes
12:18:58: * Hardware generation of mipmaps: no
12:18:58: * Texture blending: yes
12:18:58: * Anisotropic texture filtering: yes
12:18:58: * Dot product texture operation: yes
12:18:58: * Cube mapping: yes
12:18:58: * Hardware stencil buffer: yes
12:18:58: - Stencil depth: 8
12:18:58: - Two sided stencil support: no
12:18:58: - Wrap stencil values: yes
12:18:58: * Hardware vertex / index buffers: yes
12:18:58: * Vertex programs: yes
12:18:58: * Fragment programs: no
12:18:58: * Geometry programs: no
12:18:58: * Supported Shader Profiles: hlsl vs_1_1 vs_2_0 vs_2_a vs_2_x vs_3_0
12:18:58: * Texture Compression: yes
12:18:58: - DXT: yes
12:18:58: - VTC: no
12:18:58: * Scissor Rectangle: yes
12:18:58: * Hardware Occlusion Query: no
12:18:58: * User clip planes: yes
12:18:58: * VET_UBYTE4 vertex element type: yes
12:18:58: * Infinite far plane projection: yes
12:18:58: * Hardware render-to-texture: yes
12:18:58: * Floating point textures: no
12:18:58: * Non-power-of-two textures: yes (limited)
12:18:58: * Volume textures: no
12:18:58: * Multiple Render Targets: 1
12:18:58: - With different bit depths: no
12:18:58: * Point Sprites: yes
12:18:58: * Extended point parameters: yes
12:18:58: * Max Point Size: 256
12:18:58: * Vertex texture fetch: no
12:18:58: * Render to Vertex Buffer : no
12:18:58: * DirectX per stage constants: no
12:18:58: ***************************************
12:18:58: *** D3D9 : Subsystem Initialised OK ***
12:18:58: ***************************************
12:18:58: ResourceBackgroundQueue - threading disabled
12:18:58: Particle Renderer Type 'billboard' registered
12:18:58: SceneManagerFactory for type 'BspSceneManager' registered.
12:18:58: Registering ResourceManager for type BspLevel
12:18:58: SceneManagerFactory for type 'PCZSceneManager' registered.
12:18:58: MovableObjectFactory for type 'PCZLight' registered.
12:18:58: PCZone Factory Type 'ZoneType_Octree' registered
12:18:58: PCZone Factory Type 'ZoneType_Terrain' registered
12:18:58: SceneManagerFactory for type 'OctreeSceneManager' registered.
12:18:58: SceneManagerFactory for type 'TerrainSceneManager' registered.



the code

/** TutorialApplication.cpp */

/** Include example application headerfile */
#include "ExampleApplication.h"
//#include "OgreOde\OgreOde_Core.h"
#include "OgreOde_Core.h"


class TutorialFrameListener : public ExampleFrameListener
{
protected:
OgreOde::World* mWorld;
OgreOde::StepHandler* mStepper;

public:
TutorialFrameListener(RenderWindow* win, Camera* cam, OgreOde::World* _world,
OgreOde::StepHandler* _stepper)
: ExampleFrameListener(win, cam), mWorld(_world), mStepper(_stepper)
{
}
//bool frameStarted(const FrameEvent& evt)
bool frameEnded(const FrameEvent& evt)
{
Real time = evt.timeSinceLastFrame;
if ( mStepper->step(time) )
mWorld->synchronise();
return ExampleFrameListener::frameEnded(evt);
//return ExampleFrameListener::frameStarted(evt);
}
};

/** Class TutorialApplication */
class TutorialApplication : public ExampleApplication
{
protected:

public:
TutorialApplication(void)
{
}

~TutorialApplication(void)
{
}

protected:
void createScene(void)
{

/** Create ambient light */
mSceneMgr->setAmbientLight(ColourValue(1, 1, 1));

/** Create point light, set its type and position */
Light *light = mSceneMgr->createLight("Light1");
light->setType(Light::LT_POINT);
light->setPosition(Vector3(0, 150, 250));

/** set the diffuse and specular colour */
light->setDiffuseColour(1.0, 1.0, 1.0);
light->setSpecularColour(1.0, 1.0, 1.0);

/** Add physics to Ogre */
mWorld = new OgreOde::World(mSceneMgr);
mWorld->setGravity(Ogre::Vector3(0, -9.80665, 0));
mWorld->setCFM(10e-5);
mWorld->setERP(0.8);
mWorld->setAutoSleep(true);
mWorld->setAutoSleepAverageSamplesCount(10);
mWorld->setContactCorrectionVelocity(1.0);
mSpace = mWorld->getDefaultSpace();

const Ogre::Real _time_step = 0.5;
const Ogre::Real time_scale = Ogre::Real(1.7);
const Ogre::Real max_frame_time = Ogre::Real(1.0 / 4);

mStepper = new OgreOde::StepHandler(mWorld, OgreOde::StepHandler::QuickStep,
_time_step, max_frame_time, time_scale);

mGround = new OgreOde::InfinitePlaneGeometry(Plane(Ogre::Vector3(0,1,0),0), mWorld,
mWorld->getDefaultSpace());

//load meshed
int i = 0;
StaticGeometry *s;
s = mSceneMgr->createStaticGeometry("StaticFloor");
s->setRegionDimensions(Ogre::Vector3(160.0, 100.0, 160.0));

//set the region origin so the center is at 0 world
s->setOrigin(Ogre::Vector3::ZERO);

for(Real z = -80.0; z <= 80.0; z += 20.0)
{
for(Real x = -80.0; x <= 80.0; x += 20.0)
{
String name = String("Ground") + StringConverter::toString(i++);
Entity *entity = mSceneMgr->createEntity(name, "plane.mesh");
entity->setQueryFlags(1<<4);
entity->setUserObject(mGround);
entity->setCastShadows(false);
s->addEntity(entity, Ogre::Vector3(x,0,z));
}
}
s->build();

mEntity = mSceneMgr->createEntity("crate", "crate.mesh");
mEntity->setQueryFlags(1<<2);
mNode = mSceneMgr->getRootSceneNode()->createChildSceneNode("crate");
mNode->attachObject(mEntity);
//mEntity->setNormaliseNormals(true);
mEntity->setCastShadows(true);

//create a body for our crate
//and "register" it in our world and the scene node
mBody = new OgreOde::Body(mWorld);
mNode->attachObject(mBody);

//set size and mass of the box
Vector3 size(10.0,10.0,10.0);
OgreOde::BoxMass mMass(0.5, size);
mMass.setDensity(5.0, size);
mGeom = (OgreOde::Geometry*) new OgreOde::BoxGeometry(size, mWorld, mSpace);
mNode->setScale(size.x * 0.1, size.y * 0.1, size.z * 0.1);
mBody->setMass(mMass);
mGeom->setBody(mBody);
mEntity->setUserObject(mGeom);

//set the orientation and position of the crate
mBody->setOrientation(Quaternion(Radian(5.0), Ogre::Vector3(0,0,0)));
mBody->setPosition(Vector3(0,120,-20));
}

//create framelistener
void createFrameListener(void)
{
mFrameListener = new TutorialFrameListener(mWindow, mCamera, mWorld, mStepper);
mRoot->addFrameListener(mFrameListener);
}

private:
OgreOde::World *mWorld;
OgreOde::Space *mSpace;
OgreOde::StepHandler *mStepper;

OgreOde::InfinitePlaneGeometry *mGround;
OgreOde::Body *mBody;
OgreOde::Geometry *mGeom;
OgreOde::BoxMass *mMass;
Ogre::SceneNode *mNode;
Ogre::Entity *mEntity;
};

#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
#define WIN32_LEAN_AND_MEAN
#include "windows.h"

INT WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInstance, LPSTR lpCmdLine, INT nShowCmd)
#else
int main(int argc, char **argv)
#endif
{
/** Create application object */
TutorialApplication app;

try
{
app.go();
}
catch(Exception e)
{
#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
#else
#endif
}

return 0;
}




i`ve changed the code code of some header like a description on the internet but it did't work ,too.
So i use ogrenewt now.