public virtual void Init() { Globals.dedicated = Cvar.Get("dedicated", "0", Qcommon.CVAR_NOSET); Program.Q2Dialog = new Q2DataDialog(); Locale.SetDefault(Locale.US); Program.Q2Dialog.SetVisible(true); string DRIVER = "lwjgl"; Qcommon.Init(new string { "DancingQueens", "+set", "gl_mode", "4", "+set", "vid_fullscreen", "0", "+set", "vid_ref", DRIVER }); VID.Shutdown(); String[] names = Renderer.GetDriverNames(); System.Diagnostics.Debug.WriteLine("Registered Drivers: " + Arrays.AsList(names)); this.re = Renderer.GetDriver(DRIVER); Globals.re = this.re; System.Diagnostics.Debug.WriteLine("Use driver: " + re); System.out_renamed.Flush(); re.Init(0, 0); kbd = re.GetKeyboardHandler(); kbd.Init(); Cbuf.AddText("unbind t"); Cbuf.Execute(); Cmd.AddCommand("togglemouse", togglemouse); Cbuf.AddText("bind t togglemouse"); Cbuf.Execute(); Globals.cls.key_dest = Defines.key_game; Globals.cls.state = Defines.ca_active; viddef = Globals.viddef; fov_y = Math3D.CalcFov(fov_x, viddef.GetWidth(), viddef.GetHeight()); }
public virtual void Init() { Globals.dedicated = Cvar.Get("dedicated", "0", Qcommon.CVAR_NOSET); Program.Q2Dialog = new Q2DataDialog(); Locale.SetDefault(Locale.US); Program.Q2Dialog.SetVisible(true); string DRIVER = "jsr231"; Qcommon.Init(new string [] { "TestRenderer", "+set", "gl_mode", "6", "+set", "vid_fullscreen", "0", "+set", "vid_ref", DRIVER }); VID.Shutdown(); String[] names = Renderer.GetDriverNames(); System.Diagnostics.Debug.WriteLine("Registered Drivers: " + Arrays.AsList(names)); this.re = Renderer.GetDriver(DRIVER); Globals.re = this.re; System.Diagnostics.Debug.WriteLine("Use driver: " + re); System.out_renamed.Flush(); re.Init(0, 0); kbd = re.GetKeyboardHandler(); kbd.Init(); Cmd.AddCommand("nexttest", nexttest); Cbuf.AddText("bind n nexttest"); Cbuf.Execute(); Globals.cls.key_dest = Defines.key_game; Globals.cls.state = Defines.ca_active; }
public virtual void Run() { startTime = System.CurrentTimeMillis(); while (true) { re.UpdateScreen(null); re.GetKeyboardHandler().Update(); } }
public virtual void Run() { startTime = System.CurrentTimeMillis(); xcommand_t callback = new Anonymousxcommand_t(this); while (true) { re.UpdateScreen(callback); re.GetKeyboardHandler().Update(); Cbuf.Execute(); } }