XorDev / GML_Shaders

GML functions brought to GLSL
10 stars 1 forks source link

Suggestion: why not make all the macros inline-ish functions? #5

Closed Sigmarik closed 1 year ago

Sigmarik commented 1 year ago

There is no reason for any of these macros to be functions, especially considering they will most likely be in-placed by the compiler.

Making them functions will also increase their performance, as their parameters will not be recalculated for every use. Speaking of recalculations, there are also cases where macros like these are unusable no matter their bracket enclosure (any impure function will break if passed as any multi-use parameter of any macro).