Setting Up Irrlicht Lime in VIsual C# 2010

This is easy as pie, but I saw no tutorials so I thought I’d make one.

You can get Irrlicht Lime from here

Boot up Visual C# 2010

image

Make a Console Application project.

Go to references:

Add a new reference and browse for ‘IrrlichtLime.dll’. (Found in IrrlichtLime-1.0/bin/debug/).

image

Save your project. Hit F5/Start Debugging. This will add what you need to your bin/debug folder, except one component.

Head to the ‘bin/debug’ part of your project’s directory in explorer. And also go to the bin/debug’ folder in the Irrlicht Lime directory (where we got IrrlichtLime.dll). Take Irrlicht.dll, copy and paste it into your project debug folder.

image

In Main.cs copy and paste the following code:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using IrrlichtLime;
using IrrlichtLime.Core;
using IrrlichtLime.Video;
using IrrlichtLime.Scene;
using IrrlichtLime.GUI;

namespace _01.HelloWorld
{
    class Program
    {
        static void Main(string[] args)
        {

            IrrlichtDevice device = IrrlichtDevice.CreateDevice(
            DriverType.Software, new Dimension2Di(800, 600), 16, false, false, false);

            device.SetWindowCaption(“Irrlicht Project!”);

            VideoDriver driver = device.VideoDriver;
            SceneManager smgr = device.SceneManager;
            GUIEnvironment gui = device.GUIEnvironment;

 

            while (device.Run())
            {
                driver.BeginScene(true, true, new Color(100, 101, 140));

                smgr.DrawAll();
                gui.DrawAll();

                driver.EndScene();
            }

            device.Drop();
        }
    }
}

Hit compile!

And voila!

image

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s