PDA

View Full Version : Displaying image with GLUT



IceSoft
01-30-2003, 04:56 PM
Ok I am newbie in this Glut stuff but I I am supposed to do simple computer game. It sayes that I can make the char just simple box but we can all agree that is bit ugly. Is there no simple way of taking image file and display it with GLUT?

IceSoft

nexusone
01-30-2003, 05:46 PM
There is no file loading routines in openGL or GLUT.

Some people use the BMP routine in glaux, but is best to avoid using it since it is outdated library.

There are lot's of tutors on loading images and image loading routines. TGA is one that has a good bit of support. Also can find others.

nehe.gamedev.net has tutor on loading a image on a cube.



Originally posted by IceSoft:
Ok I am newbie in this Glut stuff but I I am supposed to do simple computer game. It sayes that I can make the char just simple box but we can all agree that is bit ugly. Is there no simple way of taking image file and display it with GLUT?

IceSoft



[This message has been edited by nexusone (edited 01-31-2003).]

Gavin
01-31-2003, 01:17 AM
I assume char menas character in the 'person' sense, not the letter? Loading the image is non opengl so depending on platform etc you will have to sort this out seperately. But the way forward, if the above is true, is to texture map the image to a quad.