Unofficial OpenGL Software Development Kit
0.5.0
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
distro
glsdk_0_5_1
glimg
include
glimg
StbLoader.h
Go to the documentation of this file.
1
#ifndef GLIMG_STB_LOADER_H
2
#define GLIMG_STB_LOADER_H
3
4
#include <string>
5
#include "
ImageSet.h
"
6
13
namespace
glimg
14
{
15
namespace
loaders
16
{
22
namespace
stb
23
{
26
28
class
StbLoaderException
:
public
std::exception
29
{
30
public
:
31
32
virtual
~
StbLoaderException
()
throw
() {}
33
34
virtual
const
char
*what()
const
throw
() {
return
message.c_str();}
35
36
protected
:
37
std::string message;
38
};
39
41
class
UnableToLoadException
:
public
StbLoaderException
42
{
43
public
:
44
UnableToLoadException
()
45
{
46
message =
"The memory buffer could not be loaded by STB_image."
;
47
}
48
49
explicit
UnableToLoadException
(
const
std::string &filename)
50
{
51
message =
"The file "
+ filename +
" could not be loaded by STB_image."
;
52
}
53
};
55
71
ImageSet
*
LoadFromFile
(
const
std::string &filename);
72
74
ImageSet
*
LoadFromMemory
(
const
unsigned
char
*buffer,
size_t
bufSize);
75
}
76
}
77
}
78
79
80
#endif //GLIMG_STB_LOADER_H
Generated on Mon Jul 29 2013 05:34:59 for Unofficial OpenGL Software Development Kit by
1.8.3.1