Login  Register

Re: GLCanvas in awt scrollpane drawing problems

Posted by Mabula Haverkamp on Jun 07, 2018; 4:03pm
URL: https://forum.jogamp.org/GLCanvas-in-awt-scrollpane-drawing-problems-tp4038912p4038917.html

Hi Julien,

Thank you very much for replying to my question.

I have tried all sorts of configurations.

- a GLJpanel in a JScrollpane
- a GLCanvas in a awt Scrollpane
- a NEWTCanvasAWT in a awt Scrollpane

All 3 configuration manifest the same problem: if drawing outside the scrollpane viewport is needed due to zooming in on the data (thereby increasing the size of the GLJPanel, GLCanvas, NEWTCanvasAWT) triggers the drawing that is seen inside the scrollpane to be off.

I have checked my gl commands for errors with glErrorGet().

I have also double checked all dimensions and my calculations by sending all relevant info to system out. They are all what they need to be and still the gl drawing is not correct. My suspicion is that this is somehow related to drawing to a component which is only partly visible and that upsets the opengl rendering somehow.

I must point out, i am pretty new to OpenGL, so I am still trying and reading all relevant documentation to verify if I missed something.

So you would suggest to use key and mouse listeners that will trigger the scrolling without having any scrollbars? Is that a common inplementation? I can imagine how to do this however.

Is there a technical/documented reason why to just skip using a scrollpane? Perhaps the opengl rendering itself to screen?

Thanks,
Mabula