Esempio n. 1
0
        private void CoreInitialize(
            DeviceManager manager,
            ID3D12Device *device,
            IDXGISwapChain3 *swapChain,
            GraphicalConfiguration config,
            ScreenData screenData
            )
        {
            _resourceCount = config.BufferCount;
            _resourceIndex = swapChain->GetCurrentBackBufferIndex();
            _allocator     = manager.Allocator;

            CreateRtvAndDsvResources(swapChain, config, screenData);
            CreateRtvAndDsvDescriptorHeaps(device, config);
            CreateRtvAndDsvViews(device, config);
        }
Esempio n. 2
0
        internal static void Initialize(
            DeviceManager manager,
            ID3D12Device *device,
            IDXGISwapChain3 *swapChain,
            GraphicalConfiguration config,
            ScreenData screenData
            )
        {
            // TODO could probably use CAS/System.Threading.LazyInitializer
            lock (Lock)
            {
                Debug.Assert(!_initialized);

                _initialized = true;
                Value.CoreInitialize(manager, device, swapChain, config, screenData);
            }
        }