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

Shaders are not deleted after calling glDeleteShader. #10

Open
SandNoodle opened this issue May 10, 2022 · 1 comment
Open

Shaders are not deleted after calling glDeleteShader. #10

SandNoodle opened this issue May 10, 2022 · 1 comment

Comments

@SandNoodle
Copy link

SandNoodle commented May 10, 2022

Due to OpenGL specification glDetachShader has to be called at some point before or after glDeleteShader.

If shader has already been flagged for deletion by a call to glDeleteShader and it is not attached to any other program object, it will be deleted after it has been detached.

As far as I've checked, this bug is included in every example containing shader code.

@YourAverageFTCPerson
Copy link

Correct me if I'm wrong, but glDetachShader is the opposite of glAttachShader and the only reason why he "deletes" the shaders is because they're already attached.

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

No branches or pull requests

2 participants