Mac Canvas3D location bug

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

Re: Mac Canvas3D location bug

Sven Gothel
Administrator
On 09/28/2013 09:52 AM, Manu [via jogamp] wrote:
> It requires also the new build of gluten available at:
> http://jogamp.org/deployment/autobuilds/master/gluegen-b720-2013-09-28_09-10-47/
>
> It works much better.
> Miserably, in Sweet Home 3D case, the horizontal position of the canvas 3D is
> correct but the canvas is shifted vertically of a 20+ pixels towards the top.
> As soon as I can find how to reproduce the issue, I'll post a unit test.

Please verify:

  1 http://jogamp.org/git/?p=jogl.git;a=commit;h=3abff83dbc0a99c8d227788c9dddbe59cd15b9ba 
    (the location on screen .. insets problem!)

  2 http://jogamp.org/git/?p=jogl.git;a=commit;h=a2a057406ff5d21499860e8fef6ba88f07d9bf95 
    (just doc refinement ..)

Reviewing [1] would help alot .. since its the root-cause of all those
positioning problems now!

~Sven

> Emmanuel Puybaret


signature.asc (911 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Mac Canvas3D location bug

Sven Gothel
Administrator
In reply to this post by jimthev
On 09/27/2013 08:48 PM, Sven Gothel wrote:

> 2 commits:
>   http://jogamp.org/git/?p=jogl.git;a=commit;h=9a8f9b9f7e6148b60b6f0f4326df8d213774284c
>   http://jogamp.org/git/?p=jogl.git;a=commit;h=3abff83dbc0a99c8d227788c9dddbe59cd15b9ba
>
> 'jimthev' and 'Manu' applets are working, as well as vZome test case.
>
> If anybody has a better way to determine location on screen
> and the insets, which we need for the CALayer position, please share!
>
> See: http://jogamp.org/git/?p=jogl.git;a=commit;h=3abff83dbc0a99c8d227788c9dddbe59cd15b9ba
>
> Currently building ..
>
> ~Sven
>
http://jogamp.org/deployment/archive/master/gluegen_720-joal_480-jogl_1091-jocl_849
http://jogamp.org/deployment/archive/master/gluegen_720-joal_480-jogl_1091-jocl_849-signed/

Maven 2.1.0-rc-20130928

~Sven



signature.asc (911 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Mac Canvas3D location bug

Sven Gothel
Administrator
In reply to this post by jimthev
On 09/28/2013 11:21 AM, Sven Gothel wrote:

> On 09/27/2013 08:48 PM, Sven Gothel wrote:
>> 2 commits:
>>   http://jogamp.org/git/?p=jogl.git;a=commit;h=9a8f9b9f7e6148b60b6f0f4326df8d213774284c
>>   http://jogamp.org/git/?p=jogl.git;a=commit;h=3abff83dbc0a99c8d227788c9dddbe59cd15b9ba
>>
>> 'jimthev' and 'Manu' applets are working, as well as vZome test case.
>>
>> If anybody has a better way to determine location on screen
>> and the insets, which we need for the CALayer position, please share!
>>
>> See: http://jogamp.org/git/?p=jogl.git;a=commit;h=3abff83dbc0a99c8d227788c9dddbe59cd15b9ba
>>
>> Currently building ..
>>
>> ~Sven
>>
>
> http://jogamp.org/deployment/archive/master/gluegen_720-joal_480-jogl_1091-jocl_849
> http://jogamp.org/deployment/archive/master/gluegen_720-joal_480-jogl_1091-jocl_849-signed/
>
> Maven 2.1.0-rc-20130928
>
http://jogamp.org/deployment/archive/master/gluegen_720-joal_480-jogl_1091-jocl_849-signed/jogl-test-applets.html

Pls notice the new little Applet tests for OSX on the bottom of the page!


> ~Sven
>
>



signature.asc (911 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Mac Canvas3D location bug

Manu
I found how to reproduce the issue I mentioned in my last message. It comes from the organization of the panels in Sweet Home 3D, where the root pane of the frame contains a child root pane.
Here's an example showing the same bug:

import java.awt.GraphicsEnvironment;
import javax.media.j3d.*;
import javax.swing.*;
import com.sun.j3d.utils.universe.SimpleUniverse;

public class Canvas3DPositionTest {
  public static void main(String [] args) {
    // Create a new canvas 3D
    GraphicsConfigTemplate3D gc = new GraphicsConfigTemplate3D();
    Canvas3D canvas = new Canvas3D(GraphicsEnvironment.getLocalGraphicsEnvironment().
        getDefaultScreenDevice().getBestConfiguration(gc));
    new SimpleUniverse(canvas);

    // Build a GUI where the canvas 3D is located at top right of the frame 
    // and can be resized with split panes dividers
    JFrame frame = new JFrame("Canvas3DPositionTest");
    JSplitPane verticalSplitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, 
        true, new JScrollPane(), canvas);    
    verticalSplitPane.setResizeWeight(0.5);
    JSplitPane horizontalSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, 
        true, new JScrollPane(), verticalSplitPane);
    horizontalSplitPane.setResizeWeight(0.5);
    JRootPane intermediateRootPane = new JRootPane();
    intermediateRootPane.setContentPane(horizontalSplitPane);
    frame.add(intermediateRootPane);
    frame.setSize(400, 400);
    frame.setVisible(true);
  }
}

Hope you can fix it...
Emmanuel Puybaret
Reply | Threaded
Open this post in threaded view
|

Re: Mac Canvas3D location bug

Manu
I found an other issue about visibility of a canvas3D, and also an issue about Canvas3D location when only AWT is used.
The following test should allow the user to show / hide a canvas 3D, but it has no visible effect.
There shouldn't be so much space between the visibility check box and the canvas.
import java.awt.*;
import java.awt.GraphicsEnvironment;
import java.awt.event.*;
import javax.media.j3d.*;
import com.sun.j3d.utils.universe.SimpleUniverse;

public class Canvas3DVisibilityTest {
  public static void main(String [] args) {
    // Create a new canvas 3D bound to a universe
    GraphicsConfigTemplate3D gc = new GraphicsConfigTemplate3D();
    final Canvas3D canvas = new Canvas3D(GraphicsEnvironment.getLocalGraphicsEnvironment().
        getDefaultScreenDevice().getBestConfiguration(gc));
    new SimpleUniverse(canvas);

    // Create a check box that hides / shows canvas
    final Checkbox checkbox = new Checkbox("Visible canvas", true);
    checkbox.addItemListener(new ItemListener() {
      public void itemStateChanged(ItemEvent ev) {
        canvas.setVisible(checkbox.getState());
        System.out.println(canvas.isVisible());
      }
    });

    // Build a GUI that displays canvas and check box
    Frame frame = new Frame("Canvas3DVisibilityTest");
    frame.setLayout(new BorderLayout());
    frame.add(canvas, BorderLayout.CENTER);
    frame.add(checkbox, BorderLayout.NORTH);
    frame.setSize(200, 200);
    frame.setVisible(true);
  }
}

Thanks for trying to fix this issue.
Emmanuel Puybaret
Reply | Threaded
Open this post in threaded view
|

Re: Mac Canvas3D location bug

Sven Gothel
Administrator
On 09/30/2013 01:43 PM, Manu [via jogamp] wrote:
> I found an other issue about visibility of a canvas3D, and also an issue about
> Canvas3D location when only AWT is used.
> The following test should allow the user to show / hide a canvas 3D, but it
> has no visible effect.
> There shouldn't be so much space between the visibility check box and the canvas.
>

See: <https://jogamp.org/bugzilla/show_bug.cgi?id=816#c12>

  maven 2.1.0-rc-20131003
  <http://jogamp.org/deployment/archive/master/gluegen_725-joal_483-jogl_1097-jocl_853-signed/>
  <http://jogamp.org/deployment/archive/master/gluegen_725-joal_483-jogl_1097-jocl_853/>

Applet tests:
  <http://jogamp.org/deployment/archive/master/gluegen_725-joal_483-jogl_1097-jocl_853-signed/jogl-applet-bug816_glcanvas01.html>
  <http://jogamp.org/deployment/archive/master/gluegen_725-joal_483-jogl_1097-jocl_853-signed/jogl-applet-bug816_glcanvas02.html>

Note Test Bug816AppletGLCanvas02 may crash, see new Bug 848 (unrelated to Bug 816):
  <http://jogamp.org/deployment/archive/master/gluegen_725-joal_483-jogl_1097-jocl_853-signed/jogl-applet-bug816_glcanvas02.html>  

The other 2 new tests are included as unit tests and are validated.

Pls reply whether we are good now - or add another 'unit test', thank you!

~Sven




signature.asc (911 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Mac Canvas3D location bug

Sven Gothel
Administrator
In reply to this post by Manu
On 10/04/2013 10:35 AM, Sven Gothel wrote:

> On 09/30/2013 01:43 PM, Manu [via jogamp] wrote:
>> I found an other issue about visibility of a canvas3D, and also an issue about
>> Canvas3D location when only AWT is used.
>> The following test should allow the user to show / hide a canvas 3D, but it
>> has no visible effect.
>> There shouldn't be so much space between the visibility check box and the canvas.
>>
>
> See: <https://jogamp.org/bugzilla/show_bug.cgi?id=816#c12>
>
>   maven 2.1.0-rc-20131003
>   <http://jogamp.org/deployment/archive/master/gluegen_725-joal_483-jogl_1097-jocl_853-signed/>
>   <http://jogamp.org/deployment/archive/master/gluegen_725-joal_483-jogl_1097-jocl_853/>
>
> Applet tests:
>   <http://jogamp.org/deployment/archive/master/gluegen_725-joal_483-jogl_1097-jocl_853-signed/jogl-applet-bug816_glcanvas01.html>
>   <http://jogamp.org/deployment/archive/master/gluegen_725-joal_483-jogl_1097-jocl_853-signed/jogl-applet-bug816_glcanvas02.html>
>
> Note Test Bug816AppletGLCanvas02 may crash, see new Bug 848 (unrelated to Bug 816):
>   <http://jogamp.org/deployment/archive/master/gluegen_725-joal_483-jogl_1097-jocl_853-signed/jogl-applet-bug816_glcanvas02.html>  
>
> The other 2 new tests are included as unit tests and are validated.
>
> Pls reply whether we are good now - or add another 'unit test', thank you!
>
> ~Sven
>
>
>
  maven 2.1.0-rc-20131004
  http://jogamp.org/deployment/archive/master/gluegen_726-joal_484-jogl_1098-jocl_854-signed/
  http://jogamp.org/deployment/archive/master/gluegen_726-joal_484-jogl_1098-jocl_854

Bug 848 turned out to be caused by my test machine becoming unstable (.. dunno why),
after reboot I couldn't reproduce the crash anymore.

~Sven



signature.asc (911 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Mac Canvas3D location bug

Manu
The canvas 3D is placed correctly in a frame now, but is misplaced in a child dialog.
This can be tested with the simple following example where the canvas 3D doesn't appear at the good location:
import java.awt.GraphicsEnvironment;
import javax.media.j3d.*;
import javax.swing.*;
import com.sun.j3d.utils.universe.SimpleUniverse;

public class Canvas3DPositionInDialogTest {
  public static void main(String [] args) {
    // Create a minimal canvas 3D
    GraphicsConfigTemplate3D gc = new GraphicsConfigTemplate3D();
    Canvas3D canvas = new Canvas3D(GraphicsEnvironment.getLocalGraphicsEnvironment().
        getDefaultScreenDevice().getBestConfiguration(gc));
    canvas.setSize(100, 100);
    new SimpleUniverse(canvas);

    // Display the canvas 3D in a dialog child of a frame
    JFrame frame = new JFrame("Canvas3DPositionTest");
    frame.setSize(400, 400);
    frame.setVisible(true);
    JOptionPane.showMessageDialog(frame, canvas);
  }
}

I think that when you look for the location of the canvas 3D at screen, you should go up in the components hierarchy until you find a parent of Window class, and not until you get a null parent. Hope this will help...
Did you have the chance to look at the other issue I reported in the Canvas3DVisibilityTest class?
Emmanuel Puybaret
Reply | Threaded
Open this post in threaded view
|

Re: Mac Canvas3D location bug

Sven Gothel
Administrator
On 10/05/2013 02:34 PM, Manu [via jogamp] wrote:

> The canvas 3D is placed correctly in a frame now, but is misplaced in a child
> dialog.
> This can be tried with the simple following test where the canvas 3D doesn't
> appear at the good location:
>
> import java.awt.GraphicsEnvironment;
> import javax.media.j3d.*;
> import javax.swing.*;
> import com.sun.j3d.utils.universe.SimpleUniverse;
>
> public class Canvas3DPositionInDialogTest {
>   public static void main(String [] args) {
>     // Create a minimal canvas 3D
>     GraphicsConfigTemplate3D gc = new GraphicsConfigTemplate3D();
>     Canvas3D canvas = new Canvas3D(GraphicsEnvironment.getLocalGraphicsEnvironment().
>         getDefaultScreenDevice().getBestConfiguration(gc));
>     canvas.setSize(100, 100);
>     new SimpleUniverse(canvas);
>
>     // Display the canvas 3D in a dialog child of a frame
>     JFrame frame = new JFrame("Canvas3DPositionTest");
>     frame.setSize(400, 400);
>     frame.setVisible(true);
>     JOptionPane.showMessageDialog(frame, canvas);
>   }
> }
>
>
> I think that when you look for the location of the canvas 3D at screen, you
> should go up in the components hierarchy until you find a parent of Window
> class, and not until you get a null parent. Hope this will help...
Thank you .. will try this out .. yes, should stop at top level HW component.

> Did you have the chance to look at the other issue I reported in the
> Canvas3DVisibilityTest class?

Yes, as you can see in the unit tests - should be fixed, at least my manual
test was positive.

~Sven

> Emmanuel Puybaret


signature.asc (911 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Mac Canvas3D location bug

Sven Gothel
Administrator
In reply to this post by Manu
On 10/05/2013 03:05 PM, Sven Gothel wrote:

> On 10/05/2013 02:34 PM, Manu [via jogamp] wrote:
>> The canvas 3D is placed correctly in a frame now, but is misplaced in a child
>> dialog.
>> This can be tried with the simple following test where the canvas 3D doesn't
>> appear at the good location:
>>
>> import java.awt.GraphicsEnvironment;
>> import javax.media.j3d.*;
>> import javax.swing.*;
>> import com.sun.j3d.utils.universe.SimpleUniverse;
>>
>> public class Canvas3DPositionInDialogTest {
>>   public static void main(String [] args) {
>>     // Create a minimal canvas 3D
>>     GraphicsConfigTemplate3D gc = new GraphicsConfigTemplate3D();
>>     Canvas3D canvas = new Canvas3D(GraphicsEnvironment.getLocalGraphicsEnvironment().
>>         getDefaultScreenDevice().getBestConfiguration(gc));
>>     canvas.setSize(100, 100);
>>     new SimpleUniverse(canvas);
>>
>>     // Display the canvas 3D in a dialog child of a frame
>>     JFrame frame = new JFrame("Canvas3DPositionTest");
>>     frame.setSize(400, 400);
>>     frame.setVisible(true);
>>     JOptionPane.showMessageDialog(frame, canvas);
>>   }
>> }
>>
>>
>> I think that when you look for the location of the canvas 3D at screen, you
>> should go up in the components hierarchy until you find a parent of Window
>> class, and not until you get a null parent. Hope this will help...
>
> Thank you .. will try this out .. yes, should stop at top level HW component.
>
>> Did you have the chance to look at the other issue I reported in the
>> Canvas3DVisibilityTest class?
Canvas3DPositionTest -> TestBug816OSXCALayerPos02AWT OK
Canvas3DVisibilityTest -> TestBug816OSXCALayerPos03AWT OK
Canvas3DPositionInDialogTest -> TestBug816OSXCALayerPos04AWT (coming up ..)

~Sven



signature.asc (911 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Mac Canvas3D location bug

Sven Gothel
Administrator
In reply to this post by Manu
On 10/05/2013 03:09 PM, Sven Gothel wrote:
>
> Canvas3DPositionTest -> TestBug816OSXCALayerPos02AWT OK
> Canvas3DVisibilityTest -> TestBug816OSXCALayerPos03AWT OK
Canvas3DPositionInDialogTest -> TestBug816OSXCALayerPos04aAWT and TestBug816OSXCALayerPos04bAWT

Fixed:
  <http://jogamp.org/git/?p=jogl.git;a=commit;h=ae103ba597464ca25071950af7afe012e2b86c13>

~Sven


signature.asc (911 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Mac Canvas3D location bug

Manu
> Canvas3DPositionInDialogTest -> TestBug816OSXCALayerPos04aAWT and TestBug816OSXCALayerPos04bAWT
>
> Fixed:
>  <http://jogamp.org/git/?p=jogl.git;a=commit;h=ae103ba597464ca25071950af7afe012e2b86c13>

Great! I'll test it as soon as the jars are built.



>> Did you have the chance to look at the other issue I reported in the
>> Canvas3DVisibilityTest class?
>
> Yes, as you can see in the unit tests - should be fixed, at least my manual
> test was positive.

Sorry, it still doesn't work for me with the build you posted this morning. When I unselect the check box in Canvas3DVisibilityTest, the black area of the Canvas3D instance doesn't disappear.
Did you test it under Mac OS X?
Emmanuel Puybaret
Reply | Threaded
Open this post in threaded view
|

Re: Mac Canvas3D location bug

Sven Gothel
Administrator
On 10/05/2013 08:02 PM, Manu [via jogamp] wrote:

>> Canvas3DPositionInDialogTest -> TestBug816OSXCALayerPos04aAWT and
> TestBug816OSXCALayerPos04bAWT
>>
>> Fixed:
>>
>  <http://jogamp.org/git/?p=jogl.git;a=commit;h=ae103ba597464ca25071950af7afe012e2b86c13>
> <http://jogamp.org/git/?p=jogl.git;a=commit;h=ae103ba597464ca25071950af7afe012e2b86c13%3E>
>
> Great! I'll test it as soon as the jars are built.
>
>
>
>>> Did you have the chance to look at the other issue I reported in the
>>> Canvas3DVisibilityTest class?
>>
>> Yes, as you can see in the unit tests - should be fixed, at least my manual
>> test was positive.
>
> Sorry, it still doesn't work for me with the build you posted this morning.
> When I unselect the check box in /Canvas3DVisibilityTest/, the black area of
> the Canvas3D instance doesn't disappear.
> Did you test it under Mac OS X?
Yes - the fix is in:

http://jogamp.org/git/?p=jogl.git;a=commit;h=3b02a219b1b9e446e87df1beb7da4266f74824fa

It didn't disapear visually .. but the layer wasn't rendered into anymore
and is hidden in CALayer tree.

http://jogamp.org/git/?p=jogl.git;a=commit;h=ff86d8398ce66abddff4cbada8eabd1314a11d7b

Sets the CALayer's opacity to 0 and renders it no more visible.

BTW, the !visible CALayer is Bug 729.
Bug 816 is related to the position, which I assume works for you now as well.

Some build machines misbehaved .. retrying now .. will see.

~Sven

> Emmanuel Puybaret
>


signature.asc (911 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Mac Canvas3D location bug

Sven Gothel
Administrator
In reply to this post by Manu
On 10/06/2013 02:35 AM, Sven Gothel wrote:
>
> Some build machines misbehaved .. retrying now .. will see.

maven 2.1.0-rc-20131006
http://jogamp.org/deployment/archive/master/gluegen_726-joal_484-jogl_1103-jocl_855/
http://jogamp.org/deployment/archive/master/gluegen_726-joal_484-jogl_1103-jocl_855-signed/

~Sven


signature.asc (911 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Mac Canvas3D location bug

Manu
Thanks Sven, we're very close to a working solution. Canvas3DVisibilityTest and Canvas3DPositionInDialogTest works perfectly on my side now.
Miserably, I noticed an other visibility issue that needs to be resolved for my use case. The canvas 3D should disappear when one of its parent is/becomes invisible too, something that may happen when you have to combine different panels/layouts in a window. Here's a simple test showing this issue:
import java.awt.*;
import java.awt.event.*;
import javax.media.j3d.*;
import com.sun.j3d.utils.universe.SimpleUniverse;

public class Canvas3DAncestorVisibilityTest {
  public static void main(String [] args) {
    // Create a new canvas 3D bound to a universe
    GraphicsConfigTemplate3D gc = new GraphicsConfigTemplate3D();
    Canvas3D canvas = new Canvas3D(GraphicsEnvironment.getLocalGraphicsEnvironment().
        getDefaultScreenDevice().getBestConfiguration(gc));
    new SimpleUniverse(canvas);
    // Put it in a panel
    final Panel panel = new Panel(new GridLayout(1, 1));
    panel.add(canvas);

    // Create a check box that hides / shows canvas panel
    final Checkbox checkbox = new Checkbox("Visible canvas", true);
    checkbox.addItemListener(new ItemListener() {
      public void itemStateChanged(ItemEvent ev) {
        panel.setVisible(checkbox.getState());
        System.out.println(panel.isVisible());
      }
    });

    // Build a GUI that displays canvas panel and check box
    Frame frame = new Frame("Canvas3DAncestorVisibilityTest");
    frame.setLayout(new BorderLayout());
    frame.add(panel, BorderLayout.CENTER);
    frame.add(checkbox, BorderLayout.NORTH);
    frame.setSize(200, 200);
    frame.setVisible(true);
  }
}

By the way, is there a simple way to measure the frame rate with Java 3D or JOGL?
Emmanuel Puybaret
Reply | Threaded
Open this post in threaded view
|

Re: Mac Canvas3D location bug

Sven Gothel
Administrator
On 10/06/2013 02:53 PM, Manu [via jogamp] wrote:
> Thanks Sven, we're very close to a working solution.

:)

> /Canvas3DVisibilityTest/ and /Canvas3DPositionInDialogTest/ works perfectly on
> my side now.

> Miserably,
Maybe the wrong wording here - we have to walk CALayer regressions step by step.
Thank you very much for your input, test cases and revalidation.
It's tedious .. but the situation is expected - 'miserable' is something different IMHO :)
So pls 'hang in here' and to all the others, pls test your special AWT layouts
so we can find the remaining issues w/ OSX CALayer.

> I noticed an other visibility issue that needs to be resolved for
> my use case. The canvas 3D should disappear when one of its parent is/becomes
> invisible too, something that may happen when you have to combine different
> panels/layouts in a window. Here's a simple test showing this issue:

Thank you - I will add it, as usual. Looks like we need to snoop on the
hierarchy listener ..

>
>
>
> By the way, is there a simple way to measure the frame rate with Java 3D or JOGL?

Pls verify the unit tests I create based on your input,
then you find the line:
  animator.setUpdateFPSFrames(60, System.err);

~Sven



signature.asc (911 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Mac Canvas3D location bug

Sven Gothel
Administrator
In reply to this post by Manu
On 10/06/2013 05:04 PM, Sven Gothel wrote:
>> I noticed an other visibility issue that needs to be resolved for
>> my use case. The canvas 3D should disappear when one of its parent is/becomes
>> invisible too, something that may happen when you have to combine different
>> panels/layouts in a window. Here's a simple test showing this issue:
>
> Thank you - I will add it, as usual. Looks like we need to snoop on the
> hierarchy listener ..

This issue actually is at least confusing.

Even w/ 'normal' AWT (X11, ..) the GLCanvas is not set invisible
if it's parent is set invisible manually. Hence no propagation
of the visibility is being performed other than the hierarchy listener!
I have checked w/ OpenJDK source code .. indeed only a hierachy event is being propagated.
Hence GLCanvas still assumes it is visible and GL operations are still performed.

So we need JAWTWindow to cache visibility states,
i.e. visibility-self and visibility-by-parent.

https://jogamp.org/bugzilla/show_bug.cgi?id=849

>






















signature.asc (911 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Mac Canvas3D location bug

Manu
Wouldn't it be enough and simpler to add a java.awt.event.HierarchyListener to the component and follow SHOWING_CHANGED events?
Emmanuel Puybaret
Reply | Threaded
Open this post in threaded view
|

Re: Mac Canvas3D location bug

Sven Gothel
Administrator
On 10/06/2013 06:28 PM, Manu [via jogamp] wrote:
> Wouldn't it be enough and simpler to add a java.awt.event.HierarchyListener to
> the component and follow SHOWING_CHANGED events?

That is what I meant w/ 'we need to snoop on the hierarchy listener ..', yes.

If we intend to have visibility propagation for the general case for all JAWTWindow's,
we need to track the diff. visibility states.
See bug 849 .. i.e. don't waste performance for invisible components.
This will use the hierarchy listener as well within JAWTWindow, sure.

~Sven




signature.asc (911 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Mac Canvas3D location bug

Manu
If fixing this bug will take a lot of time, I can find a workaround in the meantime without breaking everything in my program, because I can also set directly the visibility of the 3D canvases when they should appear/disappear.
Emmanuel Puybaret
12345