OpenGL: shader connected to the program

Is there a way to access the shaders attached to the program? That is, given the program, can I do something like:

vertexShader = getVertexShaderFromProgram(program); 

(I would like to register the compilation state of the shaders in my function, which checks my program, but I only save the link to the program, not the shaders.)

+6
source share
1 answer

EDIT . If you only need the names and types of shaders, you can stop after step 2.

+8
source

All Articles