budnhead/NHEngine/BootStrap.cs

69 lines
923 B
C#

using System;
using OpenTK.Graphics.OpenGL4;
using OpenTK;
using OpenTK.Audio.OpenAL;
using OpenTK.Audio;
using org.nhengine.graphics;
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){
_instance = new BootStrap();
_instance.run();
}
public BootStrap()
{
bootGraphics();
bootMap();
}
public SquaredMap SquaredMap {
get { return this.map; }
}
public void bootGraphics(){
glWindow = new OpenGLWindow();
GlobalDefaults.instance();
//graphics = new Graphics();
}
public void bootAudio(){
AL.Enable(ALCapability.Invalid);
}
public void bootMap(){
map = new SquaredMap(25,25);
}
public void run(){
glWindow.MakeCurrent();
glWindow.Run(30,30);
}
}
}