Re: [AD] GLSL #version

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Maybe al_attach_shader_source could append to the existing source. So this would be valid:

al_attach_shader_source("#version 110");
al_attach_shader_source(shader_source);

On Jan 8, 2014 9:04 PM, "Trent Gamblin" <nooskewl@xxxxxxxxxx> wrote:
I think I'd prefer that over a "magic main" type macro, but that's just my
vote.

Thanks,
Trent

-----Original Message-----
From: SiegeLord [mailto:slabode@xxxxxxxxxx]
Sent: January 8, 2014 12:25 PM
To: alleg-developers@xxxxxxxxxx
Subject: Re: [AD] GLSL #version

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

----------------------------------------------------------------------------
--
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics
Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
--
https://lists.sourceforge.net/lists/listinfo/alleg-developers


------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
--
https://lists.sourceforge.net/lists/listinfo/alleg-developers


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/