Re: [AD] shader addon questions

[ Thread Index | Date Index | More Archives ]

On 2012-01-15, at 12:31 PM, Elias Pschernig wrote:
> Hm, I'm still somewhat confused. If I always have to call
> al_set_shader for each shader I'm using before calling al_use_shader
> on it - couldn't we remove the function and simply do whatever it does
> in al_use_shader instead?

You could, but you'd have to buffer everything up and I don't know if that's feasible. Let's see the user sets up a new projection and sets it with al_set_projection_transform(). When al_set_shader has been called (hm, this may only apply to when using USE_PROGRAMMABLE_PIPELINE) it will set the special "projview_matrix" variable in the shader automatically.

> I think I see. So basically al_draw_prim is limited to those 3
> attributes. I think in the final API we'll want a way to set arbitrary
> attributes. But I'll need to think about it more.

Not just al_draw_prim, but bitmap drawing as well. Each user shader has to follow certain patterns, but they're free to extend upon them. But I think those functions can be removed as it's all handled automatically now, at least if you're using ALLEGRO_USE_PROGRAMMABLE_PIPELINE (it is possible to say, just use OpenGL fragment shaders with the fixed pipeline though).

Mail converted by MHonArc 2.6.19+