Re: [AD] shader variable names |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
I don't see how this simplifies anything. A user who writes their own shader will have to use the "raw" names, al_tex or whatever, so now they will have to keep track of two names: al_tex and ALLEGRO_SHADER_VAR_TEX.
On 02/25/2013 04:40 PM, Peter Wang wrote:
> No, just where the variables are named in C and C++ source,
> e.g. calls to glGetUniformLocation, al_set_shader_*, etc.
>
> On Mon, 25 Feb 2013 16:19:38 -0700, Jon Rafkind <workmin@xxxxxxxxxx> wrote:
>> Are you suggesting the shaders themselves should use these defines as well? I know GLSL has a preprocessor, at least #ifdef GL_ES works, but I'm not sure how to set #defines programmatically, nor if HLSL has a preprocessor.
>>
>> On 02/25/2013 04:17 PM, Peter Wang wrote:
>>> I suggest using C macros for the literal strings where possible
>>> to prevent misspellings and make it easier to grep,
>>> e.g. #define ALLEGRO_SHADER_VAR_TEX "al_tex"
>>> They should be part of the documented API.
>
> ------------------------------------------------------------------------------
> 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