mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-09 09:38:19 +00:00
Remove unused return value of IGraphics::UnloadTexture
function
This commit is contained in:
parent
da8ec6bed9
commit
273f3e5bfa
|
@ -288,17 +288,16 @@ void CGraphics_Threaded::FreeTextureIndex(CTextureHandle *pIndex)
|
||||||
pIndex->Invalidate();
|
pIndex->Invalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
int CGraphics_Threaded::UnloadTexture(CTextureHandle *pIndex)
|
void CGraphics_Threaded::UnloadTexture(CTextureHandle *pIndex)
|
||||||
{
|
{
|
||||||
if(pIndex->IsNullTexture() || !pIndex->IsValid())
|
if(pIndex->IsNullTexture() || !pIndex->IsValid())
|
||||||
return 0;
|
return;
|
||||||
|
|
||||||
CCommandBuffer::SCommand_Texture_Destroy Cmd;
|
CCommandBuffer::SCommand_Texture_Destroy Cmd;
|
||||||
Cmd.m_Slot = pIndex->Id();
|
Cmd.m_Slot = pIndex->Id();
|
||||||
AddCmd(Cmd);
|
AddCmd(Cmd);
|
||||||
|
|
||||||
FreeTextureIndex(pIndex);
|
FreeTextureIndex(pIndex);
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool ConvertToRGBA(uint8_t *pDest, const CImageInfo &SrcImage)
|
static bool ConvertToRGBA(uint8_t *pDest, const CImageInfo &SrcImage)
|
||||||
|
|
|
@ -946,7 +946,7 @@ public:
|
||||||
|
|
||||||
IGraphics::CTextureHandle FindFreeTextureIndex();
|
IGraphics::CTextureHandle FindFreeTextureIndex();
|
||||||
void FreeTextureIndex(CTextureHandle *pIndex);
|
void FreeTextureIndex(CTextureHandle *pIndex);
|
||||||
int UnloadTexture(IGraphics::CTextureHandle *pIndex) override;
|
void UnloadTexture(IGraphics::CTextureHandle *pIndex) override;
|
||||||
IGraphics::CTextureHandle LoadTextureRaw(const CImageInfo &Image, int Flags, const char *pTexName = nullptr) override;
|
IGraphics::CTextureHandle LoadTextureRaw(const CImageInfo &Image, int Flags, const char *pTexName = nullptr) override;
|
||||||
IGraphics::CTextureHandle LoadTextureRawMove(CImageInfo &Image, int Flags, const char *pTexName = nullptr) override;
|
IGraphics::CTextureHandle LoadTextureRawMove(CImageInfo &Image, int Flags, const char *pTexName = nullptr) override;
|
||||||
|
|
||||||
|
|
|
@ -340,7 +340,7 @@ public:
|
||||||
// destination width must be equal to the subwidth of the source
|
// destination width must be equal to the subwidth of the source
|
||||||
virtual void CopyTextureFromTextureBufferSub(uint8_t *pDestBuffer, size_t DestWidth, size_t DestHeight, const CImageInfo &SourceImage, size_t SrcSubOffsetX, size_t SrcSubOffsetY, size_t SrcSubCopyWidth, size_t SrcSubCopyHeight) = 0;
|
virtual void CopyTextureFromTextureBufferSub(uint8_t *pDestBuffer, size_t DestWidth, size_t DestHeight, const CImageInfo &SourceImage, size_t SrcSubOffsetX, size_t SrcSubOffsetY, size_t SrcSubCopyWidth, size_t SrcSubCopyHeight) = 0;
|
||||||
|
|
||||||
virtual int UnloadTexture(CTextureHandle *pIndex) = 0;
|
virtual void UnloadTexture(CTextureHandle *pIndex) = 0;
|
||||||
virtual CTextureHandle LoadTextureRaw(const CImageInfo &Image, int Flags, const char *pTexName = nullptr) = 0;
|
virtual CTextureHandle LoadTextureRaw(const CImageInfo &Image, int Flags, const char *pTexName = nullptr) = 0;
|
||||||
virtual CTextureHandle LoadTextureRawMove(CImageInfo &Image, int Flags, const char *pTexName = nullptr) = 0;
|
virtual CTextureHandle LoadTextureRawMove(CImageInfo &Image, int Flags, const char *pTexName = nullptr) = 0;
|
||||||
virtual CTextureHandle LoadTexture(const char *pFilename, int StorageType, int Flags = 0) = 0;
|
virtual CTextureHandle LoadTexture(const char *pFilename, int StorageType, int Flags = 0) = 0;
|
||||||
|
|
Loading…
Reference in a new issue