Unofficial OpenGL Software Development Kit  0.5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
TextureGeneratorExceptions.h
Go to the documentation of this file.
1 #ifndef GLIMG_TEXTURE_GENERATOR_EXCEPTIONS_H
2 #define GLIMG_TEXTURE_GENERATOR_EXCEPTIONS_H
3 
10 #include <exception>
11 #include <string>
12 
13 namespace glimg
14 {
17 
19  class TextureGenerationException : public std::exception
20  {
21  public:
22  virtual ~TextureGenerationException() throw() {}
23 
24  virtual const char *what() const throw() {return message.c_str();}
25 
26  protected:
27  std::string message;
28  };
29 
32  {
33  public:
35  {
36  message = "The image format is not supported by this OpenGL implementation.";
37  }
38 
39  explicit ImageFormatUnsupportedException(const std::string &msg)
40  {
41  message = "The image format is not supported by this OpenGL implementation for this reason:\n";
42  message += msg;
43  }
44  };
45 
48  {
49  public:
51  {
52  message = "The texture type is not supported by this OpenGL implementation.";
53  }
54 
55  explicit TextureUnsupportedException(const std::string &msg)
56  {
57  message = "The texture type is not supported by this OpenGL implementation for this reason:\n";
58  message += msg;
59  }
60  };
61 
64  {
65  public:
67  {
68  message = "The texture type is not supported by glimg at this time.";
69  }
70 
71  explicit TextureUnexpectedException(const std::string &msg)
72  {
73  message = "The texture type is not supported by glimg at this time:\n";
74  message += msg;
75  }
76  };
77 
80  {
81  public:
83  {
84  message = "The image format cannot be forced to be a renderable format without compromising the data.";
85  }
86  };
87 
90  {
91  public:
93  {
94  message = "The current OpenGL implementation does not support ARB_texture_storage or GL 4.2 or above.";
95  }
96  };
97 
98 
101  {
102  public:
104  {
105  message = "The current OpenGL implementation does not support EXT_direct_state_access";
106  }
107  };
109 }
110 
111 
112 
113 #endif //GLIMG_TEXTURE_GENERATOR_EXCEPTIONS_H