private static void RenderQuad(float x, float y, float z, float width, float height, int offset, int count)
{
if (_currentVao != _vao)
BindSquare();
if (_texCoordsChanged)
BindTextureCoords();
int uModelLocation = _currentShader.GetUniformLocation("uModel");
Matrix4 matrix = Matrix4.CreateScale(width, height, 0) * Matrix4.CreateTranslation(x, y, z);
GL.UniformMatrix4(uModelLocation, true, ref matrix);
if (_worldMatrixChanged)
{
int uWorldLocation = _currentShader.GetUniformLocation("uWorld");
Matrix4 worldMatrix = _worldMatrixStack.Count > 0 ? (Matrix4)_worldMatrixStack.Peek() : _worldMatrix;
GL.UniformMatrix4(uWorldLocation, true, ref worldMatrix);
}
GL.DrawElements(PrimitiveType.Polygon, count, DrawElementsType.UnsignedInt, offset * sizeof(uint));
}