Unofficial OpenGL Software Development Kit  0.5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Classes | Functions
glimg::loaders::stb Namespace Reference

Contains the loader for PNG, JPEG, TGA, BMP, and GIF formats. More...

Classes

class  StbLoaderException
 Base class for all exceptions thrown by the STB loaders. More...
 
class  UnableToLoadException
 Thrown when the STB loader could not load the image. More...
 

Functions

ImageSetLoadFromFile (const std::string &filename)
 Loads a file from the disk, given an ASCII filename. More...
 
ImageSetLoadFromMemory (const unsigned char *buffer, size_t bufSize)
 As LoadFromFile, but from an already loaded buffer. The buffer pointer may be deleted after this call.
 

Detailed Description

Contains the loader for PNG, JPEG, TGA, BMP, and GIF formats.

Function Documentation

ImageSet* glimg::loaders::stb::LoadFromFile ( const std::string &  filename)

Loads a file from the disk, given an ASCII filename.

This loader uses the public domain STB library to process the files. It therefore can load the following image formats:

  • PNG
  • JPEG (non-progressive)
  • BMP
  • TGA
  • GIF
Exceptions
StbLoaderExceptionCould not load the image. There are derived classes from this type that could be thrown.
Returns
An ImageSet that represents the loaded image data.