Q:

Can we delete vertex and fragment shaders after link shader program

As title said, Can I do this in my program:
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? */
/* ... */

A:

Yes, this perfectly valid. Shader objects are still internally referenced by the program object and will be implicitly freed when the program object is deleted.

