View Full Version : Loading textures from jpg/png file
06-05-2004, 11:47 AM
Hello,can I load texture from jpg/png file directly by some OpenGL function?Or must I converet jpeg/png image to bitmap file first and then load as opengl texture?
Thanks for answers,Mage
06-05-2004, 01:13 PM
OpenGL is not an image loading library it is an API for rendering polygons and, as such, does not support loading any image formats, whether JPG/PNG/BMP/TGA/whatever. It only supports uploading data from memory to the API.
Look into the IJG\'s (http://www.ijg.org/) JPEG implementation, LibPNG (http://www.libpng.org/) and perhaps check out Wotsit.org (http://www.wotsit.org/) for any other formats you may want to support (TGA is quite a handy one).
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.