(from ariekenb's forum post) 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
Created attachment 210 [details] Code to duplicate the bug
Created attachment 211 [details] Log of test
Duplicated this error by resizing com.jogamp.opengl.test.junit.jogl.demos.gl2.gears.TestGearsGLJPanelAWT to be wider than it is tall. The right side of the window (the part with x > max height) doesn't render.
Created attachment 212 [details] Unit test for bug. Created a unit test that fails on this bug. The test reads a pixel in the erroneously black part of the frame during the gears rendering. I'll submit a pull request for this after I try to fix the bug.
Changing line 178 of GLDrawableFactoryImpl.java from this: drawable = (GLDrawableImpl) createGLDrawable( createOffscreenSurfaceImpl(device, capsChosen, capsRequested, chooser, height, height) ); to this: drawable = (GLDrawableImpl) createGLDrawable( createOffscreenSurfaceImpl(device, capsChosen, capsRequested, chooser, width, height) ); fixes the problem, just as user ariekenb speculated. I'll push this to my repository and submit you a pull request.
Submitted pull request.
*** Bug 404 has been marked as a duplicate of this bug. ***
I have also this problem.
Hopefully this one should be in soon -- I think Sven is starting his review of these patches now.
commit aac2ba89a38d47fc24db10254e4b295717557b23 Author: wwalker <wwalker@u001042-lin.austin.arm.com> Date: Thu Dec 30 14:01:04 2010 -0600 Fixed bug 450 (unrendered right side of GLJPanel in Gears) This bug caused the right sides of GLJPanels not to render if the panel is wider than its height (all pixels with x > height would be black). Wrote a unit test to sense the problem by reading an unrendered pixel back out of the frame, then fixed the typo in GLDrawableFactoryImpl.java that caused the error.