Results 1 to 2 of 2

Thread: smooth texture mapping on sphere

  1. #1
    Junior Member Newbie
    Join Date
    May 2003
    Location
    Graefelfing, Germany
    Posts
    3

    smooth texture mapping on sphere

    Hello,
    I am struggling with mapping textures on wireframe spheres in a way that they continue smoothly at the polygon edges. In my current implementation, you can see where the next polygon starts. Who can help me? My current texture map initialization looks like this:
    glTexImage2D(GL_TEXTURE_2D,0,3,p_dib->Width(),p_dib->Height(),0,GL_BGR_EXT,GL_UNSIGNED_BYTE,(GLvoid *)p_dib->GetBits());
    glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S, GL_REPEAT);
    glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_WRAP_T, GL_REPEAT);
    glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTE R, GL_NEAREST);
    glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTE R, GL_NEAREST);
    glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);//GL_DECAL);

    glEnable( GL_TEXTURE_2D );
    ...
    ... and then rendering of the triangles, using the glTexCoord2d() command.

    Thanks very much for your help!
    HarryB

  2. #2
    Senior Member Regular Contributor
    Join Date
    Aug 2003
    Posts
    369

    Re: smooth texture mapping on sphere

    You could take a look at glu's quadric gluSphere. It served me well in the past. And all texture coordinate mapping is automatically done for you, when you enable it with gluQuadricTexture. Good luck!

Similar Threads

  1. Sphere texture mapping
    By pedr0 in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 12-22-2010, 05:04 AM
  2. Sphere Texture Mapping
    By girish3110 in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 01-07-2008, 11:21 AM
  3. smooth texture mapping on sphere
    By HarryB in forum OpenGL: User Software
    Replies: 2
    Last Post: 03-05-2005, 01:47 AM
  4. Mapping texture to an sphere
    By thorsan in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 02-23-2004, 12:10 PM
  5. Smooth texture mapping
    By gib in forum OpenGL: Advanced Coding
    Replies: 1
    Last Post: 03-05-2003, 06:26 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean