
XIncludeFile #PB_Compiler_Home + "Includes\IrrlichtWrapper_Include.pbi"

 IrrStart( #IRR_EDT_SOFTWARE, 400, 200, #IRR_WINDOWED, #IRR_NO_SHADOWS, #IRR_IGNORE_EVENTS )
 IrrPhysicsInit() 
 IrrSetWindowCaption( "Example 01: Hello World - The GUI" )
 
 IrrGuiAddStaticText( "Hello World", 4,0,200,16, #IRR_GUI_NO_BORDER, #IRR_GUI_NO_WRAP )


 *camera = IrrAddCamera(0,0,60,0,0,100.0)
 
 *staticCubeNode.l = IrrAddCubeSceneNode(10.0)
 IrrSetNodeMaterialFlag(*staticCubeNode,#IRR_EMF_LIGHTING,#False)
 *staticCube.l = IrrPhysicsAddStaticCube(*staticCubeNode,10.0,10.0,10.0,10.0)
 IrrPhysicsSetEntityPos(*staticCube,0, 0.0, 100.0)

 *dynamicCubeNode.l = IrrAddCubeSceneNode(10.0)
 IrrSetNodeMaterialFlag(*dynamicCubeNode,#IRR_EMF_LIGHTING,#False)
 *dynamicCube.l = IrrPhysicsAddDynamicCube(*dynamicCubeNode,10.0,10.0,10.0,40.0)
 IrrPhysicsSetEntityPos(*dynamicCube,5, 30.0, 100.0)
 
 *dynamicCubeNode.l = IrrAddCubeSceneNode(10.0)
 IrrSetNodeMaterialFlag(*dynamicCubeNode,#IRR_EMF_LIGHTING,#False)
 *dynamicCube.l = IrrPhysicsAddDynamicCube(*dynamicCubeNode,10.0,10.0,10.0,40.0)
 IrrPhysicsSetEntityPos(*dynamicCube,-4, 50.0, 100.0)
 
 
  While IrrRunning()
      IrrBeginScene( 0,255,255 )   
      IrrDrawScene()
      IrrDrawGUI() 
      IrrEndScene()
      IrrPhysicsUpdate()
  Wend
 
  IrrPhysicsClose()
  IrrStop()
 
  End
  
; // create an FPS camera
; 	ICameraSceneNode* camera = smgr->addCameraSceneNodeFPS();
; 
; 	// move the camera up a bit so we can see the terrain
; 	camera->setPosition(vector3df(100.0f, 200.0f, 100.0f));
; 
; 	// start iphysics
; 	CPhysics physics;
; 	physics.init(device->getTimer());
; 
; 	// create our custom event receiver, set it As the active one
; 	CEventReceiver_eg2 receiver(smgr, &physics, camera);
; 	device->setEventReceiver(&receiver);
; 
; 	// create terrain from heightmap
; 	ITerrainSceneNode* terrainNode = smgr->addTerrainSceneNode("media/heightmap.bmp");
; 	terrainNode->setMaterialTexture(0, driver->getTexture("media/terrain_texture.jpg"));
; 	terrainNode->setMaterialTexture(1, driver->getTexture("media/terrain_detail.jpg"));
; 	terrainNode->setMaterialType(EMT_DETAIL_MAP);
; 	terrainNode->scaleTexture(1.0f, 10.0f);
; 	terrainNode->setMaterialFlag(EMF_LIGHTING, false);
; 
; 	// create scale vector, apply To scene node And also add it To SPhysicsTerrain
; 	vector3df terrainScale(10.0f, 1.0f, 10.0f);
; 	terrainNode->setScale(terrainScale);
; 
; 	// create SPhysicsTerrain
; 	SPhysicsTerrain terrain;
; 	terrain.terrainNode = terrainNode;
; 	terrain.terrainScale = terrainScale;
; 
; 	// create Terrain entity
; 	IPhysicsEntity* terrainEntity = physics.addEntity(&terrain);

; IDE Options = PureBasic v4.02 (Windows - x86)
; CursorPosition = 70
; FirstLine = 18
; jaPBe Version=3.7.2.629
; Build=0
; FirstLine=27
; CursorPosition=46
; ExecutableFormat=Windows
; DontSaveDeclare
; EOF