jogl
  1. jogl
  2. JOGL-111

GLCanvas and JTabbedPane incompatibility.

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Cannot Reproduce
    • Affects Version/s: current
    • Fix Version/s: milestone 1
    • Component/s: jogl
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      111

      Description

      Hello,
      i tried to use a GLCanvas together with a JTabbedPane. Therefore i've inherited
      a new class from JPanel which implements GLEventListener.
      If i try to add one tab as a reaction of a user interaction (pushed button) the
      program terminates with "Unable to set pixel format" GLException on windows or
      with "Xlib: unexpected async reply (sequence 0x2d1)!" on linux.
      However, if the tabs are added in the constructor of the class that creates the
      JTabbedPane, everything works well.

      Ive tried to fix the problem by creating just one GLCanvas which is used for
      all tabs. (rather than creating a GLCanvas for each tab) But the same probem
      appeared. This approach has also revealed that if one GLCanvas is added to
      various tabs, only the last tab will display the GLCanvas. All previously
      created tabs will 'lose' there GLCanvas object. (GLEventListener.display() is
      no longer called automatically, calling GlCanvas.display() manualy doesnt
      display anything....)

      Please let me know if you need any further information.
      Thanks in advance,
      nop nop nop...

        Activity

        Hide
        nopalot added a comment -

        Created an attachment (id=17)
        the prog displays a JTabbedPane using the same GLCanvas for each tab. adding a tab dynamically crashes the app.

        Show
        nopalot added a comment - Created an attachment (id=17) the prog displays a JTabbedPane using the same GLCanvas for each tab. adding a tab dynamically crashes the app.
        Hide
        kbr added a comment -

        I no longer see crashes (on Windows) with the latest fixes to the
        JOGL_SINGLE_THREADED_WORKAROUND for ATI cards, in particular recent
        Windows-specific fixes. The changes are currently in the JOGL CVS repository and
        will be present in JOGL 1.1 b08. Please retest once this version ships (or with
        the current CVS sources) and reopen this bug if problems still occur. If they
        do, please indicate whether specifying -DJOGL_SINGLE_THREADED_WORKAROUND=true on
        the command line works around the issues.

        Regarding adding heavyweights like GLCanvas to a JTabbedPane: the JTabbedPane is
        a lightweight component and I would expect that adding a GLCanvas to it would
        have all of the same problems (maybe more) as putting a GLCanvas into a
        JInternalFrame. You will probably need to do some bookkeeping and manally add
        and remove the GLCanvas depending on which tab is visible. We'll try to
        accelerate the GLJPanel some more using pbuffers in an upcoming JOGL release for
        better performance with full Swing compatibility.

        Show
        kbr added a comment - I no longer see crashes (on Windows) with the latest fixes to the JOGL_SINGLE_THREADED_WORKAROUND for ATI cards, in particular recent Windows-specific fixes. The changes are currently in the JOGL CVS repository and will be present in JOGL 1.1 b08. Please retest once this version ships (or with the current CVS sources) and reopen this bug if problems still occur. If they do, please indicate whether specifying -DJOGL_SINGLE_THREADED_WORKAROUND=true on the command line works around the issues. Regarding adding heavyweights like GLCanvas to a JTabbedPane: the JTabbedPane is a lightweight component and I would expect that adding a GLCanvas to it would have all of the same problems (maybe more) as putting a GLCanvas into a JInternalFrame. You will probably need to do some bookkeeping and manally add and remove the GLCanvas depending on which tab is visible. We'll try to accelerate the GLJPanel some more using pbuffers in an upcoming JOGL release for better performance with full Swing compatibility.

          People

          • Assignee:
            jogl-issues
            Reporter:
            nopalot
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: