Sparky icon indicating copy to clipboard operation
Sparky copied to clipboard

Deleting shader!

Open ghost opened this issue 10 years ago • 1 comments
trafficstars

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

ghost avatar Jun 21 '15 21:06 ghost

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.

Shimmen avatar Jan 11 '16 16:01 Shimmen