Пример #1
0
 public Forgottenvoxels()
     : base()
 {
     instance = this;
     mouse = Mouse;
     keyboard = Keyboard;
     string versionOpenGL = GL.GetString(StringName.Version);
     Console.WriteLine("OpenGL Version: {0}.{1}", versionOpenGL[0],versionOpenGL[2]);
 }
Пример #2
0
        private static void RunGame()
        {
            bool forceClosed = false;

            using (Forgottenvoxels voxels = new Forgottenvoxels()) {
                try {
                    voxels.Width = 1280;
                    voxels.Height = 720;
                    voxels.VSync = VSyncMode.Off;
                    voxels.Run (60.0);
                } catch (VoxelsException e) {
                    Console.WriteLine (e.Message);
                    Console.WriteLine (e.Source);
                    forceClosed = true;
                }
                if (forceClosed) {
                    while (true)
                        ;
                }
            }
        }