MCPcopy Create free account
hub / github.com/DiligentGraphics/DiligentFX / GetGraphicsDesc

Method GetGraphicsDesc

Hydrogent/src/HnRenderPass.cpp:219–249  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

217};
218
219GraphicsPipelineDesc HnRenderPass::GetGraphicsDesc(const HnRenderPassState& RPState) const
220{
221 GraphicsPipelineDesc GraphicsDesc = RPState.GetGraphicsPipelineDesc();
222 if ((m_Params.UsdPsoFlags & USD_Renderer::USD_PSO_FLAG_ENABLE_ALL_OUTPUTS) == 0)
223 {
224 for (Uint32 i = 0; i < GraphicsDesc.NumRenderTargets; ++i)
225 GraphicsDesc.RTVFormats[i] = TEX_FORMAT_UNKNOWN;
226 GraphicsDesc.NumRenderTargets = 0;
227 }
228
229 switch (m_RenderMode)
230 {
231 case HN_RENDER_MODE_SOLID:
232 GraphicsDesc.PrimitiveTopology = PRIMITIVE_TOPOLOGY_TRIANGLE_LIST;
233 break;
234
235 case HN_RENDER_MODE_MESH_EDGES:
236 GraphicsDesc.PrimitiveTopology = PRIMITIVE_TOPOLOGY_LINE_LIST;
237 break;
238
239 case HN_RENDER_MODE_POINTS:
240 GraphicsDesc.PrimitiveTopology = PRIMITIVE_TOPOLOGY_POINT_LIST;
241 break;
242
243 default:
244 UNEXPECTED("Unexpected render mode");
245 }
246 static_assert(HN_RENDER_MODE_COUNT == 3, "Please handle the new render mode in the switch above");
247
248 return GraphicsDesc;
249}
250
251void HnRenderPass::_Execute(const pxr::HdRenderPassStateSharedPtr& RPState,
252 const pxr::TfTokenVector& Tags)

Callers 1

Calls 1

Tested by

no test coverage detected