Command to acquire swap chain texture
This commit is contained in:
@@ -82,6 +82,20 @@ void Win32EditorApplication::Update()
|
||||
// Draw here for now
|
||||
// 1) Acquire a Command Buffer
|
||||
CommandList* cmdList = AcquireCommandList(GraphicsDevice, QueueType::Graphics);
|
||||
if (cmdList == nullptr)
|
||||
{
|
||||
Log(LogLevel::Error, LogCategory::Editor, "Failed to acquire command list.");
|
||||
Running = false;
|
||||
return;
|
||||
}
|
||||
|
||||
Texture* swapChainTexture = nullptr;
|
||||
if (!AcquireSwapChainTexture(cmdList, MainWindow, &swapChainTexture))
|
||||
{
|
||||
Log(LogLevel::Error, LogCategory::Editor, "Failed to acquire swapchain texture.");
|
||||
Running = false;
|
||||
return;
|
||||
}
|
||||
|
||||
// Submit Commands
|
||||
SubmitCommandLists(GraphicsDevice);
|
||||
|
||||
Reference in New Issue
Block a user