GLWpfControl
GLWpfControl copied to clipboard
How to correct release resources?
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".
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.