Re: [AD] GLSL #version |
[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]
On 01/08/2014 02:06 PM, Trent Gamblin wrote:
al_attach_glsl_shader_source_file(filename, version) or similar. Thanks, Trent
This is essentially the solution used with OpenGL. It'd look something like this:
al_attach_shader_source_file(ALLEGRO_SHADER *shader, ALLEGRO_SHADER_TYPE type, const char *prefix, const char *filename);
I suppose that is one solution.I looked briefly into auto-detecting the GLSL version at runtime and just sticking it in if it wasn't there already, but the way you'd do it requires parsing compiler-dependent strings which is too brittle, I think.
-SL
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |