| 436 | } |
| 437 | |
| 438 | IGraphics::CTextureHandle CGraphics_Threaded::LoadTextureRawMove(CImageInfo &Image, int Flags, const char *pTexName) |
| 439 | { |
| 440 | if(Image.m_Format != CImageInfo::FORMAT_RGBA) |
| 441 | { |
| 442 | // Moving not possible, texture needs to be converted |
| 443 | IGraphics::CTextureHandle TextureHandle = LoadTextureRaw(Image, Flags, pTexName); |
| 444 | Image.Free(); |
| 445 | return TextureHandle; |
| 446 | } |
| 447 | |
| 448 | LoadTextureAddWarning(Image.m_Width, Image.m_Height, Flags, pTexName); |
| 449 | |
| 450 | if(Image.m_Width == 0 || Image.m_Height == 0) |
| 451 | return IGraphics::CTextureHandle(); |
| 452 | |
| 453 | IGraphics::CTextureHandle TextureHandle = FindFreeTextureIndex(); |
| 454 | CCommandBuffer::SCommand_Texture_Create Cmd = LoadTextureCreateCommand(TextureHandle.Id(), Image.m_Width, Image.m_Height, Flags); |
| 455 | Cmd.m_pData = Image.m_pData; |
| 456 | Image.m_pData = nullptr; |
| 457 | Image.Free(); |
| 458 | AddCmd(Cmd); |
| 459 | |
| 460 | return TextureHandle; |
| 461 | } |
| 462 | |
| 463 | IGraphics::CTextureHandle CGraphics_Threaded::LoadTexture(const char *pFilename, int StorageType, int Flags) |
| 464 | { |
no test coverage detected