Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: sphere mapping problem

  1. #1
    Junior Member Newbie
    Join Date
    Mar 2005
    Posts
    1

    sphere mapping problem

    hi,everyone,i am working a program with opengl,but
    now i have a problem. I draw a sphere with gluSphere function and map a texture on it with .bmp image,but when i spin the sphere with the mouse ,the texture lools like distorted,sometimes bigger ,someties samller and it is not a circle,what is the matter with i program
    i come here for studying

  2. #2
    Super Moderator OpenGL Guru dorbie's Avatar
    Join Date
    Jul 2000
    Location
    Bay Area, CA, USA
    Posts
    4,388

    Re: sphere mapping problem

    You need to map the texture coordinates appropriately. If you're not happy with glutsphere and teh mapping of coordinates then make your own.

    In general you need to consider how a texture might be mapped on any object, consider an image on a rubber sheet and a sphere, just how is any graphics system supposed to map that rubber sheet onto a sphere. Obviously there will be some stretching and shrinking of the sheet to make it fit.

    You get to choose how best to fit the image on the object by specifying texture coordinates at each vertex.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •