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 4 of 4

Thread: Texturing non-primitive objects...

  1. #1
    Junior Member Regular Contributor
    Join Date
    Aug 2000
    Posts
    121

    Texturing non-primitive objects...

    Maybe you can help me. I know how to texture a cube, a single rectangle, etc. but I dont have any idea on how to texture, an sphere or an irregular body (e.g. a face). I read the red book but didnt find any information about this. I think I hav to set texture coordinates but dont know how to do that with irregular objects...Thx!

  2. #2
    Junior Member Newbie
    Join Date
    Apr 2000
    Location
    FRANCE
    Posts
    9

    Re: Texturing non-primitive objects...

    hi !! take a look for quadrics objects

  3. #3
    Junior Member Newbie
    Join Date
    Jun 2001
    Location
    France
    Posts
    19

    Re: Texturing non-primitive objects...

    As far as quadrics are concerned (spheres, cylinders, disks, etc ...), you just have to enable automatic texture coordinates generation with :

    gluQuadricTexture(..,GL_TRUE);

    before calling gluSphere(...), gluCylinder(...),...

    RCMaster

  4. #4
    Advanced Member Frequent Contributor
    Join Date
    Aug 2000
    Location
    Cardiff University
    Posts
    654

    Re: Texturing non-primitive objects...

    But quadrics are limited to simple shapes. Otherwise you have to calculate the texture/poly vertex coords yourself. Or model it in 3d max/softimage/maya or something similar which can export the polygin and teture coords for you

Posting Permissions

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