Reply – Re: GLJPanel on JInternalFrame
Your Name
or Cancel
In Reply To
Re: GLJPanel on JInternalFrame
— by Michael Bien Michael Bien
thank you for the test case and the good description.

I'll take a look at it after SIGGRAPH.
sure, feel free to file a bug report.


On 07/18/2010 12:17 PM, Cyrille [via jogamp] wrote:
I just wanted to point out the fact that I reproduced this painting issue with a GLJPanel in a top level JFrame. This is the proof that the bug is not related to the use of JInternalFrame.

Here is a very simple application that reproduces the bug:

public final class TestApp implements GLEventListener
        private TestApp()

        public static void main(final String[] inArguments)
                JFrame frame = new JFrame();
       canvas = new;
                canvas.addGLEventListener(new TestApp());

                // Give frame the screen size as initial size.
                Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();

        public void display(GLAutoDrawable arg0)
                GL2 gl = arg0.getGL().getGL2();

                // Simply draw something: a green triangle on a red background.
                gl.glClearColor(1.0f, 0.0f, 0.0f, 1.0f);

                gl.glColor3f(0.0f, 1.0f, 0.0f);
                gl.glVertex2d(0.0, 0.0);
                gl.glVertex2d(1.0, 0.0);
                gl.glVertex2d(1.0, 1.0);
                gl.glVertex2d(0.0, 0.0);


        public void dispose(GLAutoDrawable arg0)

        public void init(GLAutoDrawable arg0)

        public void reshape(GLAutoDrawable arg0, int arg1, int arg2, int arg3, int arg4)

On my computer, here is what I witness on my 1680x1050 screen:
-at startup the GLJPanel is properly painted from its left bound til the 1024th pixel. At the right of this limit, the panel is black.
-when I reduce panel's height below 400 pixels, the properly painted portion's width lowers to 512 pixels. From that point, when I increase panel's height again, the portion's becomes 1024 pixel wide again when panel's height exceeds 512 pixels.
-if I keep on reducing panel's height, the painted portion's width reduces to 256, then 128, then 64 pixels, etc...

I hope this code sample will help. I would be happy to file a bug in Bugzilla or to perform other investigation if you feel like it could be useful.

Thanks again for your help.

View message @
To start a new topic under jogamp, email [hidden email]
To unsubscribe from jogamp, click here.