[SOLVED] [C#] Need help loading DeleD maps
Posted: Thu Dec 07, 2006 9:35 am
I need help loading a simple map i made with DeleD. My code is based off of the .NET tutorial for loading the Quake 3 level. All of my meshes and textures load correctly and the console displays nothing is wrong but all I get is a grey screen. Here is my code...
I have used the search engine on the forums but i have found no answer in C# form but there are alot of C++ examples. If anyone knows both languages please translate. Thanks everone for helping.
P.S.: I have only been using the engine for 2 days so dont bash me.
-The Ox Man
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