No, I’m not drawing a wireframe overtop, I’m simple doing one render of the polygons. No, I’m not using glPolygonOffset anywhere either.
Using the flags you suggested I get this:
main: GLContext.setRealized(true) for context net.java.games.jogl.impl.windows.WindowsOnscreenGLContext@107077e
AWT-EventQueue-0: Using ChoosePixelFormat because multisampling not requested
...
Available 5: GLCapabilities [DoubleBuffered: true, Stereo: false, HardwareAccelerated: true, DepthBits: 24, StencilBits: 8, Red: 8, Green: 8, Blue: 8, Alpha: 8, Red Accum: 16, Green Accum: 16, Blue Accum: 16, Alpha Accum: 16 ]
...
Choosing window system's recommended choice of 5
GLCapabilities [DoubleBuffered: true, Stereo: false, HardwareAccelerated: true, DepthBits: 24, StencilBits: 8, Red: 8, Green: 8, Blue: 8, Alpha: 8, Red Accum: 16, Green Accum: 16, Blue Accum: 16, Alpha Accum: 16 ]
AWT-EventQueue-0: Chosen pixel format (5):
GLCapabilities [DoubleBuffered: true, Stereo: false, HardwareAccelerated: true, DepthBits: 24, StencilBits: 8, Red: 8, Green: 8, Blue: 8, Alpha: 8, Red Accum: 16, Green Accum: 16, Blue Accum: 16, Alpha Accum: 16 ]
AWT-EventQueue-0: !!! Created OpenGL context 65536 for device context 0x1010056 using pixel format 6
AWT-EventQueue-0: !!! Created GL context for net.java.games.jogl.impl.windows.WindowsOnscreenGLContext
AWT-EventQueue-0: !!! Initializing GLU extension address table
AWT-EventQueue-0: !!! Initializing OpenGL extension address table
Here’s my box render routine just in case it has any incriminating evidence:
//ElementBox
void draw(GLDrawable drawable) {
if (!isVisible())
return;
GL gl = drawable.getGL();
gl.glPushMatrix();
//position so that coords are at its center
//gl.glTranslated(getX(), getY(), getZ());
//getRotation().glRotate(gl);
transform(gl);
gl.glScaled(getSizeX(), getSizeY(), getSizeZ());
if (getStyle().isDrawingFill()) {
GLTools.setColor(gl, getStyle().getFillColor());
gl.glEnable(GL.GL_LIGHTING);
gl.glMaterialfv( GL.GL_FRONT_AND_BACK, GL.GL_AMBIENT_AND_DIFFUSE,
getStyle().getFillColor().getRGBComponents(null));
checkData();
gl.glDisable(GL.GL_CULL_FACE);
preFillGL(drawable);
for (int i = 0; i < data.length; i++) {
gl.glBegin(GL.GL_QUADS);
gl.glNormal3d(normals[i].x, normals[i].y, normals[i].z);
for (int j = data[i].length - 1; j >= 0; j--) {
gl.glVertex3dv(data[i][j]);
}
gl.glEnd();
}
//DrawingPanel3D.GLUT.glutSolidCube(gl, 1);
}
gl.glPopMatrix();
setElementChanged(false);
}
//GLTools
public static void setColor(GL gl, int c) {
gl.glColor4ub((byte)(0xff&(c>>16)), (byte)(0xff&(c>>8)), (byte)(0xff&(c)), (byte)(0xff&(c>>>24)));
}
//GLTools
public static void setColor(GL gl, Color c) {
setColor(gl, c.getRGB());
if (c.getAlpha() < 255) {
gl.glDisable(GL.GL_DEPTH_TEST);
gl.glDisable(GL.GL_CULL_FACE);
}
else {
gl.glEnable(GL.GL_DEPTH_TEST);
gl.glEnable(GL.GL_CULL_FACE);
}
}