jogl
  1. jogl
  2. JOGL-145

Clipping panes cause garbage display

    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: Mac OS X
      Platform: Macintosh

    • Issuezilla Id:
      145

      Description

      -Using a PowerBook G4 with an ATI 9800XT, up to date with Software Update

      -Runnning the following program:
      http://www.chem.byu.edu/Plone/people/rbshirts/research/Boltzmann3D.dmg

      When set to 3D mode (Simulation menu>Dimension->3 Dimensions), the clipping
      panes set just outside the walls cause them to only be partially rendered.

      Here's a basic gist of what's going on in the code (works fine on Mac with
      Nvidia and ALL PC's I've tried it on).

      double clipDistance=1.0d;
      double w=getSize().width, h=getSize().height, d=curZSize;
      double w2=w/2, h2=h/2, d2=d/2;
      //Look at the center of the box
      myGLU.gluLookAt(w2,h2, camz,
      w2,h2, 0,
      0, 1, 0);
      //Rotate the box to make it look like the camera is moving
      myGL.glTranslated(w2,h2,d2);
      myGL.glRotatef((float)GUIGlobal.camAngleY,0,1, 0);
      double angle=camAngleY*Math.PI/180;
      myGL.glRotatef((float)camAngleX,(float)Math.cos(angle),0, (float)Math.sin
      (angle));
      myGL.glTranslated(-w2,-h2,-d2);
      //Set clipping planes to be just outside of the box
      myGL.glClipPlane(GL.GL_CLIP_PLANE0,new double[]

      {1,0,0,clipDistance}

      );
      myGL.glClipPlane(GL.GL_CLIP_PLANE2,new double[]

      {0,1,0,clipDistance}

      );
      myGL.glClipPlane(GL.GL_CLIP_PLANE4,new double[]

      {0,0,1,clipDistance}

      );
      myGL.glRotatef(180,0,1,0);
      myGL.glClipPlane(GL.GL_CLIP_PLANE1,new double[]

      {1,0,0,w+clipDistance}

      );
      myGL.glClipPlane(GL.GL_CLIP_PLANE5,new double[]

      {0,0,1,d+clipDistance}

      );
      myGL.glRotatef(-180,0,1,0);
      myGL.glRotatef(180,1,0,0);
      myGL.glClipPlane(GL.GL_CLIP_PLANE3,new double[]

      {0,1,0,h+clipDistance}

      );
      myGL.glRotatef(-180,1,0,0);

        Activity

        Hide
        gusgus84 added a comment -

        Correction: It was a Radeon 9600, NOT 9800

        Show
        gusgus84 added a comment - Correction: It was a Radeon 9600, NOT 9800
        Hide
        kbr added a comment -

        This is highly unlikely to be a bug in JOGL, but rather in your vendor's OpenGL
        drivers. I would suggest trying JOGL 1.1 b10 and if the problem persists then
        file a bug with Apple. You might want to try on a Windows machine with an ATI
        card as well and if the problem occurs there then file a bug with ATI using
        their web feedback form.

        Show
        kbr added a comment - This is highly unlikely to be a bug in JOGL, but rather in your vendor's OpenGL drivers. I would suggest trying JOGL 1.1 b10 and if the problem persists then file a bug with Apple. You might want to try on a Windows machine with an ATI card as well and if the problem occurs there then file a bug with ATI using their web feedback form.
        Hide
        kbr added a comment -

        Have you tested with JOGL 1.1 b10, and does it change the behavior?

        Show
        kbr added a comment - Have you tested with JOGL 1.1 b10, and does it change the behavior?
        Hide
        kbr added a comment -

        The submitter has indicated that the problem is also reproducible with a C++
        program, so it is likely to be a bug in the drivers rather than in JOGL. Closing
        this as "works for me".

        Show
        kbr added a comment - The submitter has indicated that the problem is also reproducible with a C++ program, so it is likely to be a bug in the drivers rather than in JOGL. Closing this as "works for me".

          People

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

            Dates

            • Created:
              Updated:
              Resolved: