OGLplus (0.52.0) a C++ wrapper for OpenGL

type.hpp
Go to the documentation of this file.
1 
12 #pragma once
13 #ifndef OGLPLUS_OBJECT_TYPE_1405022040_HPP
14 #define OGLPLUS_OBJECT_TYPE_1405022040_HPP
15 
16 #include <oglplus/enumerations.hpp>
17 #include <oglplus/object/tags.hpp>
18 
19 namespace oglplus {
20 
22 
25 OGLPLUS_ENUM_CLASS_BEGIN(ObjectType, GLenum)
26 #include <oglplus/enums/object_type.ipp>
27 OGLPLUS_ENUM_CLASS_END(ObjectType)
28 
29 #if !OGLPLUS_NO_ENUM_VALUE_NAMES
30 #include <oglplus/enums/object_type_names.ipp>
31 #endif
32 
33 #if !OGLPLUS_ENUM_VALUE_RANGES
34 #include <oglplus/enums/object_type_range.ipp>
35 #endif
36 
37 template <typename ObjTag>
38 struct ObjTypeOps
39 {
40  static oglplus::ObjectType ObjectType(void)
41  {
42  return oglplus::ObjectType(GL_NONE);
43  }
44 };
45 
46 #define OGLPLUS_SPEC_OBJ_TYPE_OPS(TYPE) \
47 template <> \
48 struct ObjTypeOps<tag::TYPE> \
49 { \
50  static oglplus::ObjectType ObjectType(void) \
51  { \
52  return oglplus::ObjectType::TYPE; \
53  } \
54 };
55 
56 #ifdef GL_BUFFER
57 OGLPLUS_SPEC_OBJ_TYPE_OPS(Buffer)
58 #endif
59 #ifdef GL_FRAMEBUFFER
60 OGLPLUS_SPEC_OBJ_TYPE_OPS(Framebuffer)
61 #endif
62 #ifdef GL_PROGRAM_PIPELINE
63 OGLPLUS_SPEC_OBJ_TYPE_OPS(ProgramPipeline)
64 #endif
65 #ifdef GL_PROGRAM
66 OGLPLUS_SPEC_OBJ_TYPE_OPS(Program)
67 #endif
68 #ifdef GL_QUERY
69 OGLPLUS_SPEC_OBJ_TYPE_OPS(Query)
70 #endif
71 #ifdef GL_RENDERBUFFER
72 OGLPLUS_SPEC_OBJ_TYPE_OPS(Renderbuffer)
73 #endif
74 #ifdef GL_SAMPLER
75 OGLPLUS_SPEC_OBJ_TYPE_OPS(Sampler)
76 #endif
77 #ifdef GL_SHADER
78 OGLPLUS_SPEC_OBJ_TYPE_OPS(Shader)
79 #endif
80 #ifdef GL_TEXTURE
81 OGLPLUS_SPEC_OBJ_TYPE_OPS(Texture)
82 #endif
83 #ifdef GL_TRANSFORM_FEEDBACK
84 OGLPLUS_SPEC_OBJ_TYPE_OPS(TransformFeedback)
85 #endif
86 #ifdef GL_VERTEX_ARRAY
87 OGLPLUS_SPEC_OBJ_TYPE_OPS(VertexArray)
88 #endif
89 
90 #undef OGLPLUS_SPEC_OBJ_TYPE_OPS
91 
92 } // namespace oglplus
93 
94 #endif // include guard
Object< TransformFeedbackOps > TransformFeedback
An oglplus_object encapsulating the OpenGL transform feedback functionality.
Definition: transform_feedback.hpp:408
Object< TextureOps > Texture
An oglplus_object encapsulating the texture object functionality.
Definition: texture.hpp:3217
Object< SamplerOps > Sampler
An oglplus_object encapsulating the OpenGL sampler functionality.
Definition: sampler.hpp:877
Enumeration-related declarations.
Object< ProgramPipelineOps > ProgramPipeline
An oglplus_object encapsulating the OpenGL program pipeline functionality.
Definition: program_pipeline.hpp:348
ObjectType
Enumeration of object types.
Definition: type.hpp:25
GL Object tag types.
Object< BufferOps > Buffer
Object< QueryOps > Query
An oglplus_object encapsulating the asynchronous query functionality.
Definition: query.hpp:537
Object< ProgramOps > Program
An oglplus_object encapsulating the program object functionality.
Definition: program.hpp:867
Object< FramebufferOps > Framebuffer
An oglplus_object encapsulating the framebuffer object functionality.
Definition: framebuffer.hpp:733
Object< VertexArrayOps > VertexArray
An oglplus_object encapsulating vertex array object functionality.
Definition: vertex_array.hpp:150
Object< RenderbufferOps > Renderbuffer
An oglplus_object encapsulating the renderbuffer object functionality.
Definition: renderbuffer.hpp:401

Copyright © 2010-2014 Matúš Chochlík, University of Žilina, Žilina, Slovakia.
<matus.chochlik -at- fri.uniza.sk>
<chochlik -at -gmail.com>
Documentation generated on Mon Sep 22 2014 by Doxygen (version 1.8.6).