internal static void Init() { GBProperties.Init(); GBInfo.WriteLine("Creating OpenGL window..."); window = GBWindow.CreateFromProperties(); window.Run(); }
public static GBWindow CreateFromProperties() { int w = Convert.ToInt32(GBProperties.Properties["window"]["screenResolution"]["x","320"].Text); int h = Convert.ToInt32(GBProperties.Properties["window"]["screenResolution"]["y","200"].Text); int bpp = Convert.ToInt32(GBProperties.Properties["window"]["bpp","16"].Text); GraphicsMode gMode = new GraphicsMode(new ColorFormat(bpp)); GBInfo.WriteLine("Creating window with: "); GBInfo.WriteLine("w: "+w+" h: "+h); GBInfo.WriteLine("Graphics Mode: "+gMode); GBWindow ret = new GBWindow(w, h, gMode, "GameBox"); PostProperties(ret); return ret; }
private static void PostProperties(GBWindow ret) { GBInfo.WriteLine("Created window with: "); GBInfo.WriteLine("w: "+ret.Width+" h: "+ret.Height); GBInfo.WriteLine("WindowInfo: "+ret.WindowInfo); GBInfo.WriteLine("GraphicsMode: "+ret.Context.GraphicsMode); }