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

Deleting shader! #39

Open
ghost opened this issue Jun 21, 2015 · 1 comment
Open

Deleting shader! #39

ghost opened this issue Jun 21, 2015 · 1 comment

Comments

@ghost
Copy link

ghost commented Jun 21, 2015

When you load the vertex and fragment shader you try to delete them but they never(Until you close the window) are going to be deleted because they need to be detached first from the program.

Source: Stackoverflow

@Shimmen
Copy link

Shimmen commented Jan 11, 2016

This is true, but should be an easy fix. Before this line, simply append:

glDetachShader(program, vertex);
glDetachShader(program, fragment);

This must be done since deleting a shader doesn't automatically detach it from the program (as described here).

I could create a pull request if it would be appreciated.

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

1 participant