Hello Guest

[FIXED] canvas resize on MAC

  • 5 Replies
  • 8384 Views
[FIXED] canvas resize on MAC
« on: October 27, 2011, 15:01:33 »
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)

*

Offline princec

  • *****
  • 1933
    • Puppygames
Re: [BUG] canvas resize on MAC
« Reply #1 on: October 27, 2011, 21:10:46 »
Yep, saw this too - the chief reason I had to revert back to 2.7.1!

Cas :)

Re: [BUG] canvas resize on MAC
« Reply #2 on: October 30, 2011, 20:53:43 »
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...
« Last Edit: October 30, 2011, 20:55:32 by ropelsw »

*

Offline kappa

  • *****
  • 1316
Re: [BUG] canvas resize on MAC
« Reply #3 on: October 30, 2011, 21:14:29 »
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.
« Last Edit: November 02, 2011, 10:57:14 by kappa »

*

Offline kappa

  • *****
  • 1316
Re: [BUG] canvas resize on MAC
« Reply #4 on: November 14, 2011, 14:17:32 »
As of LWJGL 2.8.2 this is fixed for LWJGL Applications, however still needs to be fixed when using Applets.

*

Offline kappa

  • *****
  • 1316
Re: [BUG] canvas resize on MAC
« Reply #5 on: March 14, 2013, 13:03:33 »
fixed now after OS X branch rewrite.