internal void Dispose() { if (!PreviousTexture.HasValue) { return; } MonoGame.OpenGL.GL.BindTexture(TextureTarget.Texture2D, PreviousTexture.Value); GLExt.CheckError(); }
internal RebindTexture(int texture) { var currentTexture = GraphicsExtensions.GetBoundTexture2D(); if (texture == currentTexture) { PreviousTexture = null; } else { PreviousTexture = currentTexture; MonoGame.OpenGL.GL.BindTexture(TextureTarget.Texture2D, texture); GLExt.CheckError(); } }