Modern GLSL style

I would like to see support for #include too. this means you must be able to specify a callback function to be called on each #include which will fetch the included file’s text to the GLSL compiler.

There is http://www.opengl.org/registry/specs/ARB/shading_language_include.txt, though the developer is responsible for loading the include files themselves and linking the file to the contents in GL. I haven’t used it myself though, as we have a preprocessor class in our project.

@ Dark Photon: that would do, yes. I don’t mind that way or the other, just want to be able to use includes :slight_smile:

@ malexander: ARB_shading_language_include would be good enough too, only if it was actually supported…
that reminds me to update my drivers…

You’re right, ARB_shading_language_include is supported in the Nvidia 295 driver I’m using but not AMD Catalyst 12.6 on my other system, making it difficult to recommend as a general solution.

Ah! Right! Forgot about that for some reason. Thanks for the correction. Not universally supported though. Same here on the preprocessor - handles that and the sprintfing.