GLWpfControl icon indicating copy to clipboard operation
GLWpfControl copied to clipboard

How to correct release resources?

Open MingGuys opened this issue 3 years ago • 1 comments

I release resouces like

            GL.BindBuffer(BufferTarget.ArrayBuffer, 0);
            GL.BindVertexArray(0);
            GL.UseProgram(0);

            // Delete all the resources.
            GL.DeleteBuffer(VBO);
            GL.DeleteVertexArray(VAO);
            GL.DeleteBuffer(EBO);

            GL.DeleteProgram(ActiveShader.Handle);

But this won't work.Everytime reopen the window that contains GLWpfControl.I got this exception: "An unhandled exception of type 'System.ExecutionEngineException' occurred in OpenTK.Graphics.dll".

MingGuys avatar Oct 24 '22 04:10 MingGuys

I think this issue is not because of how you release your resources. ExecutionEngineException means that something went wrong in the runtime itself, this can happen if there are missmatched versions of assemblies used or if the process is running in 32-bit mode but has some code that doesn't work in 32bit mode.

NogginBops avatar Oct 26 '23 16:10 NogginBops