Re: [AD] Some more thoughts on the shader API |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
- To: Coordination of admins/developers of the game programming library Allegro <alleg-developers@xxxxxxxxxx>
- Subject: Re: [AD] Some more thoughts on the shader API
- From: Peter Wang <novalazy@xxxxxxxxxx>
- Date: Thu, 7 Mar 2013 08:33:08 +1100
On Mon, 4 Mar 2013 08:51:50 +1100, Peter Wang <novalazy@xxxxxxxxxx> wrote:
> On Sun, 03 Mar 2013 16:14:12 -0500, SiegeLord <slabode@xxxxxxxxxx> wrote:
> > So after trying to use the current API some more while working on the
> > examples I had some other ideas about simplifying it. One thing I
> > noticed was that the default shaders were just very verbose to use.
> > Firstly, you had to include both allegro_hlsl.h and allegro_glsl.h. Then
> > you had to switch based on the shader platform so you could use the
> > appropriate functions. I really didn't see a point behind making it this
> > annoying to use the default shaders, so how about this API instead:
> >
> > No more allegro_glsl.h and allegro_hlsl.h, instead these two functions
> > are added to shader.h:
> >
> > const char* al_get_default_vertex_shader(ALLEGRO_SHADER_PLATFORM platform);
> > const char* al_get_default_pixel_shader(ALLEGRO_SHADER_PLATFORM platform);
>
> No objections from me, I was just thinking that.
> You saved me some work on al_get_shader_platform, too :)
Actually, I think it should be:
char const *al_get_default_shader_source(
ALLEGRO_SHADER_PLATFORM platform,
ALLEGRO_SHADER_TYPE type);
Peter