x86CS.GUI.XNA.GraphicsDeviceService.CreateDevice C# (CSharp) Method

CreateDevice() public method

public CreateDevice ( ) : void
return void
        public void CreateDevice()
        {
            PresentationParameters pp = new PresentationParameters();
            pp.IsFullScreen = false;
            pp.BackBufferHeight = this.m_renderControl.Height;
            pp.BackBufferWidth = this.m_renderControl.Width;
            pp.DeviceWindowHandle = this.m_renderControl.Handle;

            this.m_graphicsDevice = new GraphicsDevice(GraphicsAdapter.DefaultAdapter, GraphicsProfile.HiDef, pp);
        }

Usage Example

Example #1
0
 public override void Init()
 {
     graphicsService = new GraphicsDeviceService(renderControl);
     graphicsService.CreateDevice();
     sprites = new SpriteBatch(graphicsService.GraphicsDevice);
 }
All Usage Examples Of x86CS.GUI.XNA.GraphicsDeviceService::CreateDevice