| 390 | } |
| 391 | |
| 392 | void Tr2AtlasTexture::UnlockBuffer() |
| 393 | { |
| 394 | if( !m_isLocked ) |
| 395 | { |
| 396 | CCP_LOGWARN( "Tr2AtlasTexture::UnlockBuffer failed - texture is not locked" ); |
| 397 | return; |
| 398 | } |
| 399 | |
| 400 | USE_MAIN_THREAD_RENDER_CONTEXT(); |
| 401 | |
| 402 | Tr2TextureAL* texture = nullptr; |
| 403 | if( m_textureAtlas && m_atlasArea ) |
| 404 | { |
| 405 | texture = m_textureAtlas->GetTexture(); |
| 406 | } |
| 407 | else if( m_texture.IsValid() ) |
| 408 | { |
| 409 | texture = &m_texture; |
| 410 | } |
| 411 | |
| 412 | if( !texture ) |
| 413 | { |
| 414 | return; |
| 415 | } |
| 416 | |
| 417 | texture->UnmapForWriting( renderContext ); |
| 418 | |
| 419 | m_isLocked = false; |
| 420 | SetGood( true ); |
| 421 | |
| 422 | NotifyListenersOfChange(); |
| 423 | } |
| 424 | |
| 425 | bool Tr2AtlasTexture::IsMemoryUsageKnown() |
| 426 | { |
no test coverage detected