1
\$\begingroup\$

I haven't ever seen anyone declare main as anything but void main() or void main(void) but I'm curious, is it possible to have a parameter or return value?

\$\endgroup\$

1 Answer 1

5
\$\begingroup\$

No, glsl can't have parameters in the main function (as well as return values).

The doc says:

Just like in C/C++, execution of a shader begins with the function main. This function takes no parameters and returns no values.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .