3c24b4bfcedef38776ef65a44aa179741e80701e
[occt.git] / src / OpenGl / OpenGl_GlCore30.hxx
1 // Created on: 2014-03-17
2 // Created by: Kirill GAVRILOV
3 // Copyright (c) 2014 OPEN CASCADE SAS
4 //
5 // This file is part of Open CASCADE Technology software library.
6 //
7 // This library is free software; you can redistribute it and/or modify it under
8 // the terms of the GNU Lesser General Public License version 2.1 as published
9 // by the Free Software Foundation, with special exception defined in the file
10 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 // distribution for complete text of the license and disclaimer of any warranty.
12 //
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
15
16 #ifndef _OpenGl_GlCore30_Header
17 #define _OpenGl_GlCore30_Header
18
19 #include <OpenGl_GlCore21.hxx>
20
21 //! OpenGL 3.0 core.
22 //! This is first version with deprecation model introduced
23 //! - a lot of functionality regarding to fixed pipeline were marked deprecated.
24 //! Notice that nothing were actually removed in this version (unless Forward context loaded)!
25 template<typename theBaseClass_t>
26 struct OpenGl_TmplCore30 : public theBaseClass_t
27 {
28
29 public: //! @name GL_ARB_framebuffer_object (added to OpenGL 3.0 core)
30
31   using theBaseClass_t::glIsRenderbuffer;
32   using theBaseClass_t::glBindRenderbuffer;
33   using theBaseClass_t::glDeleteRenderbuffers;
34   using theBaseClass_t::glGenRenderbuffers;
35   using theBaseClass_t::glRenderbufferStorage;
36   using theBaseClass_t::glGetRenderbufferParameteriv;
37   using theBaseClass_t::glIsFramebuffer;
38   using theBaseClass_t::glBindFramebuffer;
39   using theBaseClass_t::glDeleteFramebuffers;
40   using theBaseClass_t::glGenFramebuffers;
41   using theBaseClass_t::glCheckFramebufferStatus;
42   using theBaseClass_t::glFramebufferTexture2D;
43   using theBaseClass_t::glFramebufferRenderbuffer;
44   using theBaseClass_t::glGetFramebufferAttachmentParameteriv;
45   using theBaseClass_t::glGenerateMipmap;
46   using theBaseClass_t::glBlitFramebuffer;
47   using theBaseClass_t::glRenderbufferStorageMultisample;
48   using theBaseClass_t::glFramebufferTextureLayer;
49 #if !defined(GL_ES_VERSION_2_0)
50   using theBaseClass_t::glFramebufferTexture1D;
51   using theBaseClass_t::glFramebufferTexture3D;
52 #endif
53
54 public: //! @name GL_ARB_vertex_array_object (added to OpenGL 3.0 core)
55
56   using theBaseClass_t::glBindVertexArray;
57   using theBaseClass_t::glDeleteVertexArrays;
58   using theBaseClass_t::glGenVertexArrays;
59   using theBaseClass_t::glIsVertexArray;
60
61 public: //! @name GL_ARB_map_buffer_range (added to OpenGL 3.0 core)
62
63 #ifndef __EMSCRIPTEN__
64   using theBaseClass_t::glMapBufferRange;
65   using theBaseClass_t::glFlushMappedBufferRange;
66 #endif
67
68 public: //! @name OpenGL 3.0 additives to 2.1
69
70   using theBaseClass_t::glGetBooleani_v;
71   using theBaseClass_t::glGetIntegeri_v;
72   using theBaseClass_t::glBeginTransformFeedback;
73   using theBaseClass_t::glEndTransformFeedback;
74   using theBaseClass_t::glBindBufferRange;
75   using theBaseClass_t::glBindBufferBase;
76   using theBaseClass_t::glTransformFeedbackVaryings;
77   using theBaseClass_t::glGetTransformFeedbackVarying;
78   using theBaseClass_t::glVertexAttribIPointer;
79   using theBaseClass_t::glGetVertexAttribIiv;
80   using theBaseClass_t::glGetVertexAttribIuiv;
81   using theBaseClass_t::glVertexAttribI4i;
82   using theBaseClass_t::glVertexAttribI4ui;
83   using theBaseClass_t::glVertexAttribI4iv;
84   using theBaseClass_t::glVertexAttribI4uiv;
85   using theBaseClass_t::glGetUniformuiv;
86   using theBaseClass_t::glGetFragDataLocation;
87   using theBaseClass_t::glUniform1ui;
88   using theBaseClass_t::glUniform2ui;
89   using theBaseClass_t::glUniform3ui;
90   using theBaseClass_t::glUniform4ui;
91   using theBaseClass_t::glUniform1uiv;
92   using theBaseClass_t::glUniform2uiv;
93   using theBaseClass_t::glUniform3uiv;
94   using theBaseClass_t::glUniform4uiv;
95   using theBaseClass_t::glClearBufferiv;
96   using theBaseClass_t::glClearBufferuiv;
97   using theBaseClass_t::glClearBufferfv;
98   using theBaseClass_t::glClearBufferfi;
99   using theBaseClass_t::glGetStringi;
100
101 #if !defined(GL_ES_VERSION_2_0)
102   // the following have been added only in OpenGL ES 3.2
103   using theBaseClass_t::glColorMaski;
104   using theBaseClass_t::glEnablei;
105   using theBaseClass_t::glDisablei;
106   using theBaseClass_t::glIsEnabledi;
107
108   using theBaseClass_t::glTexParameterIiv;
109   using theBaseClass_t::glTexParameterIuiv;
110   using theBaseClass_t::glGetTexParameterIiv;
111   using theBaseClass_t::glGetTexParameterIuiv;
112 #endif
113
114 #if !defined(GL_ES_VERSION_2_0)
115   // the following are defined only on desktop OpenGL
116   using theBaseClass_t::glClampColor;
117   using theBaseClass_t::glBeginConditionalRender;
118   using theBaseClass_t::glEndConditionalRender;
119   using theBaseClass_t::glBindFragDataLocation;
120   using theBaseClass_t::glVertexAttribI1i;
121   using theBaseClass_t::glVertexAttribI2i;
122   using theBaseClass_t::glVertexAttribI3i;
123   using theBaseClass_t::glVertexAttribI1ui;
124   using theBaseClass_t::glVertexAttribI2ui;
125   using theBaseClass_t::glVertexAttribI3ui;
126   using theBaseClass_t::glVertexAttribI1iv;
127   using theBaseClass_t::glVertexAttribI2iv;
128   using theBaseClass_t::glVertexAttribI3iv;
129   using theBaseClass_t::glVertexAttribI1uiv;
130   using theBaseClass_t::glVertexAttribI2uiv;
131   using theBaseClass_t::glVertexAttribI3uiv;
132   using theBaseClass_t::glVertexAttribI4bv;
133   using theBaseClass_t::glVertexAttribI4sv;
134   using theBaseClass_t::glVertexAttribI4ubv;
135   using theBaseClass_t::glVertexAttribI4usv;
136 #endif
137
138 #if defined(GL_ES_VERSION_2_0)
139   // the following functions from OpenGL 1.5 have been added only in OpenGL ES 3.0
140   using theBaseClass_t::glGenQueries;
141   using theBaseClass_t::glDeleteQueries;
142   using theBaseClass_t::glIsQuery;
143   using theBaseClass_t::glBeginQuery;
144   using theBaseClass_t::glEndQuery;
145   using theBaseClass_t::glGetQueryiv;
146   using theBaseClass_t::glGetQueryObjectuiv;
147 #ifndef __EMSCRIPTEN__
148   using theBaseClass_t::glUnmapBuffer;
149 #endif
150 #endif
151 };
152
153 //! OpenGL 3.0 core based on 2.1 version.
154 typedef OpenGl_TmplCore30<OpenGl_GlCore21>    OpenGl_GlCore30;
155
156 //! OpenGL 3.0 without deprecated entry points.
157 //! Notice that this doesn't actually corresponds to GL3.0 forward profile!
158 typedef OpenGl_TmplCore30<OpenGl_GlCore21Fwd> OpenGl_GlCore30Fwd;
159
160 #endif // _OpenGl_GlCore30_Header