Results 1 to 9 of 9

Thread: Texture Mapping?

  1. #1
    Member Newbie
    Join Date
    Apr 2001
    Posts
    36

    Texture Mapping?

    I can't seem to find a easy tutorial on texture mapping.. NeHe seems ok but it uses Windows API stuff, and I'm trying to keep it generic.

    All I want to do is map a background onto my scene. I have a BMP..but not sure if thats the format I should use or not?

  2. #2
    Senior Member Frequent Contributor
    Join Date
    Aug 2000
    Location
    Cardiff University
    Posts
    653

    Re: Texture Mapping?

    Have you looked at the other formats available, look at the mac/unix ones I think they use glut, so no os specific api calls. I have been using jpgs recently as the jpg libs available are easy to compile on any os but are a bit big, ease of use tga probably...

  3. #3
    Senior Member Regular Contributor
    Join Date
    Apr 2001
    Posts
    102

    Re: Texture Mapping?

    you have the same problem I had. I couldn't find any glut texture mapping tuts. So I just changed to win32 (like in NeHe)

  4. #4
    Senior Member OpenGL Guru zed's Avatar
    Join Date
    Nov 2010
    Posts
    2,466

  5. #5
    Member Newbie
    Join Date
    Apr 2001
    Posts
    36

    Re: Texture Mapping?

    I guess my real problem is I don't know how to load bitmaps or any type of graphic file..all the tutorials say "we won't tell you how to load the images"....

    I figured out the rest of the stuff, I just dont know how to load the images. is there no functions in glut that do it for me?

  6. #6
    Senior Member OpenGL Guru
    Join Date
    Feb 2000
    Location
    Sweden
    Posts
    2,978

    Re: Texture Mapping?

    GLUT does not load images for you.
    http://nate.scuzzy.net/ got quite alot of nice pieces of code. Under "Common Code", you find some code that loads .TGA files.

  7. #7
    Senior Member Frequent Contributor
    Join Date
    Aug 2000
    Location
    Cardiff University
    Posts
    653

    Re: Texture Mapping?

    once you get the hang of tga have a look at..
    http://www.programmingparadise.com/sources/jpegsrc.html

    I use mac/unix/irix and the code compiles ok on each of these for decompressing/compressing jpg's.

    gav

  8. #8
    Junior Member Newbie
    Join Date
    Jun 2001
    Posts
    10

    Re: Texture Mapping?


  9. #9
    Senior Member Regular Contributor
    Join Date
    Nov 2000
    Location
    Sydney, NSW, Australia
    Posts
    426

    Re: Texture Mapping?

    All you have to do is look at the NeHe Texture Mapping tutorial and go down the bottom and find the GLUT conversion of the source code. Thats how I learned to map BMP images onto quads etc.
    :: Sleep is a poor substitute for caffeine ::

Similar Threads

  1. Texture mapping ::: 3D Face Mapping
    By 3render3 in forum OpenGL: General
    Replies: 2
    Last Post: 03-24-2013, 06:49 PM
  2. projective texture mapping and shadow mapping
    By phoenix_gl in forum OpenGL: Advanced Coding
    Replies: 1
    Last Post: 10-08-2012, 08:00 PM
  3. Replies: 0
    Last Post: 01-09-2005, 05:53 PM
  4. Replies: 1
    Last Post: 01-09-2005, 05:50 PM
  5. Texture Mapping / Environmental Mapping.
    By imported_Andrew in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 12-09-2000, 01:20 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean