1 // Created on: 2014-03-17
2 // Created by: Kirill GAVRILOV
3 // Copyright (c) 2014 OPEN CASCADE SAS
5 // This file is part of Open CASCADE Technology software library.
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.
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
16 #ifndef _OpenGl_GlCore11Fwd_Header
17 #define _OpenGl_GlCore11Fwd_Header
19 #include <OpenGl_GlFunctions.hxx>
21 //! OpenGL 1.1 core without deprecated Fixed Pipeline entry points.
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_GlCore11Fwd : protected OpenGl_GlFunctions
28 public: //! @name Miscellaneous
30 inline void glClearIndex (GLfloat c)
35 inline void glClearColor (GLclampf theRed, GLclampf theGreen, GLclampf theBlue, GLclampf theAlpha)
37 ::glClearColor (theRed, theGreen, theBlue, theAlpha);
40 inline void glClear (GLbitfield theMask)
45 inline void glIndexMask (GLuint theMask)
47 ::glIndexMask (theMask);
50 inline void glColorMask (GLboolean theRed, GLboolean theGreen, GLboolean theBlue, GLboolean theAlpha)
52 ::glColorMask (theRed, theGreen, theBlue, theAlpha);
55 inline void glAlphaFunc (GLenum theFunc, GLclampf theRef)
57 ::glAlphaFunc (theFunc, theRef);
60 inline void glBlendFunc (GLenum sfactor, GLenum dfactor)
62 ::glBlendFunc(sfactor, dfactor);
65 inline void glLogicOp (GLenum opcode)
70 inline void glCullFace (GLenum theMode)
72 ::glCullFace (theMode);
75 inline void glFrontFace (GLenum theMode)
77 ::glFrontFace (theMode);
80 inline void glPointSize (GLfloat theSize)
82 ::glPointSize (theSize);
85 inline void glLineWidth (GLfloat theWidth)
87 ::glLineWidth (theWidth);
90 inline void glPolygonMode (GLenum theFace, GLenum theMode)
92 ::glPolygonMode (theFace, theMode);
95 inline void glPolygonOffset (GLfloat theFactor, GLfloat theUnits)
97 ::glPolygonOffset (theFactor, theUnits);
100 inline void glScissor (GLint theX, GLint theY, GLsizei theWidth, GLsizei theHeight)
102 ::glScissor (theX, theY, theWidth, theHeight);
105 inline void glDrawBuffer (GLenum theMode)
107 ::glDrawBuffer (theMode);
110 inline void glReadBuffer (GLenum theMode)
112 ::glReadBuffer (theMode);
115 inline void glEnable (GLenum theCap)
120 inline void glDisable (GLenum theCap)
122 ::glDisable (theCap);
125 inline GLboolean glIsEnabled (GLenum theCap)
127 return ::glIsEnabled (theCap);
130 inline void glGetBooleanv (GLenum theParamName, GLboolean* theValues)
132 ::glGetBooleanv (theParamName, theValues);
135 inline void glGetDoublev (GLenum theParamName, GLdouble* theValues)
137 ::glGetDoublev (theParamName, theValues);
140 inline void glGetFloatv (GLenum theParamName, GLfloat* theValues)
142 ::glGetFloatv (theParamName, theValues);
145 inline void glGetIntegerv (GLenum theParamName, GLint* theValues)
147 ::glGetIntegerv (theParamName, theValues);
150 inline GLint glRenderMode (GLenum theMode)
152 return ::glRenderMode (theMode);
155 inline GLenum glGetError()
157 return ::glGetError();
160 inline const GLubyte* glGetString (GLenum theName)
162 return ::glGetString (theName);
165 inline void glFinish()
170 inline void glFlush()
175 inline void glHint (GLenum theTarget, GLenum theMode)
177 ::glHint (theTarget, theMode);
180 public: //! @name Depth Buffer
182 inline void glClearDepth (GLclampd theDepth)
184 ::glClearDepth (theDepth);
187 inline void glDepthFunc (GLenum theFunc)
189 ::glDepthFunc (theFunc);
192 inline void glDepthMask (GLboolean theFlag)
194 ::glDepthMask (theFlag);
197 inline void glDepthRange (GLclampd theNearValue, GLclampd theFarValue)
199 ::glDepthRange (theNearValue, theFarValue);
202 public: //! @name Transformation
204 inline void glViewport (GLint theX, GLint theY, GLsizei theWidth, GLsizei theHeight)
206 ::glViewport (theX, theY, theWidth, theHeight);
209 public: //! @name Vertex Arrays
211 inline void glArrayElement (GLint i)
213 ::glArrayElement (i);
216 inline void glDrawArrays (GLenum theMode, GLint theFirst, GLsizei theCount)
218 ::glDrawArrays (theMode, theFirst, theCount);
221 inline void glDrawElements (GLenum theMode, GLsizei theCount, GLenum theType, const GLvoid* theIndices)
223 ::glDrawElements (theMode, theCount, theType, theIndices);
226 public: //! @name Raster functions
228 inline void glPixelStoref (GLenum theParamName, GLfloat theParam)
230 ::glPixelStoref (theParamName, theParam);
233 inline void glPixelStorei (GLenum theParamName, GLint theParam)
235 ::glPixelStorei (theParamName, theParam);
238 inline void glPixelTransferf (GLenum theParamName, GLfloat theParam)
240 ::glPixelTransferf (theParamName, theParam);
243 inline void glPixelTransferi (GLenum theParamName, GLint theParam)
245 ::glPixelTransferi (theParamName, theParam);
248 inline void glPixelMapfv (GLenum map, GLsizei mapsize, const GLfloat* values)
250 ::glPixelMapfv (map, mapsize, values);
253 inline void glPixelMapuiv (GLenum map, GLsizei mapsize, const GLuint* values)
255 ::glPixelMapuiv (map, mapsize, values);
258 inline void glPixelMapusv (GLenum map, GLsizei mapsize, const GLushort* values)
260 ::glPixelMapusv (map, mapsize, values);
263 inline void glGetPixelMapfv (GLenum map, GLfloat* values)
265 ::glGetPixelMapfv (map, values);
268 inline void glGetPixelMapuiv (GLenum map, GLuint* values)
270 ::glGetPixelMapuiv (map, values);
273 inline void glGetPixelMapusv (GLenum map, GLushort* values)
275 ::glGetPixelMapusv (map, values);
278 inline void glReadPixels (GLint x, GLint y,
279 GLsizei width, GLsizei height,
280 GLenum format, GLenum type,
283 ::glReadPixels (x, y, width, height, format, type, pixels);
286 public: //! @name Stenciling
288 inline void glStencilFunc (GLenum func, GLint ref, GLuint mask)
290 ::glStencilFunc (func, ref, mask);
293 inline void glStencilMask (GLuint mask)
295 ::glStencilMask (mask);
298 inline void glStencilOp (GLenum fail, GLenum zfail, GLenum zpass)
300 ::glStencilOp (fail, zfail, zpass);
303 inline void glClearStencil (GLint s)
305 ::glClearStencil (s);
308 public: //! @name Texture mapping
310 inline void glTexEnvf (GLenum target, GLenum pname, GLfloat param)
312 ::glTexEnvf (target, pname, param);
315 inline void glTexEnvi (GLenum target, GLenum pname, GLint param)
317 ::glTexEnvi (target, pname, param);
320 inline void glTexEnvfv (GLenum target, GLenum pname, const GLfloat* params)
322 ::glTexEnvfv (target, pname, params);
325 inline void glTexEnviv (GLenum target, GLenum pname, const GLint* params)
327 ::glTexEnviv (target, pname, params);
330 inline void glGetTexEnvfv (GLenum target, GLenum pname, GLfloat* params)
332 ::glGetTexEnvfv (target, pname, params);
335 inline void glGetTexEnviv (GLenum target, GLenum pname, GLint* params)
337 ::glGetTexEnviv (target, pname, params);
340 inline void glTexParameterf (GLenum target, GLenum pname, GLfloat param)
342 ::glTexParameterf (target, pname, param);
345 inline void glTexParameteri (GLenum target, GLenum pname, GLint param)
347 ::glTexParameteri (target, pname, param);
350 inline void glTexParameterfv (GLenum target, GLenum pname, const GLfloat* params)
352 ::glTexParameterfv (target, pname, params);
355 inline void glTexParameteriv (GLenum target, GLenum pname, const GLint* params)
357 ::glTexParameteriv (target, pname, params);
360 inline void glGetTexParameterfv (GLenum target, GLenum pname, GLfloat* params)
362 ::glGetTexParameterfv (target, pname, params);
365 inline void glGetTexParameteriv (GLenum target, GLenum pname, GLint* params)
367 ::glGetTexParameteriv (target, pname, params);
370 inline void glGetTexLevelParameterfv (GLenum target, GLint level, GLenum pname, GLfloat* params)
372 ::glGetTexLevelParameterfv (target, level, pname, params);
375 inline void glGetTexLevelParameteriv (GLenum target, GLint level, GLenum pname, GLint* params)
377 ::glGetTexLevelParameteriv (target, level, pname, params);
380 inline void glTexImage1D (GLenum target, GLint level,
381 GLint internalFormat,
382 GLsizei width, GLint border,
383 GLenum format, GLenum type,
384 const GLvoid* pixels)
386 ::glTexImage1D(target, level, internalFormat, width, border, format, type, pixels);
389 inline void glTexImage2D (GLenum target, GLint level,
390 GLint internalFormat,
391 GLsizei width, GLsizei height,
392 GLint border, GLenum format, GLenum type,
393 const GLvoid* pixels)
395 ::glTexImage2D(target, level, internalFormat, width, height, border, format, type, pixels);
398 inline void glGetTexImage (GLenum target, GLint level,
399 GLenum format, GLenum type,
402 ::glGetTexImage(target, level, format, type, pixels);
405 inline void glGenTextures (GLsizei n, GLuint* textures)
407 ::glGenTextures(n, textures);
410 inline void glDeleteTextures (GLsizei n, const GLuint* textures)
412 ::glDeleteTextures(n, textures);
415 inline void glBindTexture (GLenum target, GLuint texture)
417 ::glBindTexture(target, texture);
420 inline GLboolean glIsTexture (GLuint texture)
422 return ::glIsTexture (texture);
425 inline void glTexSubImage1D (GLenum target, GLint level,
427 GLsizei width, GLenum format,
428 GLenum type, const GLvoid* pixels)
430 ::glTexSubImage1D(target, level, xoffset, width, format, type, pixels);
433 inline void glTexSubImage2D (GLenum target, GLint level,
434 GLint xoffset, GLint yoffset,
435 GLsizei width, GLsizei height,
436 GLenum format, GLenum type,
437 const GLvoid* pixels)
439 ::glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels);
442 inline void glCopyTexImage1D (GLenum target, GLint level,
443 GLenum internalformat,
445 GLsizei width, GLint border)
447 ::glCopyTexImage1D(target, level, internalformat, x, y, width, border);
450 inline void glCopyTexImage2D (GLenum target, GLint level,
451 GLenum internalformat,
453 GLsizei width, GLsizei height,
456 ::glCopyTexImage2D(target, level, internalformat, x, y, width, height, border);
459 inline void glCopyTexSubImage1D (GLenum target, GLint level,
460 GLint xoffset, GLint x, GLint y,
463 ::glCopyTexSubImage1D(target, level, xoffset, x, y, width);
466 inline void glCopyTexSubImage2D (GLenum target, GLint level,
467 GLint xoffset, GLint yoffset,
469 GLsizei width, GLsizei height)
471 ::glCopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height);
476 #endif // _OpenGl_GlCore11Fwd_Header