Loading .irr file in C# problems.

Irrlicht.Net is no longer developed or supported, Irrlicht.Net Cross Platform is a much more complete wrapper. Please ask your C# related questions on their forums first.
Locked
Bladerun
Posts: 2
Joined: Fri Jul 06, 2007 6:58 pm

Loading .irr file in C# problems.

Post by Bladerun »

Here is my C# Code:

using System;
using System.Collections.Generic;
using System.Text;
using Irrlicht;
using Irrlicht.Video;
using Irrlicht.Core;
using Irrlicht.Scene;

namespace FirstWorldLoad
{
class WorldLoad
{
static void Main(string[] args)
{
IrrlichtDevice device = new IrrlichtDevice(Irrlicht.Video.DriverType.DIRECT3D8);

device.WindowCaption = "First World";

//load .irr file
device.SceneManager.LoadScene(@"C:\Documents and Settings\Chaz\Desktop\irrEdit-0.7.1\scenes\firstWorld.irr");
Irrlicht.Video.Color colors = new Color(0,200,200,200);
//draw Everything
while (device.Run())
{
if (device.WindowActive)
{
device.VideoDriver.BeginScene(true, true, colors );
device.SceneManager.DrawAll();
device.VideoDriver.EndScene();
}
}
device.CloseDevice();
}
}
}

When I run it debug says all textures are loaded, and shows no errors, but all I get is a blank window. Am I missing something?

Thanks in advance.
Murdock_SE
Posts: 5
Joined: Fri Jul 06, 2007 5:25 pm

Take out..

Post by Murdock_SE »

Take out the if (device.WindowActive) conditional (leaving everything intact within it**), recompile, and try again.
Bladerun
Posts: 2
Joined: Fri Jul 06, 2007 6:58 pm

Post by Bladerun »

Well I tried that but it didn't work. It's still the same. Thanks though Murdock.
Murdock_SE
Posts: 5
Joined: Fri Jul 06, 2007 5:25 pm

Try the other driver types?

Post by Murdock_SE »

Did you try the other drive types by chance? Mine tends to only work with the OpenGL drivers. If I get a chance tommorrow, I'll plop your code in my c# and try to debug. I've been writing with mostly c++ lately.

Is this the only tutorial you have an issue with? Have you tried just the hello world one?

Murdock_SE
Jolly Joker
Posts: 23
Joined: Fri Jul 13, 2007 6:08 pm

Post by Jolly Joker »

Try replacing other alpha value than zero :wink:
Irrlicht.Video.Color colors = new Color(0,200,200,200);
Locked