From dc47de3d1de416124de9d836b6d7cb785268893a Mon Sep 17 00:00:00 2001 From: Andre Weissflog Date: Mon, 29 Jul 2019 20:47:00 +0200 Subject: sokol_app.h d3d11: use BGRA8 pixelformat for swapchain --- sokol_app.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sokol_app.h') diff --git a/sokol_app.h b/sokol_app.h index a545d464..a7a94641 100644 --- a/sokol_app.h +++ b/sokol_app.h @@ -3496,7 +3496,7 @@ _SOKOL_PRIVATE void _sapp_d3d11_create_device_and_swapchain(void) { DXGI_SWAP_CHAIN_DESC* sc_desc = &_sapp_dxgi_swap_chain_desc; sc_desc->BufferDesc.Width = _sapp.framebuffer_width; sc_desc->BufferDesc.Height = _sapp.framebuffer_height; - sc_desc->BufferDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM; + sc_desc->BufferDesc.Format = DXGI_FORMAT_B8G8R8A8_UNORM; sc_desc->BufferDesc.RefreshRate.Numerator = 60; sc_desc->BufferDesc.RefreshRate.Denominator = 1; sc_desc->OutputWindow = _sapp_win32_hwnd; @@ -3506,7 +3506,7 @@ _SOKOL_PRIVATE void _sapp_d3d11_create_device_and_swapchain(void) { sc_desc->SampleDesc.Count = _sapp.sample_count; sc_desc->SampleDesc.Quality = _sapp.sample_count > 1 ? D3D11_STANDARD_MULTISAMPLE_PATTERN : 0; sc_desc->BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT; - int create_flags = D3D11_CREATE_DEVICE_SINGLETHREADED; + int create_flags = D3D11_CREATE_DEVICE_SINGLETHREADED | D3D11_CREATE_DEVICE_BGRA_SUPPORT; #if defined(SOKOL_DEBUG) create_flags |= D3D11_CREATE_DEVICE_DEBUG; #endif -- cgit v1.2.3