13 #ifndef OGLPLUS_ERROR_OBJECT_1107121317_HPP
14 #define OGLPLUS_ERROR_OBJECT_1107121317_HPP
28 #if !OGLPLUS_ERROR_NO_OBJECT_TYPE
31 #if !OGLPLUS_ERROR_NO_BIND_TARGET
34 #if !OGLPLUS_ERROR_NO_TARGET_NAME
35 const char* _tgt_name;
44 #if !OGLPLUS_ERROR_NO_OBJECT_TYPE
45 _obj_type = GLenum(obj_type);
57 template <
typename BindTarget_>
60 #if !OGLPLUS_ERROR_NO_BIND_TARGET
61 _bind_tgt = GLenum(bind_tgt);
63 #if !OGLPLUS_ERROR_NO_TARGET_NAME
76 template <
typename ObjTag>
79 #if !OGLPLUS_ERROR_NO_OBJECT_TYPE
82 _obj_typeid = ObjTag::value;
93 template <
typename BindTarget_>
96 typedef typename ObjectTargetTag<BindTarget_>::Type Tag;
97 Object(ObjBindingOps<Tag>::Binding(bind_tgt));
101 template <
typename BindTarget_>
102 ObjectError& ObjectBinding(BindTarget_ bind_tgt, GLuint index)
104 typedef typename ObjectTargetTag<BindTarget_>::Type Tag;
105 Object(ObjBindingOps<Tag>::Binding(bind_tgt, index));
110 class ObjectPairError
114 #if !OGLPLUS_ERROR_NO_OBJECT_TYPE
120 ObjectPairError(
const char* message);
124 #if !OGLPLUS_ERROR_NO_OBJECT_TYPE
125 _sub_type = GLenum(sub_type);
132 GLenum SubjectType(
void)
const;
135 const char* SubjectTypeName(
void)
const;
137 template <
typename ObjTag>
140 _sub_typeid = ObjTag::value;
146 GLint SubjectName(
void)
const;
149 const String& SubjectDesc(
void)
const;
151 template <
typename BindTarget_>
152 ObjectPairError& SubjectBinding(BindTarget_ bind_tgt)
154 typedef typename ObjectTargetTag<BindTarget_>::Type Tag;
155 return Subject(ObjBindingOps<Tag>::Binding(bind_tgt));
161 #if !OGLPLUS_LINK_LIBRARY || defined(OGLPLUS_IMPLEMENTING_LIBRARY)
162 #include <oglplus/error/object.ipp>
165 #endif // include guard
const Char * c_str(void) const
Returns the null-terminated c-string.
Definition: ref_tpl.hpp:200
const String & ObjectDesc(void) const
Object textual description.
StrCRef EnumValueName(Enum enum_value)
Returns the name of the GL enumerated value for an OGLplus enum value.
GLint ObjectName(void) const
Object GL name.
const char * ObjectTypeName(void) const
Returns the class name.
::std::basic_string< ALchar > String
GLuint GetGLName(ObjectName< ObjTag > named)
Returns the GLuint OpenGL name assigned to named object.
Definition: name.hpp:38
ObjectType
Enumeration of object types.
Definition: type.hpp:25
::std::basic_string< GLchar > String
String class.
Definition: def.hpp:36
Exception class for general OpenGL errors.
Definition: basic.hpp:43
const char * TargetName(void) const
Returns the bind target name.
Exception class for GL object-related errors.
Definition: object.hpp:24
Declaration of basic OGLplus' exceptions.
GLenum ObjectType(void) const
Returns the object type.
Base class for OpenGL "named" objects.
GLenum BindTarget(void) const
Returns the bind target.
A common template for "named" objects like textures, buffers, etc.
Definition: fwd.hpp:136