Hey all,
I've recently started programming a very, very, basic doom-like/quake-like engine using LWJGL - it's more or less a learning project. I started on OpenGL 1/2 and now I'm working with OpenGL 3/4 and I've run into a bit of an issue:

The issue, if it's not quite as obvious as I think it is, is that the edges where the triangles meet appear to wobble, depending on the angle you're looking.
These are the enables/hints I've got set:
GL11.glEnable(GL11.GL_DEPTH_TEST);
GL11.glEnable(GL11.GL_LINE_SMOOTH);
GL11.glEnable(GL11.GL_POLYGON_SMOOTH);
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glHint(GL20.GL_FRAGMENT_SHADER_DERIVATIVE_HINT, GL11.GL_NICEST);
GL11.glHint(GL11.GL_LINE_SMOOTH_HINT, GL11.GL_NICEST);
GL11.glHint(GL11.GL_POLYGON_SMOOTH_HINT, GL11.GL_NICEST);
GL11.glDepthFunc(GL11.GL_LESS);
GL11.glCullFace(GL11.GL_BACK);
GL11.glFrontFace(GL11.GL_CCW);
Changing the hints and/or enables/disables appears to have no effects on the issue. If I turn off backface culling the colours on the hidden faces "creep" over the top of the top face where the edge "wobbles".
I'm sure this isn't the fragment or vertex shader because even if they just pass the position/colour through them the issue persists.
Has this issue happened to anyone else before and any clue what causes it?
I'm happy to provide any code, though it might not be completely standard java code (I'm new to java, but programmed in free pascal for a few years), I just don't know what is relevant in this case.
Just some information about what I've got:
- I have 3 matrices (Projection, Viewing and Model) and a computed normal matrix for use in lighting.
- The cube is composed of 12 triangles, all defined CCW
- The cube is rendered as GL_TRIANGLES
- This prism is a cube scaled on the X and Z by a factor of 10 (Even if unscaled, the issue persists)
- The window has an OpenGL 4.3 context (The context version seems to have no effect, though it requires a minimum context of 3.0)
Thanks for your time!