Re: Need Help Solving OpenGL/GLSL 4.4 Issues
Posted by
xghost on
Jul 29, 2014; 11:41am
URL: https://forum.jogamp.org/Need-Help-Solving-OpenGL-GLSL-4-4-Issues-tp4032557p4032672.html
jmaasing wrote
I haven't done C programming in nearly 2 decades so I don't know if that struct is considered one string or several.
It's a single string; there're no commas separating the lines, i.e., the entire thing will be printed if you simply do
printf("%s", vs_source[0]);
Trying vs_source[1] will go out of range immediately.
jmaasing wrote
I guess it must only be null terminated once which means that there is only 1 element in the array.
This is correct. String literals are automatically null-terminated in C and C++, and due to the fact that the author does not separate the different lines (e.g. commas), there's only an array with a single null-terminated string.
jmaasing wrote
When you send java strings I guess they are null terminated so there is more than 1 element.
And this was, ultimately, the cause. A really minor oversight during code translation that became difficult to spot after the fact and sent me on a completely different path.
Anyway, it's a good thing that:
1. The issue has been fixed
2. The underlying cause was identified
Thanks for the help :)