Login  Register

Re: glsl version syntax problems

Posted by Teapot on Mar 18, 2014; 11:21am
URL: https://forum.jogamp.org/glsl-version-syntax-problems-tp4031949p4031952.html

The version I use and the version used by the system matches. Notice that 4.00 blah blah at top right? That's my version print out.

However, I've figured out the problem. Apparently, I need to include a carriage return ala "#version 400\n" :< Why they'd demand something that was designed for human consumption to begin with, I cannot tell. Your guess was indeed wild but thanks to that, I found the critical clue in a method comment left by someone for the getGLSLVersionString() method: "including a terminating newline '\n', i.e. for desktop".

Along with the lack of the carriage return (which's mandatory, to emphasize) my version string also get chained into the param init string. That would be parsed as "#version 400 coreout vec4 color;" + ...

Case closed. I now have a hardware-accelerated cyan dot :)