Code: Select all
[C#]
using System;
using System.Collections.Generic;
using System.Text;
using Irrlicht;
using Irrlicht.Core;
using Irrlicht.Scene;
using Irrlicht.Video;
namespace LoadingLevels
{
class Program
{
static void Main(string[] args)
{
IrrlichtDevice device = new IrrlichtDevice(DriverType.DIRECT3D9, new Dimension2D(1024, 768), 32, true, true, true);
if (device == null)
{
Console.WriteLine("Device creation failed.");
return;
}
IAnimatedMesh mesh = device.SceneManager.GetMesh("C:\\Documents and Settings\\PC\\Desktop\\New Folder\\Basic Level.dmf");
ISceneNode node = null;
if (mesh != null)
node = device.SceneManager.AddOctTreeSceneNode(mesh, null, 1);
if (node != null)
node.Position = (new Vector3D(-1300, -144, -1249));
device.SceneManager.AddCameraSceneNodeFPS();
device.CursorControl.Visible = false;
int lastFPS = -1;
while (device.Run())
{
if (device.WindowActive)
{
device.VideoDriver.BeginScene(true, true, new Color(0, 200, 200, 200));
device.SceneManager.DrawAll();
device.VideoDriver.EndScene();
int fps = device.VideoDriver.FPS;
if (lastFPS != fps)
{
device.WindowCaption = "Irrlicht Engine - Loading Basic Levels [" +
device.VideoDriver.Name + "] FPS:" + fps.ToString();
lastFPS = fps;
}
}
}
GC.Collect();
}
}
}
P.S.: I have only been using the engine for 2 days so dont bash me.
-The Ox Man