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: Texture is backwards

  1. #1
    Junior Member Newbie
    Join Date
    Apr 2004
    Posts
    3

    Texture is backwards

    I'm looking at the code for the "Textured Sphere" on http://www.codesampler.com/oglsrc.htm and can't figure out how to correct the backwards texture problem. Just look at the screen shot for that tutorial and you'll see what I mean. Thanks for your help!

  2. #2
    Advanced Member Frequent Contributor
    Join Date
    Feb 2004
    Location
    Long Island, New York
    Posts
    586

    Re: Texture is backwards

    Remember that you can perform matrix operations on the texture matrix.

    I was unable to see exactly what you meant from the link you posted but...

    ...if your texture is backwards, try doing a glScalef(-1.0,1.0,1.0) on the texture matrix stack.

    likewise, if you find your texture is upside down, issue a glScalef(1.0,-1.0,1.0) on the texture stack.

Posting Permissions

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