Re: GLJPanel in Lion
Posted by rmnoon on Aug 22, 2011; 5:14am
URL: https://forum.jogamp.org/GLJPanel-in-Lion-tp3250682p3274108.html
Well... I looked around GLJPanel a lot and couldn't figure out what the damn problem was. All I know is that it happens regardless of the actual backend you're using. It also happens in completely virgin code (the OneTriangle test from the JOGL guide).
My solution is kind of a hack, but it works well enough for now. What I did was to (under Lion on non-nvidia cards) programmatically invert the distortion that was happening to the y coord of gl_FragCoord. This can be done in the frag shader via:
float fixY(float badY) {
return nextPowTwo-badY;
}
Where nextPowTwo is the smallest power of two that is larger than the current height.
I hope somebody else can find a better solution!