Force display an "invisible" GLJPanel

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

Force display an "invisible" GLJPanel

Kain16
Hello,

I have an "onscreen" GLJPanel for 3D visualisation with view actions (like set front / back / top.. view) and a task which hide this GLJPanel (shows a "ProgressPanel" with CardLayout). During this task I want to call view actions and take pictures from GLJPanel. I can take this pictures but view actions only applies when the task ends and GLJPanel is visible again.

So my question is that, is it possible to somehow force GLJPanel to draw even it is not shown?

Balazs
Reply | Threaded
Open this post in threaded view
|

Re: Force display an "invisible" GLJPanel

gouessej
Administrator
Why not taking the picture just before hiding the GLJPanel?
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Force display an "invisible" GLJPanel

Kain16
Meanwhile task is running I change the view few times. Making these view changes and pictures before hiding the GLJPanel made these changes visible to user, which is not a good behaviour.
Reply | Threaded
Open this post in threaded view
|

Re: Force display an "invisible" GLJPanel

Sven Gothel
Administrator
In reply to this post by gouessej
On 07/16/2015 11:07 AM, gouessej [via jogamp] wrote:
> Why not taking the picture just before hiding the GLJPanel?

^^ this is surely the favorable solution.

However, I like to take the chance and 'advertise'
the feature of swapping GLContext and all GLEventListener
from one GL[Auto]Drawable to another.
Here .. one could swap from onscreen to offscreen rendering
and vice versa, which also allows to change the drawable size.

The following link shows how it is being used for tiled printing
using GLJPanel:

<http://jogamp.org/git/?p=jogl.git;a=blob;f=src/jogl/classes/com/jogamp/opengl/awt/GLJPanel.java;h=5bf4c106c0f2b6e557edcc6a705f248d6527a330;hb=HEAD#l790>

This also shows our versatile API and implementation
utilizing quite some corner cases in OpenGL.

~Sven


signature.asc (828 bytes) Download Attachment