• Lucid Dreaming - Dream Views




    Results 1 to 3 of 3
    1. #1
      Banned
      Join Date
      Apr 2007
      Location
      Out Chasing Rabbits
      Posts
      15,193
      Likes
      935

      Multiplying automatically generated S and T

      Is there a way to multiply automatically generated S and T values in OpenGL? I have a sphere that I'm trying to wrap a texture around, but this generation technique wraps it around 4 times. It seems S and T are ranging from 0 to 4.

      glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR);
      glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR);
      glEnable(GL_TEXTURE_GEN_S);
      glEnable(GL_TEXTURE_GEN_T);

      ...

      glTexImage2D (GL_TEXTURE_2D, 0, GL_RGB, 256, 256, 0, GL_RGB, GL_UNSIGNED_BYTE, texture);

      ...

      glPushMatrix();
      //elongated sphere for body
      glMaterialfv(GL_FRONT, GL_SPECULAR, bodyspecular);
      glMaterialf(GL_FRONT, GL_SHININESS, 64.0);
      glScalef(1.0, 0.5, 0.1);
      glutSolidSphere(1, 50, 50);
      glPopMatrix();

    2. #2
      FBI agent Ynot's Avatar
      Join Date
      Oct 2005
      Gender
      Location
      Southend, Essex
      Posts
      4,337
      Likes
      14
      (\_ _/)
      (='.'=)
      (")_(")

    3. #3
      Banned
      Join Date
      Apr 2007
      Location
      Out Chasing Rabbits
      Posts
      15,193
      Likes
      935
      no, that's not it.

    Bookmarks

    Posting Permissions

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