EntityCustomParameter: Index <=> Name

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
DarkDragon
Addict
Addict
Posts: 2344
Joined: Mon Jun 02, 2003 9:16 am
Location: Germany
Contact:

EntityCustomParameter: Index <=> Name

Post by DarkDragon »

Hello,

The HLSL/GLSL shaders usually don't have an ParameterIndex. They're using a ParameterName. So I would suggest a function like this:

Code: Select all

EntityCustomNamedParameter(#Entity, SubEntityIndex, ParameterName.s, Value1, Value2, Value3, Value4)
But please see it as an additional function, not as a replacement. Maybe the other function should be renamed to EntityCustomIndexedParameter to match the material script naming convention.
bye,
Daniel
User avatar
idle
Always Here
Always Here
Posts: 5844
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: EntityCustomParameter: Index <=> Name

Post by idle »

+1
Windows 11, Manjaro, Raspberry Pi OS
Image
User avatar
Comtois
Addict
Addict
Posts: 1431
Joined: Tue Aug 19, 2003 11:36 am
Location: Doubs - France

Re: EntityCustomParameter: Index <=> Name

Post by Comtois »

you can use custom in material script to control a named parameter :

Code: Select all

fragment_program_ref TextureModColor_PS
            {
                param_named_auto colorModulate custom 1
            }

http://www.ogre3d.org/tikiwiki/tiki-ind ... +Materials
Please correct my english
http://purebasic.developpez.com/
User avatar
idle
Always Here
Always Here
Posts: 5844
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: EntityCustomParameter: Index <=> Name

Post by idle »

Works fine thanks
Windows 11, Manjaro, Raspberry Pi OS
Image
DarkDragon
Addict
Addict
Posts: 2344
Joined: Mon Jun 02, 2003 9:16 am
Location: Germany
Contact:

Re: EntityCustomParameter: Index <=> Name

Post by DarkDragon »

Handling with numbers instead of names is a dirty way, but it seems to be the solution.
bye,
Daniel
Post Reply