PDA

View Full Version : does opengl provide some functions to load tga ?



jirkamelich
12-10-2002, 11:34 AM
does opengl provide some functions to load tga pictures ?

Old GLman
12-10-2002, 11:37 AM
No, but there are image libraries out there that you can use, or you could write your own loader. The .tga format is very simple to parse, and its not much more difficult to handle compressed images. If you go to www.wotsit.org (http://www.wotsit.org) you can find the .tga specification.

Old GLman

nexusone
12-10-2002, 12:14 PM
No, you have to use your own routine of someone elses.
I have a TGA loader that I use on my website.
http://www.angelfire.com/linux/nexusone/index.html



Originally posted by jirkamelich:
does opengl provide some functions to load tga pictures ?

12-10-2002, 05:49 PM
Originally posted by jirkamelich:
does opengl provide some functions to load tga pictures ?

Yeah, they are called fopen() and fread(). http://www.opengl.org/discussion_boards/ubb/smile.gif Funny thing though--they moved the documentation for these functions from the "OpenGL" section over to the "C runtime library" section of the help file, for some odd reason. http://www.opengl.org/discussion_boards/ubb/wink.gif

marcus256
12-12-2002, 03:37 AM
If you use GLFW (http://hem.passagen.se/opengl/glfw) instead of GLUT, win32 API, MFC, glX or whatever, you can load TGA files (either to local memory or directly to texture memory) with a simple function call.

dabeav
12-12-2002, 11:17 AM
www.imagelib.org (http://www.imagelib.org) devIL, by far the BEST image loader, with native opengl style syntax i have found yet.