PDA

View Full Version : Texture Mapping?



DJKAOS
06-05-2001, 01:46 PM
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?

Gavin
06-05-2001, 02:28 PM
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...

iNsaNEiVaN
06-05-2001, 03:35 PM
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)

zed
06-05-2001, 05:32 PM
http://www.xmission.com/%7Enate/tutors.html

DJKAOS
06-05-2001, 09:03 PM
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?

Bob
06-06-2001, 01:25 AM
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.

Gavin
06-06-2001, 01:45 AM
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

hpsolo
06-08-2001, 11:50 AM
This site might help: http://www.dcs.ed.ac.uk/home/mxr/gfx/2d-hi.html

MrShoe
06-08-2001, 07:57 PM
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.