work fine.
Result : Click Here
PNG File : Click Here
src/game/client/components/mapimages.cpp
int CMapImages::GetBackground()
{
if(m_BackgroundTexture == -1)
{
m_BackgroundTexture = Graphics()->LoadTexture("background.png", IStorage::TYPE_ALL, CImageInfo::FORMAT_AUTO, 0);
if(m_BackgroundTexture == -1)
m_BackgroundTexture = -2;
}
if(m_BackgroundTexture == -2){
return -1;
}
return m_BackgroundTexture;
}
CMapImages::CMapImages()
m_BackgroundTexture = -1;
src/game/client/components/mapimages.h
public:
private:
src/game/client/gameclient.cpp
void CGameClient::OnRender()
// load background
int bgImage = m_pClient->m_pMapimages->GetBackground();
// draw background
if(g_Config.m_ClOverlayEntities == 100 && bgImage != -1){
CUIRect View = *UI()->Screen();
IGraphics::CQuadItem QuadItem(0, 0, View.w, View.h);
Graphics()->TextureSet(bgImage);
Graphics()->BlendNormal();
Graphics()->QuadsBegin();
Graphics()->QuadsDrawTL(&QuadItem, 1);
Graphics()->QuadsEnd();
}