public virtual void Dispose() { if (font != null) { font.Dispose(); } if (colorFBO != null) { colorFBO.Dispose(); } if (depthFBO != null) { depthFBO.Dispose(); } if (skybox != null) { skybox.Dispose(); } skybox = null; colorFBO = null; depthFBO = null; font = null; world = null; Node.ObjectCount = 0; GLSLShader.UnBindShader(); GLSLShader.SetShader("default.shader", ""); }
void Loading() { GL.Clear(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit); try { BitmapFont font = BitmapFont.Load("fonts/comic12.png"); Texture.UnBind(0); Camera.Set2D(); font.Write("Loading...", 0, 0); font.Dispose(); Texture.UnBind(0); } catch (Exception) { } SwapBuffers(); }