Put assert for text containers after printing all non empty text containers

This commit is contained in:
Jupeyy 2022-05-18 18:23:02 +02:00
parent 53d77e86b2
commit a7bc8781a9

View file

@ -1904,15 +1904,18 @@ public:
void OnWindowResize() override
{
bool HasNonEmptyTextContainer = false;
for(auto *pTextContainer : m_TextContainers)
{
if(pTextContainer->m_StringInfo.m_QuadBufferContainerIndex != -1)
{
dbg_msg("textrender", "Found non empty text container with index %d", pTextContainer->m_StringInfo.m_QuadBufferContainerIndex);
dbg_assert(false, "text container was not empty");
dbg_msg("textrender", "Found non empty text container with index %d with %d quads", pTextContainer->m_StringInfo.m_QuadBufferContainerIndex, (int)pTextContainer->m_StringInfo.m_QuadNum);
HasNonEmptyTextContainer = true;
}
}
dbg_assert(!HasNonEmptyTextContainer, "text container was not empty");
for(auto &pFont : m_Fonts)
{
// reset the skylines