budnhead/NHEngine/BootStrap.cs

69 lines
923 B
C#
Raw Normal View History

2017-04-20 16:49:43 +02:00
using System;
using OpenTK.Graphics.OpenGL4;
using OpenTK;
2017-04-25 22:01:18 +02:00
using OpenTK.Audio.OpenAL;
using OpenTK.Audio;
using org.nhengine.graphics;
2017-04-20 16:49:43 +02:00
namespace nhengine
{
public class BootStrap
{
public static BootStrap _instance;
public static BootStrap instance()
{
return _instance;
}
OpenGLWindow glWindow;
SquaredMap map;
public static void Main(string[] args){
2017-04-25 22:01:18 +02:00
_instance = new BootStrap();
2017-04-20 16:49:43 +02:00
2017-04-25 22:01:18 +02:00
_instance.run();
2017-04-20 16:49:43 +02:00
}
public BootStrap()
{
bootGraphics();
bootMap();
}
public SquaredMap SquaredMap {
get { return this.map; }
}
public void bootGraphics(){
glWindow = new OpenGLWindow();
2017-04-25 22:01:18 +02:00
GlobalDefaults.instance();
//graphics = new Graphics();
}
public void bootAudio(){
AL.Enable(ALCapability.Invalid);
2017-04-20 16:49:43 +02:00
}
public void bootMap(){
map = new SquaredMap(25,25);
}
public void run(){
glWindow.MakeCurrent();
glWindow.Run(30,30);
}
}
}