ATOM-15935 Adding draw to pass support to DynamicDrawContext (#2248)
The DynamicDrawContext can output to different scopes: Scene, RenderPipeline or RasterPass. Updated RasterPass so it can handle not only draw calls from Views but also from DynamicDrawContexts.
This commit is contained in:
@@ -83,7 +83,7 @@ namespace AZ::AtomBridge
|
||||
ViewportData& viewportData = m_viewportData[viewportId];
|
||||
for (auto& context : viewportData.m_dynamicDrawContexts)
|
||||
{
|
||||
context.second->SetRenderPipeline(pipeline.get());
|
||||
context.second->SetOutputScope(pipeline.get());
|
||||
}
|
||||
});
|
||||
viewportData.m_viewportDestroyedHandler = AZ::Event<AzFramework::ViewportId>::Handler([this, viewportId](AzFramework::ViewportId id)
|
||||
@@ -106,7 +106,8 @@ namespace AZ::AtomBridge
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
context = RPI::DynamicDrawInterface::Get()->CreateDynamicDrawContext(pipeline);
|
||||
context = RPI::DynamicDrawInterface::Get()->CreateDynamicDrawContext();
|
||||
context->SetOutputScope(pipeline);
|
||||
contextFactoryIt->second(context);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user