OpenGL and reading tif files

  • Make sure you have Sam Leffler's libtiff library.
  • Put the code below in the appropriate places in your C/C++ file, taking note of the inclusion of the tiffio.h file.
  • Don't forget to generate your texture's memory (glGenTextures(...))
    Add this code to be able to write out the frame buffer to a tif file: