Image from file

Started by
3 comments, last by Kalidor 18 years ago
What command do I use to get OpenGL to draw an image from an image file?
Advertisement
Look at NeHe's tutorials (search NeHe on google), I think you want tutorial 7 on texture mapping.
"We've all heard that a million monkeys banging on a million typewriters will eventually reproduce the entire works of Shakespeare. Now, thanks to the internet, we know this is not true." -- Professor Robert Silensky
No, I don't believe that it is. I want to display the image as the background for the opening screen.
load the image as a texture, then draw a quad that covers the whole screen with that texture.
You could use glDrawPixels to write the image directly to the frame buffer. You still need to load the image from the file yourself to get the pixel data. Using a textured quad is the way to go however; that way you only have to transfer the image data to the video card instead of every time you want to draw it.

This topic is closed to new replies.

Advertisement