後如題所說,我能做到這一點在我的計劃:我們可以刪除頂點和片段着色器鏈接着色器程序
vertex = glCreateShader(GL_VERTEX_SHADER);
/* ... */
fragment = glCreateShader(GL_FRAGMENT_SHADER);
/* ... */
program = glCreateProgram();
glAttachShader(program, vertex);
glAttachShader(program, fragment);
glLinkProgram(program);
/* All things done */
glDeleteShader(vertex); /* <~ Can I do this now? */
glDeleteShader(vertex); /* <~ Can I do this now? */
/* And in render procedure */
glUseProgram(program); /* <~ Still use program without any problem? */
/* ... */
[正確的方法來刪除GLSL着色器?](http://stackoverflow.com/questions/9113154/proper-way-to-delete-glsl-shader) – 2013-02-10 19:06:22