I need to be able to load and build a GL shader from a .frag file containing the source for the shader. Since the shader will be provided post-compilation, I cannot use the currently accepted method that utilizes annotations.
However the code for this annotation appears to include a bunch of preprocessing that includes adding fields to the class.
Can these steps only be performed at compile time? Should this function’s code be split off into a utility function so that it can be called at runtime? Is there already a way of doing this that I don’t know of?