I recently added shader support for my little OpenGL engine.
I’m wondering why you can attach more than one shader of the same type (fragment or vertex) to a program?
I tried to code a function in a fragment shader and then use that function in the shader wich defines the main() method (both shaders are attached to same program, of course), but it gave me an error. How can I use a shader’s function from another? (sort of C #include)