Bug 145

Summary: Clipping panes cause garbage display
Product: [JogAmp] Jogl Reporter: Sven Gothel <sgothel>
Component: coreAssignee: Sven Gothel <sgothel>
Status: VERIFIED WORKSFORME    
Severity: normal CC: xerxes
Priority: P2    
Version: 1   
Hardware: All   
OS: macosx   
Type: DEFECT SCM Refs:
Workaround: ---
Bug Depends on: 1206    
Bug Blocks:    

Description Sven Gothel 2010-03-24 07:47:35 CET


---- Reported by gusgus84 2005-03-01 14:28:36 ----

-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);



---- Additional Comments From gusgus84 2005-03-01 21:20:11 ----

Correction: It was a Radeon 9600, NOT 9800



---- Additional Comments From kbr 2005-03-02 23:10:46 ----

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.




---- Additional Comments From kbr 2005-04-09 17:37:31 ----

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




---- Additional Comments From kbr 2005-04-13 00:27:24 ----

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".




--- Bug imported by sgothel@jausoft.com 2010-03-24 07:47 EDT  ---

This bug was previously known as _bug_ 145 at https://jogl.dev.java.net/bugs/show_bug.cgi?id=145