public StereoImageRenderer(DeviceContext11 deviceContext11)
     : base(deviceContext11)
 {
 }
Example #2
0
        void InitDX11()
        {
            DeviceSettings settings = new DeviceSettings
                                          {
                                              AdapterOrdinal = 0,
                                              CreationFlags = DeviceCreationFlags.Debug,
                                              ScreenWidth = 1024,
                                              ScreenHeight = 768,
                                              SampleDescription = new SampleDescription(1,0)
                                          };

            DeviceContext11 deviceContext11 = new DeviceContext11(renderPanel.Handle, settings);

            Game.Context = deviceContext11;
            Game.HookEvents();

            UIRenderer = new UIRenderer(deviceContext11);
            Game.ChangeRenderer(UIRenderer);
            OdysseyUI.SetupHooks(renderPanel);

            Toolbox.MainForm = this;
        }
Example #3
0
 public UIRenderer(DeviceContext11 deviceContext11)
     : base(deviceContext11)
 {
 }
Example #4
0
        /// <summary>
        /// Init method for Windows.Forms applications
        /// </summary>
        public static void Init()
        {
            Global.ExecutingDir = System.IO.Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
            ResourceManager.PerformIntegrityCheck();
            ResourceManager.LoadDefaultStyles();

            LogEvent.Engine.Log(Resources.INFO_OE_Starting);

            DeviceSettings deviceSettings = new DeviceSettings
                                          {
                                              AdapterOrdinal = 0,
                                              CreationFlags = DeviceCreationFlags.Debug,
                                              ScreenWidth = 1920,
                                              ScreenHeight = 1080,
                                              SampleDescription = new SampleDescription(1,0),
                                              Format = Format.R8G8B8A8_UNorm,
                                              IsStereo = false,
                                              IsWindowed = true
                                          };

            RenderForm form = new RenderForm
                                  {
                                      ClientSize = new Size(deviceSettings.ScreenWidth, deviceSettings.ScreenHeight),
                                      WindowState = FormWindowState.Maximized,
                                      Text = "Odyssey11 Demo" ,
                                  };

            form.Activated += delegate { IsInputEnabled = true; };
            Global.Form = form;
            Context = new DeviceContext11(form.Handle, deviceSettings);
            OdysseyUI.SetupHooks(form);
            HookEvents();

            LogEvent.Engine.Log(Resources.INFO_OE_Started);
            Logger.Init();
        }