background ?

is there any simple way to draw a picture(.jpg .tga or something) as background ?

  1. Read it using some apropriate function (e.g. libjpeg for jpg files).
  2. Upload it as a texture
  3. Instead of clearing the color buffer, draw a quad with the texture which covers the entire viewport

This method is insensitive to screen/window resolution since the texture will be sceled to fit the viewport (use GL_LINEAR filtering).


I´ll try that.