cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

purpledog
Journeyman III

GLSL function default parameter

I am trying to compile a function with a default parameter:

mat3 id3(float w = 1.0) { return mat3(w, 0.0, 0.0, 0.0, w, 0.0, 0.0, 0.0, w);}

But the compiler is saying:

ERROR: 0:203: error(#132) Syntax error: "=" parse error

Any idea ? Are default parameters not available with the AMD GLSL compiler ?

Thanks

0 Likes
1 Solution
gsellers
Staff

Hi,

Default parameters are not supported by GLSL at all. Do you have an implementation upon which this compiles?

Thanks,

View solution in original post

0 Likes
2 Replies
gsellers
Staff

Hi,

Default parameters are not supported by GLSL at all. Do you have an implementation upon which this compiles?

Thanks,

0 Likes

Yes, I do have an implementation upon which it compiles.

0 Likes