#ifndef RT_DX11_GPU_HPP #define RT_DX11_GPU_HPP #include #include #include #include #include "runtime/threading.h" #include "gfx/renderer_api.h" #define RT_DX11_MAX_FRAMES_IN_FLIGHT 2 // Smart pointer for COM-Objects template using ComPtr = Microsoft::WRL::ComPtr; struct rt_swap_chain { ComPtr swap_chain; ComPtr rtv; }; struct rt_gpu { ComPtr device; ComPtr device_context; ComPtr dxgi_factory; rt_swap_chain swap_chain; rt_mutex *context_lock; D3D_FEATURE_LEVEL feature_level; D3D11_FEATURE_DATA_THREADING threading_support; }; #ifndef DONT_DEFINE_GPU_GLOBAL extern rt_gpu g_gpu; #endif DXGI_FORMAT rtConvertPixelFormat(rt_pixel_format format); #endif