Wireframe and non-Wireframe in same scene?

I am wanting to draw an image of the Earth on a sphere and then overlay it with the longitude and latitude lines. I thought this would do the job:


        gl.glPolygonMode(GL.GL_FRONT, GL.GL_FILL);
        
        OpenGlUtils.drawSphere ( gl, null,2.0, 80);
        
        gl.glPolygonMode(GL.GL_FRONT_AND_BACK, GL.GL_LINE);
        
        gl.glBindTexture(GL.GL_TEXTURE_2D, textureIds[2]);
        
        OpenGlUtils.drawSphere ( gl, null,2.01, 20);

but it would seem that glPolygonMode is global for a given display cycle. Are there other approaches that someone could recommend?

Polygon mode is certainly not immutable. The lack of apparent success that you are experiencing may just be because the rendered wireframe is failing the depth buffer check, and so is not visible.

Check out glPolygonOffset for a solution to this.