Changeset View
Changeset View
Standalone View
Standalone View
source/gui/CGUISprite.cpp
Show All 24 Lines | for (SGUIImage* const& img : m_Images) | ||||
delete img; | delete img; | ||||
} | } | ||||
void CGUISprite::AddImage(SGUIImage* image) | void CGUISprite::AddImage(SGUIImage* image) | ||||
{ | { | ||||
m_Images.push_back(image); | m_Images.push_back(image); | ||||
} | } | ||||
void CGUISpriteInstance::Draw(CRect Size, int CellID, std::map<CStr, CGUISprite*>& Sprites, float Z) const | void CGUISpriteInstance::Draw(const CGUI* guiPage, CRect Size, int CellID, std::map<CStr, CGUISprite*>& Sprites, float Z) const | ||||
{ | { | ||||
if (m_CachedSize != Size || m_CachedCellID != CellID) | if (m_CachedSize != Size || m_CachedCellID != CellID) | ||||
{ | { | ||||
GUIRenderer::UpdateDrawCallCache(m_DrawCallCache, m_SpriteName, Size, CellID, Sprites); | GUIRenderer::UpdateDrawCallCache(guiPage, m_DrawCallCache, m_SpriteName, Size, CellID, Sprites); | ||||
m_CachedSize = Size; | m_CachedSize = Size; | ||||
m_CachedCellID = CellID; | m_CachedCellID = CellID; | ||||
} | } | ||||
GUIRenderer::Draw(m_DrawCallCache, Z); | GUIRenderer::Draw(m_DrawCallCache, Z); | ||||
} | } | ||||
void CGUISpriteInstance::Invalidate() | void CGUISpriteInstance::Invalidate() | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 41 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator