Illation/ETEngine

Font buffer size is being calculated incorrectly

ajweeks opened this issue · 1 comments

I believe the following lines should not take into account the number of elements in the TextVertex struct, but rather simply store the current number of tVerts.

pFont->m_BufferStart = (int32)tVerts.size() *(sizeof(TextVertex) / sizeof(float));

pFont->m_BufferSize = (int32)(tVerts.size()) * (sizeof(TextVertex) / sizeof(float)) - pFont->m_BufferStart;

E.g, the correct code would be

pFont->m_BufferStart = (int32)tVerts.size();

and

pFont->m_BufferSize = ((int32)tVerts.size()) - pFont->m_BufferStart;

The old text renderer was removed in favour of GUI rendering through RmlUI and imgui