Java-Gaming.org Java4K winners: [ by our judges | by the community ]         
Featured games (67)
games approved by the League of Dukes
Games in Showcase (∞)
games submitted by our members



News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  Print  
  Wireframe and non-Wireframe in same scene?  (Read 416 times)
0 Members and 1 Guest are viewing this topic.
Offline ajmas

Jr. Member
**

Posts: 66


Miles away from here!


« on: 2007-10-31 10:43:40 »

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:

1  
2  
3  
4  
5  
6  
7  
8  
9  
        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?
Offline ryanm
« League of Dukes »

JGO Strike Force
*****

Posts: 788
Medals: 4


Used to be bleb


« Reply #1 on: 2007-10-31 11:24:00 »

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.
Pages: [1]
  Print  
 
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.109 seconds with 21 queries.