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

Thread: How Do I Bind a Texture to a GLUT Object?

Hybrid View

  1. #1
    Intern Newbie
    Join Date
    Jan 2006
    Posts
    30

    How Do I Bind a Texture to a GLUT Object?

    Hi,

    I'd like to bind a texture to a glutSolidCube.

    When I tried to do this, the colour of the object changed, however the texture was not drawn.

    I imagine this is something to do with the texture coordinates not being set properly.

    Is there a tutorial anywhere that explains how to bind a texture to a glut object, especially how to control the texture coordinates.

    Cheers,

    Chris

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

    Re: How Do I Bind a Texture to a GLUT Object?

    You need to supply texture coordinates with the cube vertices.

    Drawing your own cube is very simple, a useful learning exercise, I suggest you do that instead of using GLUT rendering functions which are mostly useless except for trivial demos.

  3. #3
    Intern Newbie
    Join Date
    Jan 2006
    Posts
    30

    Re: How Do I Bind a Texture to a GLUT Object?

    Thanks,

    Cheers,

    Chris

Posting Permissions

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