Note that there are some explanatory texts on larger screens.

plurals
  1. POFirst GLWindow in first NewtCanvasAWT doesn't get .repaint(), when there are other windows
    primarykey
    data
    text
    <p>I have two <a href="https://jogamp.org/jogl/" rel="nofollow">JOGL</a> native <code>GLWindow</code>s wrapped in <code>NewtCanvasAWT</code>.</p> <p>These canvases are added to <code>JInternalFrame</code>s each. <code>JInternalFrame</code>s are added to <code>JDesktopPane</code> which is added to a <code>JFrame</code>.</p> <p>I don't have an <code>Animator</code> running because <code>.display()</code> is called manually, when scene changes.</p> <hr> <p>This setup works as expected apart from one thing:</p> <ul> <li><p>when the second <code>JInternalFrame</code> (order of creation) moves over the first, the first is not repainted, what is quite unexpected,</p></li> <li><p>when the first moves over the second, the second <em>is</em> repainted, as expected.</p></li> <li><p>If I add more frames, only the last one behaves as expected.</p></li> </ul> <p>The <code>JInternalFrames</code> are identical (the same class).</p> <p>The first <code>GLWindow</code> doesn't receive <code>WindowUpdateEvent</code> in <code>WindowListener.windowRepaint()</code>. The second one does.</p> <p>Here's the stack trace of my <code>GLEventListener.display(GLAutoDrawable drawable)</code> from the <em>working</em> <code>JInternalFrame</code>:</p> <pre><code>java.lang.IllegalArgumentException: test at edu.agh.tunev.ui.opengl.Scene.display(Scene.java:42) at jogamp.opengl.GLDrawableHelper.displayImpl(GLDrawableHelper.java:373) at jogamp.opengl.GLDrawableHelper.display(GLDrawableHelper.java:358) at jogamp.opengl.GLAutoDrawableBase$2.run(GLAutoDrawableBase.java:280) at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:655) at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:594) at com.jogamp.newt.opengl.GLWindow.display(GLWindow.java:543) at jogamp.opengl.GLAutoDrawableBase.defaultWindowRepaintOp(GLAutoDrawableBase.java:99) at com.jogamp.newt.opengl.GLWindow.access$000(GLWindow.java:94) at com.jogamp.newt.opengl.GLWindow$1.windowRepaint(GLWindow.java:107) at jogamp.newt.WindowImpl.consumeWindowEvent(WindowImpl.java:2392) at jogamp.newt.WindowImpl.consumeEvent(WindowImpl.java:1943) at jogamp.newt.DisplayImpl.dispatchMessage(DisplayImpl.java:388) at jogamp.newt.DisplayImpl.dispatchMessages(DisplayImpl.java:436) at jogamp.newt.DisplayImpl$DispatchMessagesRunnable.run(DisplayImpl.java:371) at jogamp.newt.DefaultEDTUtil$EventDispatchThread.run(DefaultEDTUtil.java:293) </code></pre> <p>This should also happen with the <em>first</em> frame. Why doesn't it?</p> <hr> <p>All this does not happen when using <code>GLJPanel</code> or <code>GLCanvas</code>. However, I do not want to use AWT thread for rendering and these <code>GLAutoDrawable</code>s use it. <code>NEWT</code> native windowing toolkit uses another thread.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload