0024975: Improve of preprocessor directives in header files to be equal to the file...
[occt.git] / src / OpenGl / OpenGl_GlCore11.hxx
1 // Created on: 2012-03-06
2 // Created by: Kirill GAVRILOV
3 // Copyright (c) 2012-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_GlCore11_HeaderFile
17 #define OpenGl_GlCore11_HeaderFile
18
19 #include <OpenGl_GlCore11Fwd.hxx>
20
21 //! OpenGL 1.1 core.
22 //! Notice that all functions within this structure are actually exported by system GL library.
23 //! The main purpose for these hint - to control visibility of functions per GL version
24 //! (global functions should not be used directly to achieve this effect!).
25 struct OpenGl_GlCore11 : protected OpenGl_GlFunctions
26 {
27
28 #if !defined(GL_ES_VERSION_2_0)
29 public:
30
31   inline void glTexEnvi (GLenum target, GLenum pname, GLint param)
32   {
33     ::glTexEnvi (target, pname, param);
34     OpenGl_TRACE(glTexEnvi)
35   }
36
37   inline void glGetTexEnviv (GLenum target, GLenum pname, GLint *params)
38   {
39     ::glGetTexEnviv (target, pname, params);
40     OpenGl_TRACE(glGetTexEnviv)
41   }
42
43   inline void glLogicOp (GLenum opcode)
44   {
45     ::glLogicOp (opcode);
46     OpenGl_TRACE(glLogicOp)
47   }
48
49 public: //! @name Begin/End primitive specification (removed since 3.1)
50
51   inline void glColor4fv (const GLfloat*   theVec)
52   {
53     ::glColor4fv (theVec);
54     OpenGl_TRACE(glColor4fv)
55   }
56
57 public: //! @name Matrix operations (removed since 3.1)
58
59   inline void glMatrixMode (GLenum theMode)
60   {
61     ::glMatrixMode (theMode);
62     OpenGl_TRACE(glMatrixMode)
63   }
64
65   inline void glLoadIdentity()
66   {
67     ::glLoadIdentity();
68     OpenGl_TRACE(glLoadIdentity)
69   }
70
71   inline void glLoadMatrixf (const GLfloat*  theMatrix)
72   {
73     ::glLoadMatrixf (theMatrix);
74     OpenGl_TRACE(glLoadMatrixf)
75   }
76
77 public: //! @name Line and Polygon stipple (removed since 3.1)
78
79   inline void glLineStipple (GLint theFactor, GLushort thePattern)
80   {
81     ::glLineStipple (theFactor, thePattern);
82     OpenGl_TRACE(glLineStipple)
83   }
84
85   inline void glPolygonStipple (const GLubyte* theMask)
86   {
87     ::glPolygonStipple (theMask);
88     OpenGl_TRACE(glPolygonStipple)
89   }
90
91 public: //! @name Fixed pipeline lighting (removed since 3.1)
92
93   inline void glShadeModel (GLenum theMode)
94   {
95     ::glShadeModel (theMode);
96     OpenGl_TRACE(glShadeModel)
97   }
98
99   inline void glLightf (GLenum theLight, GLenum pname, GLfloat param)
100   {
101     ::glLightf (theLight, pname, param);
102     OpenGl_TRACE(glLightf)
103   }
104
105   inline void glLightfv (GLenum theLight, GLenum pname, const GLfloat* params)
106   {
107     ::glLightfv (theLight, pname, params);
108     OpenGl_TRACE(glLightfv)
109   }
110
111   inline void glLightModeli (GLenum pname, GLint param)
112   {
113     ::glLightModeli(pname, param);
114     OpenGl_TRACE(glLightModeli)
115   }
116
117   inline void glLightModelfv (GLenum pname, const GLfloat* params)
118   {
119     ::glLightModelfv(pname, params);
120     OpenGl_TRACE(glLightModelfv)
121   }
122
123   inline void glMaterialf (GLenum face, GLenum pname, GLfloat param)
124   {
125     ::glMaterialf(face, pname, param);
126     OpenGl_TRACE(glMaterialf)
127   }
128
129   inline void glMaterialfv (GLenum face, GLenum pname, const GLfloat* params)
130   {
131     ::glMaterialfv(face, pname, params);
132     OpenGl_TRACE(glMaterialfv)
133   }
134
135   inline void glColorMaterial (GLenum face, GLenum mode)
136   {
137     ::glColorMaterial(face, mode);
138     OpenGl_TRACE(glColorMaterial)
139   }
140
141 public: //! @name clipping plane (removed since 3.1)
142
143   inline void glClipPlane (GLenum thePlane, const GLdouble* theEquation)
144   {
145     ::glClipPlane (thePlane, theEquation);
146     OpenGl_TRACE(glClipPlane)
147   }
148
149 public: //! @name Display lists (removed since 3.1)
150
151   inline void glDeleteLists (GLuint theList, GLsizei theRange)
152   {
153     ::glDeleteLists (theList, theRange);
154     OpenGl_TRACE(glDeleteLists)
155   }
156
157   inline GLuint glGenLists (GLsizei theRange)
158   {
159     const GLuint aRes = ::glGenLists (theRange);
160     OpenGl_TRACE(glGenLists)
161     return aRes;
162   }
163
164   inline void glNewList (GLuint theList, GLenum theMode)
165   {
166     ::glNewList (theList, theMode);
167     OpenGl_TRACE(glNewList)
168   }
169
170   inline void glEndList()
171   {
172     ::glEndList();
173     OpenGl_TRACE(glEndList)
174   }
175
176   inline void glCallList (GLuint theList)
177   {
178     ::glCallList (theList);
179     OpenGl_TRACE(glCallList)
180   }
181
182   inline void glCallLists (GLsizei theNb, GLenum theType, const GLvoid* theLists)
183   {
184     ::glCallLists (theNb, theType, theLists);
185     OpenGl_TRACE(glCallLists)
186   }
187
188   inline void glListBase (GLuint theBase)
189   {
190     ::glListBase (theBase);
191     OpenGl_TRACE(glListBase)
192   }
193
194 public: //! @name Current raster position and Rectangles (removed since 3.1)
195
196   inline void glRasterPos2i (GLint    x, GLint    y)
197   {
198     ::glRasterPos2i (x, y);
199     OpenGl_TRACE(glRasterPos2i)
200   }
201
202   inline void glRasterPos3fv (const GLfloat*  theVec)
203   {
204     ::glRasterPos3fv (theVec);
205     OpenGl_TRACE(glRasterPos3fv)
206   }
207
208 public: //! @name Texture mapping (removed since 3.1)
209
210   inline void glTexGeni (GLenum coord, GLenum pname, GLint param)
211   {
212     ::glTexGeni (coord, pname, param);
213     OpenGl_TRACE(glTexGeni)
214   }
215
216   inline void glTexGenfv (GLenum coord, GLenum pname, const GLfloat* params)
217   {
218     ::glTexGenfv (coord, pname, params);
219     OpenGl_TRACE(glTexGenfv)
220   }
221
222 public: //! @name Pixel copying (removed since 3.1)
223
224   inline void glDrawPixels (GLsizei width, GLsizei height,
225                             GLenum format, GLenum type,
226                             const GLvoid* pixels)
227   {
228     ::glDrawPixels (width, height, format, type, pixels);
229     OpenGl_TRACE(glDrawPixels)
230   }
231
232   inline void glCopyPixels (GLint x, GLint y,
233                     GLsizei width, GLsizei height,
234                     GLenum type)
235   {
236     ::glCopyPixels (x, y, width, height, type);
237     OpenGl_TRACE(glCopyPixels)
238   }
239
240   inline void glBitmap (GLsizei width, GLsizei height,
241                         GLfloat xorig, GLfloat yorig,
242                         GLfloat xmove, GLfloat ymove,
243                         const GLubyte* bitmap)
244   {
245     ::glBitmap (width, height, xorig, yorig, xmove, ymove, bitmap);
246     OpenGl_TRACE(glBitmap)
247   }
248
249 public: //! @name Edge flags and fixed-function vertex processing (removed since 3.1)
250
251   inline void glIndexPointer (GLenum theType, GLsizei theStride, const GLvoid* thePtr)
252   {
253     ::glIndexPointer (theType, theStride, thePtr);
254     OpenGl_TRACE(glIndexPointer)
255   }
256
257   inline void glVertexPointer (GLint theSize, GLenum theType, GLsizei theStride, const GLvoid* thePtr)
258   {
259     ::glVertexPointer (theSize, theType, theStride, thePtr);
260     OpenGl_TRACE(glVertexPointer)
261   }
262
263   inline void glNormalPointer (GLenum theType, GLsizei theStride, const GLvoid* thePtr)
264   {
265     ::glNormalPointer (theType, theStride, thePtr);
266     OpenGl_TRACE(glNormalPointer)
267   }
268
269   inline void glColorPointer (GLint theSize, GLenum theType, GLsizei theStride, const GLvoid* thePtr)
270   {
271     ::glColorPointer (theSize, theType, theStride, thePtr);
272     OpenGl_TRACE(glColorPointer)
273   }
274
275   inline void glTexCoordPointer (GLint theSize, GLenum theType, GLsizei theStride, const GLvoid* thePtr)
276   {
277     ::glTexCoordPointer (theSize, theType, theStride, thePtr);
278     OpenGl_TRACE(glTexCoordPointer)
279   }
280
281   inline void glEnableClientState (GLenum theCap)
282   {
283     ::glEnableClientState (theCap);
284     OpenGl_TRACE(glEnableClientState)
285   }
286
287   inline void glDisableClientState (GLenum theCap)
288   {
289     ::glDisableClientState (theCap);
290     OpenGl_TRACE(glDisableClientState)
291   }
292
293 #endif
294
295 };
296
297 #endif // _OpenGl_GlCore11_Header