Fast rendering of images

Hi guys,

  • Aim: Here is what I am trying to do: imaging you have a print in your hands, so you can move it in all directions, rotate it, etc … Well, that is exactly what I am trying to do, i.e. read an image (.jpg, .tif or whatever),display it, and allow the user to change the viewing angle.

  • Problem: The way I am doing this currently is, for each pixel, to specify its color via glColor3f and draw it thanks to a call to glRectf. Prior to this, I changed the modelview matrix to reflect the viewing angle chosen by the user. It does achieve my aim, i.e. viewing the image under all sorts of angles, but it can become very slow as the size of the image increases. So my question would be, is there a faster/more efficient way to “render” an image in this way? Can anyone provide me some references to this specific topic?

Many thanks

Alex

PS: that might be a stupid question, but can texture help in that particular case?

Try drawing a textured quad.

thanks, I’ve finally read chapter 9 of the red book, which I should have done long ago!