Login  Register

GLJPanel - missing areas on resize

Posted by ariekenb on Dec 26, 2010; 8:25pm
URL: https://forum.jogamp.org/GLJPanel-missing-areas-on-resize-tp2148596.html

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