[FIXED] canvas resize on MAC

Started by ropelsw, October 27, 2011, 15:01:33

Previous topic - Next topic

ropelsw

Resizing a JFrame with Display attached to a canvas or resizing an applet (for example putting it in a page with width=100% and height=100% and resizing the browser) does't work on MAC: opengl continues drawing in a rectangle with the old (original) dimensions and the result is stretched on the new dimensions and repositioned with odd results.
Any example application can be used to verify the effect (even the classic GEARS)

princec

Yep, saw this too - the chief reason I had to revert back to 2.7.1!

Cas :)

ropelsw

Sadly I cannot revert back to an older version 'cause my application needs to run as Applet even on MAC.
Yesterday there was a replay (where is it gone??) talking about a possible fix : if it is on the java side and not on the native code,
maybe I can help with some tries and investigatons... maybe a hint could be helpful...

kappa

The issue is on the native Cocoa/Objective-C side unfortunately. I did have a look however haven't been able to find a fix for it yet, its possible that it is a bug on Apple's side.

Currently its possible to implement a partial fix that would fix the behaviour for Java applications that are using Display.setParent() but would still leave the same stretching behaviour for applets, so waiting to find a proper fix.

The issue is basically that we are resizing a PBuffer. However the contents of the OpenGL context that is attached to the PBuffer remains the same size as when it was first created. It just stretches to any new Pbuffer size instead of also resizing itself. Likely some OpenGL setting is being overlooked or maybe something is broken somewhere in Apples new java api, no really sure atm.

kappa

As of LWJGL 2.8.2 this is fixed for LWJGL Applications, however still needs to be fixed when using Applets.

kappa