Work on D3D11 for various state settings. This code sucks. Needs a rewrite.

This commit is contained in:
Ben Vanik
2014-01-18 01:50:31 -08:00
parent a7db0f0410
commit c257ad0122
9 changed files with 435 additions and 65 deletions

View File

@@ -137,7 +137,8 @@ void D3D11GraphicsSystem::Initialize() {
// This runs in the worker thread and builds command lines to present
// in the window.
XEASSERTNULL(driver_);
driver_ = new D3D11GraphicsDriver(memory_, device_);
driver_ = new D3D11GraphicsDriver(
memory_, window_->swap_chain(), device_);
// Initial vsync kick.
DispatchInterruptCallback(0);
@@ -147,6 +148,9 @@ void D3D11GraphicsSystem::Pump() {
if (swap_pending_) {
swap_pending_ = false;
// TODO(benvanik): remove this when commands are understood.
driver_->Resolve();
// Swap window.
// If we are set to vsync this will block.
window_->Swap();