Re: [AD] More default shaders |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
If the shader addon gets moved into the core, something like this would still belong in an addon. Undecided on whether I even like it in an OFFICIAL addon but I wouldn't lose sleep over it.
Trent
On 2013-02-22, at 7:02 PM, SiegeLord <slabode@xxxxxxxxxx> wrote:
> I think the shaders are a very cool concept but are hard for newbies to
> start with. I think the shader addon should provide a whole slew of
> default shaders for nice effects with an easy API that doesn't leak the
> implementation details (like the current al_get_glsl_*_shader do).
> Something that would recapitulate the effects you could get in A4 using
> the blenders (see
> http://alleg.sourceforge.net/stabledocs/en/alleg020.html for a list),
> but possibly add a number of other useful ones, like blurring or glass.
>
> One simple API idea would be to just do this:
>
> ALLEGRO_SHADER* al_create_default_shader();
> ALLEGRO_SHADER* al_create_light_shader();
> //etc
>
> After being created, the user would interact with the shader the usual
> way (the various variables, such as colors, will be set using the
> uniform setting syntax we already have).
>
> It might be interesting to simplify that even further and mimic the A4
> API more accurately (ignore the names, no thought was put into them):
>
> ALLEGRO_EFFECT_STATE* al_create_effect_state();
>
> al_use_default_effect(ALLEGRO_EFFECT_STATE* state);
> al_use_light_effect(ALLEGRO_EFFECT_STATE* state, ALLEGRO_COLOR light);
>
> Obviously this is inflexible, but it is exactly designed for ease of
> use by beginners. The old API is unaffected by this proposed change
> (even the al_get_default_glsl_*_shader have their use, just not this
> use).
>
> -SL
>
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_feb
> --
> https://lists.sourceforge.net/lists/listinfo/alleg-developers