Re: [AD] Some more thoughts on the shader API

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


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 :)

Peter




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