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

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


On 03/03/2013 04:22 PM, Jon Rafkind wrote:
On 03/03/2013 02:14 PM, SiegeLord wrote:
Also... if I'm changing this, any issues with the name of that function?
No confusion with it actually returning the shader source vs the shader
itself? I don't know how likely a newbie user using C would try to
assign the output of those functions directly to ALLEGRO_SHADER*...

At least to this point I can safely say that I need the source because I needed to explicitly give a #version to the vertex shader at least one time in my application. Apparently if the pixel shader uses #version 130 then so must the vertex shader. The only way to do this was to prepend the #version to the vertex source.

That just requires testing of the default shaders. I can't imagine we can't find a way to get them to work everywhere as is.

Anyway, how would it work to return an ALLEGRO_SHADER*? If both get_default() functions returned an ALLEGRO_SHADER* how would you combine them into a single shader?

I only meant this in terms of calling the function al_get_default_*_shader_source as opposed to what it is called now. Actually returning ALLEGRO_SHADER* is impossible, as you said.

-SL





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