OpenGL - texture mapping and glutSolidSphere

This is a discussion on OpenGL - texture mapping and glutSolidSphere within the Game Programming forums, part of the General Programming Boards category; I have this image of earth surface, and I want to map it to a glutSolidSphere. When I use Code: ...

  1. #1
    Lode Runner
    Join Date
    May 2004
    Posts
    53

    OpenGL - texture mapping and glutSolidSphere

    I have this image of earth surface, and I want to map it to a glutSolidSphere. When I use
    Code:
    glTexGeni(GL_S,GL_TEXTURE_GEN_MODE,GL_SPHERE_MAP);
    I get strange results.

    My texture is fully visible from one side of the sphere, and when I turn, the scene, the texture does not turn with the sphere. It's like I'm always seeing the same side of the sphere. I don't see how to map the image all around the sphere.

    my image file and the results are visible at my website

  2. #2
    Banned
    Join Date
    May 2004
    Posts
    129
    I have never been able to get glutSphere to work properly with textures. I suggest trying a gluSphere (it's the only one I have been able to properly wrap a texture around).

    If I can, I will send you a little program that demonstrates the earth and moon in orbit around each other (also does some lighting effects), which uses a textured gluSphere (so you can see the actual implementation details).

    Otherwise good luck (sphere texturing is one of the more painful things you can do, even if you aren't doing it manually).

  3. #3
    Lode Runner
    Join Date
    May 2004
    Posts
    53
    I would really like that source of yours :P

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21