Skip to main content
6 events
when toggle format what by license comment
Aug 20, 2015 at 18:42 comment added Maurice Yeah, I probably just looked at the wiki instead of the specification itself. Never occurred to me that both methods are possible, although indeed the buildin functions do use it.
Aug 20, 2015 at 18:34 history edited Maurice CC BY-SA 3.0
Removed incorrect information.
Aug 20, 2015 at 18:26 comment added glampert Return values have always been supported, AFAIK. If you look at the 1.2 specification, section 6.1, you can see the function declaration syntax: returnType functionName (type0 arg0, type1 arg1, ..., typen argn);. Plus, a lot of builtin functions return a value... Perhaps the existence of in/out parameters has tricked you into thinking it didn't support return values, but both are orthogonal concepts. Apart from that, your answer is pretty good, btw ;)
Aug 20, 2015 at 18:14 comment added Maurice I always used to the value-return calling convention as described here opengl.org/wiki/Core_Language_%28GLSL%29#Functions. If it is possible to define the return type and use "return variable;" syntax I will change it. EDIT: nvm, you're right. The OpenGL 4.5 specification says it should be possible (but I don't know when it was introduced)
Aug 20, 2015 at 17:41 comment added glampert GLSL functions cannot return a value? Hum? From where did you get this idea?
Aug 20, 2015 at 15:55 history answered Maurice CC BY-SA 3.0