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.

Loading .irr file in C# problems.

Postby Bladerun » Fri Jul 06, 2007 7:01 pm

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.
Bladerun
 
Posts: 2
Joined: Fri Jul 06, 2007 6:58 pm

Take out..

Postby Murdock_SE » Mon Jul 09, 2007 5:26 pm

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

Postby Bladerun » Tue Jul 10, 2007 2:25 am

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

Try the other driver types?

Postby Murdock_SE » Wed Jul 11, 2007 3:13 am

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
Murdock_SE
 
Posts: 5
Joined: Fri Jul 06, 2007 5:25 pm

Postby Jolly Joker » Thu Aug 02, 2007 9:06 pm

Try replacing other alpha value than zero :wink:
Irrlicht.Video.Color colors = new Color(0,200,200,200);
Jolly Joker
 
Posts: 23
Joined: Fri Jul 13, 2007 6:08 pm


Return to Irrlicht.NET

Who is online

Users browsing this forum: No registered users and 1 guest