GLJPanel - missing areas on resize

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

GLJPanel - missing areas on resize

ariekenb
I modified the Gears demo slightly so that it uses GLJPanel instead of GLCanvas: gears-gljpanel.zip

I find if I resize the JFrame so that the width in pixels is larger than the height in pixels, the side of the GLJPanel does not paint anything.  For example: gears.png

This does not happen with JOGL 1.1.1.

I wonder if this is due to the fact that GLDrawableFactoryImpl.createGLPbuffer ignores the width parameter and passes height for both width and height to createOffscreenSurfaceImpl:

142   public GLPbuffer createGLPbuffer(AbstractGraphicsDevice deviceReq,
143                                    GLCapabilitiesImmutable capsRequested,
144                                    GLCapabilitiesChooser chooser,
145                                    int width,
146                                    int height,
147                                    GLContext shareWith) {


178         drawable = (GLDrawableImpl) createGLDrawable( createOffscreenSurfaceImpl(device, capsChosen, capsRequested, chooser, height, height) );


Here is my test.log: test.log
Reply | Threaded
Open this post in threaded view
|

Re: GLJPanel - missing areas on resize

Xfel
I have a quite similar problem. The side is painted, but just with the leftmost column.
Reply | Threaded
Open this post in threaded view
|

Re: GLJPanel - missing areas on resize

Wade Walker
Administrator
I'll try to duplicate this tomorrow on my CentOS box. If it shows up for me, I'll add the unit test to my build and submit a pull request to Sven. If the simple fix works, I'll put that in the pull request too.
Reply | Threaded
Open this post in threaded view
|

Re: GLJPanel - missing areas on resize

Wade Walker
Administrator
In reply to this post by ariekenb
I created a bug entry for this at https://jogamp.org/bugzilla/show_bug.cgi?id=450. You can CC yourself on it to see the progress.
Reply | Threaded
Open this post in threaded view
|

Re: GLJPanel - missing areas on resize

Wade Walker
Administrator
In reply to this post by ariekenb
You were exactly correct about the source of the bug. When I correct line 178 of GLDrawableFactoryImpl, the problem goes away, and my new unit test passes.

I'll push the changes to my repository and submit a pull request to Sven.
Reply | Threaded
Open this post in threaded view
|

Re: GLJPanel - missing areas on resize

Sven Gothel
Administrator
On Thursday, December 30, 2010 18:16:59 Wade Walker [via jogamp] wrote:
>
> You were exactly correct about the source of the bug. When I correct line 178
> of GLDrawableFactoryImpl, the problem goes away, and my new unit test
> passes.
>
> I'll push the changes to my repository and submit a pull request to Sven.

Thank you Xfel for finding this bug, and Wade for verification.

I cont now with a 'getAvailableGLCapabilities(AbstractGraphicsDevice)' function
and will add this bug fix later on.

Have a great and happy new year !!!

~Sven
Reply | Threaded
Open this post in threaded view
|

Re: GLJPanel - missing areas on resize

Wade Walker
Administrator
In reply to this post by ariekenb
The pull request is at https://github.com/sgothel/jogl/pull/15. You can comment on it if you'd like  Hopefully Sven will pull it soon, then you can get a new build that includes the fix.
Reply | Threaded
Open this post in threaded view
|

Re: GLJPanel - missing areas on resize

Martin
Nice to know: I also have this problem. Waiting for the next build!