示例#1
0
        void Closing()
        {
            brickTexture.Dispose();
            mossTexture.Dispose();

            shaderProgramTextured.Dispose();
            shaderProgramColored.Dispose();
            shaderProgram.Dispose();

            vb1.Dispose();
            vb2.Dispose();
            vb3.Dispose();

            renderer.Dispose();
        }
示例#2
0
 private void CheckShaderReload()
 {
     if (!needShaderReload)
     {
         return;
     }
     needShaderReload = false;
     try
     {
         if (!ReferenceEquals(defaultShader, shader))
         {
             shader.Dispose();
         }
         shader    = ShaderLoader.CreateFromStrings(DefaultShaderSourceCode.Quad, ShaderSourceCode);
         ShaderLog = string.Empty;
     }
     catch (ShaderException e)
     {
         ShaderLog = e.Message;
         shader    = defaultShader;
     }
     uniformSetters.Clear();             //uniform locations may have changed, so old setters are invalid
 }
示例#3
0
 /// <summary>
 /// Will be called from the default Dispose method.
 /// </summary>
 protected override void DisposeResources()
 {
     shaderProgram.Dispose();
 }
示例#4
0
 public void Dispose()
 {
     capi.Render.DeleteMesh(quadRef);
     overlayShaderProg.Dispose();
 }
示例#5
0
 public void Dispose()
 {
     capi.Render.DeleteMesh(quadRef);
     exitHelpTexture?.Dispose();
     eyeShaderProg.Dispose();
 }
示例#6
0
 public void Dispose()
 {
     capi?.Event.UnregisterRenderer(this, EnumRenderStage.Ortho);
     prog?.Dispose();
     quadRef?.Dispose();
 }