This question is specifically about OpenGL 2.0 ES on Android, but if there are more general answers based on the OpenGL specs, I'd be interested in those too.
Is there a way to pass a message (string) out of a GL 2.0 ES shader to the application code (either Java or native)? E.g.
void main()
{
...
if (somecondition)
{
logMessage("Things are messed up man");
}
}
If not, why would a programming environment be defined (OpenGL ES 2.0 shader language in this case) without this type of facility? I don't know anything about hardware but surely this would not be that hard to implement in the GPU. If there are performance issues, it could always be optionally #ifdef'd out of the shader code...