Page 1 of 1

Loading .irr file in C# problems.

Posted: Fri Jul 06, 2007 7:01 pm
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.

Take out..

Posted: Mon Jul 09, 2007 5:26 pm
by Murdock_SE
Take out the if (device.WindowActive) conditional (leaving everything intact within it**), recompile, and try again.

Posted: Tue Jul 10, 2007 2:25 am
by Bladerun
Well I tried that but it didn't work. It's still the same. Thanks though Murdock.

Try the other driver types?

Posted: Wed Jul 11, 2007 3:13 am
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

Posted: Thu Aug 02, 2007 9:06 pm
by Jolly Joker
Try replacing other alpha value than zero :wink:
Irrlicht.Video.Color colors = new Color(0,200,200,200);