| 432 | } |
| 433 | |
| 434 | pxr::HdSprim* HnRenderDelegate::CreateFallbackSprim(const pxr::TfToken& TypeId) |
| 435 | { |
| 436 | pxr::HdSprim* SPrim = nullptr; |
| 437 | if (TypeId == pxr::HdPrimTypeTokens->material) |
| 438 | { |
| 439 | HnMaterial* Mat = HnMaterial::CreateFallback(m_TextureRegistry, *m_USDRenderer); |
| 440 | { |
| 441 | std::lock_guard<std::mutex> Guard{m_MaterialsMtx}; |
| 442 | m_Materials.emplace(Mat); |
| 443 | } |
| 444 | SPrim = Mat; |
| 445 | } |
| 446 | else if (TypeId == pxr::HdPrimTypeTokens->camera || |
| 447 | TypeId == pxr::HdPrimTypeTokens->simpleLight || |
| 448 | TypeId == pxr::HdPrimTypeTokens->cylinderLight || |
| 449 | TypeId == pxr::HdPrimTypeTokens->diskLight || |
| 450 | TypeId == pxr::HdPrimTypeTokens->distantLight || |
| 451 | TypeId == pxr::HdPrimTypeTokens->rectLight || |
| 452 | TypeId == pxr::HdPrimTypeTokens->sphereLight || |
| 453 | TypeId == pxr::HdPrimTypeTokens->domeLight) |
| 454 | { |
| 455 | SPrim = nullptr; |
| 456 | } |
| 457 | else |
| 458 | { |
| 459 | UNEXPECTED("Unexpected Sprim Type: ", TypeId.GetText()); |
| 460 | } |
| 461 | return SPrim; |
| 462 | } |
| 463 | |
| 464 | void HnRenderDelegate::DestroySprim(pxr::HdSprim* SPrim) |
| 465 | { |
nothing calls this directly
no outgoing calls
no test coverage detected