Re: [AD] shader variable names

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


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.
>
> I'm mucking around with reorganising the shader code at the moment.
> There might be some conflicts here but should be easy enough to resolve.
>
> On Mon, 25 Feb 2013 15:51:59 -0700, Jon Rafkind <workmin@xxxxxxxxxx> wrote:
>> If there are no dissenting opinions I will make this change soon (maybe tonight or tomorrow).
>>
>> On 02/24/2013 03:16 PM, Jon Rafkind wrote:
>>> I'm just getting involved with shaders and think it would be nice if the shader variables allegro already provides were prefixed with al_ or something to easily differentiate them from user variables.
>>>
>>> al_tex
>>> al_pos
>>> al_color
>>>
>>> ------------------------------------------------------------------------------
>>> 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
>>
>> ------------------------------------------------------------------------------
>> 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
> ------------------------------------------------------------------------------
> 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





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