コード例 #1
0
 public override void OnClose()
 {
     fontProgram.DisposeChildren = true;
     fontProgram.Dispose();
     font.FontTexture.Dispose();
     information.Dispose();
 }
コード例 #2
0
ファイル: EngineMain.cs プロジェクト: craftadria/Veloengine
 private static void OnClose()
 {
     cube.Dispose();
     cubeNormals.Dispose();
     cubeUV.Dispose();
     cubeTangents.Dispose();
     cubeTriangles.Dispose();
     brickDiffuse.Dispose();
     brickNormals.Dispose();
     program.DisposeChildren = true;
     program.Dispose();
     fontProgram.DisposeChildren = true;
     fontProgram.Dispose();
     font.FontTexture.Dispose();
     information.Dispose();
 }
コード例 #3
0
        public override void OnRenderFrame(float deltaTime)
        {
            Gl.PolygonMode(MaterialFace.FrontAndBack, PolygonMode.Fill);

            // bind the font program as well as the font texture
            Gl.UseProgram(fontProgram.ProgramID);
            Gl.BindTexture(font.FontTexture);

            // draw the tutorial information, which is static
            information.Draw();


            // BUG The VBO not disposing error seems to come from in here.
            if (ShowInfo)
            {
                FontVAO gameOverlayInfo = font.CreateString(fontProgram, GameInfo,
                                                            BMFont.Justification.Right);

                gameOverlayInfo.Position = new Vector2(Width / 2 - 10, Height / 2 - font.Height - 10);
                gameOverlayInfo.Draw();
                gameOverlayInfo.Dispose();
            }
        }