/// <summary> /// Binds a texture to darw with. /// </summary> /// <param name="textureId"></param> public static void BindTexture(int textureId) { if (lastBoundTexture != textureId) { lastActiveBatch?.Draw(); GL.BindTexture(TextureTarget.Texture2D, textureId); lastBoundTexture = textureId; } }
internal static void FlushCurrentBatch() { lastActiveBatch?.Draw(); }