In void BatchRenderer2D::flush() at line 247 you are calling glDrawElements(GL_TRIANGLES, m_IndexCount, GL_UNSIGNED_INT, NULL); however the m_IndexCount is never initialized, and so it causes glGetError() to report a 1281 Invalid value in the first iteration. To fix this you simply initialize the value to zero in the constructor.
Hi,
In
void BatchRenderer2D::flush()
at line 247 you are callingglDrawElements(GL_TRIANGLES, m_IndexCount, GL_UNSIGNED_INT, NULL);
however them_IndexCount
is never initialized, and so it causesglGetError()
to report a 1281 Invalid value in the first iteration. To fix this you simply initialize the value to zero in the constructor.Hope this helps.