Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to correct release resources? #96

Open
MingGuys opened this issue Oct 24, 2022 · 1 comment
Open

How to correct release resources? #96

MingGuys opened this issue Oct 24, 2022 · 1 comment

Comments

@MingGuys
Copy link

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".

@NogginBops
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants