Unofficial OpenGL Software Development Kit  0.5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ImageCreatorExceptions.h
1 
2 #ifndef GLIMG_IMAGE_CREATOR_EXCEPTIONS_H
3 #define GLIMG_IMAGE_CREATOR_EXCEPTIONS_H
4 
5 #include <string>
6 #include <exception>
7 
8 namespace glimg
9 {
12 
14  class ImageCreationException : public std::exception
15  {
16  public:
17  virtual ~ImageCreationException() throw() {}
18 
19  virtual const char *what() const throw() {return message.c_str();}
20 
21  protected:
22  std::string message;
23  };
24 
27  {
28  public:
30  {
31  message = "Must pass 1 or 6 as the face count.";
32  }
33  };
34 
37  {
38  public:
40  {
41  message = "Textures with a face count of 6 MUST be 2D textures.";
42  }
43  };
44 
47  {
48  public:
50  {
51  message = "Images cannot be 3D arrays.";
52  }
53  };
54 
57  {
58  public:
60  {
61  message = "Mipmap and array count must be > 0.";
62  }
63  };
64 
67  {
68  public:
70  {
71  message = "Attempted to add an image to an array index that doesn't exist.";
72  }
73  };
74 
77  {
78  public:
80  {
81  message = "Attempted to add an image to a mipmap layer that doesn't exist.";
82  }
83  };
84 
87  {
88  public:
90  {
91  message = "Attempted to add an image to a face index that doesn't exist.";
92  }
93  };
94 
97  {
98  public:
100  {
101  message = "Attempted to use an ImageCreator that has already been used to create an ImageSet.";
102  }
103  };
105 }
106 
107 
108 #endif //GLIMG_IMAGE_CREATOR_EXCEPTIONS_H