Re: [AD] Some more thoughts on the shader API |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
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.
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?