
GetD3DDevice: Returns the Direct3D device. GetOutputSize: Returns the output size of the presentation window associated with the device. Present: Presents the current backbuffer and swaps buffers.įor Xbox One DirectX 11.X "fast semantics", there is also a Prepare method which must be called at the start of a rendering frame before clearing the render target. HandleDeviceLost, RegisterDeviceNotify: Device removed (a.k.a.

WindowSizeChanged: Sets a new width/height for the window which calls CreateWindowSizeDependentResources again if the size is different. SetWindow: Sets the native window handle and initial width/height.

This function can be called more than once. MethodsĬreateDeviceResources: Creates the device.ĬreateWindowSizeDependentResources: Creates the resources that depend on the windows size. The flags parameter is covered below in Device Options. You can specify a higher hardware level if you want to take a hard dependency on additional capabilities.
#GAMMA CONTROL DIRECTX 11 PC#
The minFeatureLevel defaults to 10 for PC and 9.3 for UWP. Larger numbers would be quite unusual and are not recommended. The backBufferCount defaults to 2, but in some cases you may want to override it to use 3. It usually defaults to DXGI_FORMAT_D32_FORMAT, but for UWP it defaults to D24_UNORM_S8_UINT to support 9.x Direct3D hardware feature levels. If depthBufferFormat is set to DXGI_FORMAT_UNKNOWN, then no depth/stencil buffer is created. You can provide specific values to change them as needed. The DeviceResources constructor takes a number of defaulted parameters to control backBufferFormat, depthBufferFormat, backBufferCount, minFeatureLevel, and option flags. Create windows-size dependent resourcdes M_deviceResources-> CreateWindowSizeDependentResources() M_deviceResources-> CreateDeviceResources() M_deviceResources-> SetWindow(window, width, height)

Void Game::Initialize(HWND window, int width, int height) M_deviceResources-> RegisterDeviceNotify( this)
