| 461 | } |
| 462 | |
| 463 | IGraphics::CTextureHandle CGraphics_Threaded::LoadTexture(const char *pFilename, int StorageType, int Flags) |
| 464 | { |
| 465 | dbg_assert(pFilename[0] != '\0', "Cannot load texture from file with empty filename"); // would cause Valgrind to crash otherwise |
| 466 | |
| 467 | CImageInfo Image; |
| 468 | if(LoadPng(Image, pFilename, StorageType)) |
| 469 | { |
| 470 | CTextureHandle Id = LoadTextureRawMove(Image, Flags, pFilename); |
| 471 | if(Id.IsValid()) |
| 472 | { |
| 473 | if(g_Config.m_Debug) |
| 474 | log_trace("graphics/texture", "Loaded texture '%s'", pFilename); |
| 475 | return Id; |
| 476 | } |
| 477 | } |
| 478 | |
| 479 | return m_NullTexture; |
| 480 | } |
| 481 | |
| 482 | bool CGraphics_Threaded::LoadTextTextures(size_t Width, size_t Height, CTextureHandle &TextTexture, CTextureHandle &TextOutlineTexture, uint8_t *pTextData, uint8_t *pTextOutlineData) |
| 483 | { |
no test coverage detected