Posted on

Irrlicht.NET is here!


There is a new Irrlicht.NET wrapper available. It makes it possible to use Irrlicht from any .NET language like C# or VisualBasic.NET. It is implemented in C# and supports Irrlicht 1.7.2.

//Sample Code
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Irrlicht.Net;
using Irrlicht.Net.Core;
using Irrlicht.Net.GUI;
using Irrlicht.Net.IO;
using Irrlicht.Net.Scene;
using Irrlicht.Net.Video;

namespace Tutorial1
{
    class Program
    {
        static void Main(string[] args)
        {
            Device device = new Device(DriverTypes.OpenGL, new Dimension2D(640, 480), false);
            VideoDriver driver = device.VideoDriver;
            SceneManager scene = device.SceneManager;
            GUIEnvironment gui = device.GUIEnvironment;

            device.WindowCaption = "Tutorial 1 - Hello World!";

            StaticText text = gui.AddStaticText("Hello World!", new Rectangle(10, 10, 250, 22), true);

            AnimatedMesh mesh = scene.GetMesh("faerie.md2");
            AnimatedMeshSceneNode node = scene.AddAnimatedMeshSceneNode(mesh);
            node.SetMaterialFlag(MaterialFlags.Lightning, false);
            node.SetMaterialTexture(0, driver.GetTexture("faerie2.bmp"));
            node.Animation = AnimationTypes.Stand;

            scene.AddCameraSceneNodeFPS();

            while(device.Run())
            {
                driver.BeginScene(true, true, new Color(255, 100, 101, 140));
                scene.DrawAll();
                gui.DrawAll();
                driver.EndScene();
            }
            device.Dispose();
        }
    }
}

Irrlicht Sourcefourge

[via]

Advertisements

About GPUToaster

https://gputoaster.wordpress.com/about

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