| 367 | } |
| 368 | |
| 369 | void TriTextureParameter::CacheTexture() |
| 370 | { |
| 371 | auto resource = GetResource(); |
| 372 | if( const Tr2TextureAL* tex = ( resource ? resource->GetTexture() : nullptr ) ) |
| 373 | { |
| 374 | m_cachedTexture = *tex; |
| 375 | } |
| 376 | else |
| 377 | { |
| 378 | m_cachedTexture = Tr2Renderer::GetFallbackTexture( m_resourceType, m_name.c_str() ); |
| 379 | } |
| 380 | m_cachedSrvIndex[0] = m_cachedTexture.GetSrvIndexInHeap( Tr2RenderContextEnum::COLOR_SPACE_LINEAR ); |
| 381 | m_cachedSrvIndex[1] = m_cachedTexture.GetSrvIndexInHeap( Tr2RenderContextEnum::COLOR_SPACE_SRGB ); |
| 382 | } |
| 383 | |
| 384 | void TriTextureParameter::OnTextureChanged() |
| 385 | { |
nothing calls this directly
no test coverage detected