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 glClearColor (GLclampf theRed, GLclampf theGreen, GLclampf theBlue, GLclampf theAlpha)
32 ::glClearColor (theRed, theGreen, theBlue, theAlpha);
35 inline void glClear (GLbitfield theMask)
40 inline void glColorMask (GLboolean theRed, GLboolean theGreen, GLboolean theBlue, GLboolean theAlpha)
42 ::glColorMask (theRed, theGreen, theBlue, theAlpha);
45 inline void glBlendFunc (GLenum sfactor, GLenum dfactor)
47 ::glBlendFunc(sfactor, dfactor);
50 inline void glCullFace (GLenum theMode)
52 ::glCullFace (theMode);
55 inline void glFrontFace (GLenum theMode)
57 ::glFrontFace (theMode);
60 inline void glLineWidth (GLfloat theWidth)
62 ::glLineWidth (theWidth);
65 inline void glPolygonOffset (GLfloat theFactor, GLfloat theUnits)
67 ::glPolygonOffset (theFactor, theUnits);
70 inline void glScissor (GLint theX, GLint theY, GLsizei theWidth, GLsizei theHeight)
72 ::glScissor (theX, theY, theWidth, theHeight);
75 inline void glEnable (GLenum theCap)
80 inline void glDisable (GLenum theCap)
85 inline GLboolean glIsEnabled (GLenum theCap)
87 return ::glIsEnabled (theCap);
90 inline void glGetBooleanv (GLenum theParamName, GLboolean* theValues)
92 ::glGetBooleanv (theParamName, theValues);
95 inline void glGetFloatv (GLenum theParamName, GLfloat* theValues)
97 ::glGetFloatv (theParamName, theValues);
100 inline void glGetIntegerv (GLenum theParamName, GLint* theValues)
102 ::glGetIntegerv (theParamName, theValues);
105 inline GLenum glGetError()
107 return ::glGetError();
110 inline const GLubyte* glGetString (GLenum theName)
112 return ::glGetString (theName);
115 inline void glFinish()
120 inline void glFlush()
125 inline void glHint (GLenum theTarget, GLenum theMode)
127 ::glHint (theTarget, theMode);
130 public: //! @name Depth Buffer
132 inline void glClearDepth (GLclampd theDepth)
134 #if defined(GL_ES_VERSION_2_0)
135 ::glClearDepthf ((GLfloat )theDepth);
137 ::glClearDepth (theDepth);
141 inline void glClearDepthf (GLfloat theDepth)
143 #if defined(GL_ES_VERSION_2_0)
144 ::glClearDepthf (theDepth);
146 ::glClearDepth ((GLclampd )theDepth);
150 inline void glDepthFunc (GLenum theFunc)
152 ::glDepthFunc (theFunc);
155 inline void glDepthMask (GLboolean theFlag)
157 ::glDepthMask (theFlag);
160 inline void glDepthRange (GLclampd theNearValue,
161 GLclampd theFarValue)
163 #if defined(GL_ES_VERSION_2_0)
164 ::glDepthRangef ((GLfloat )theNearValue, (GLfloat )theFarValue);
166 ::glDepthRange (theNearValue, theFarValue);
170 inline void glDepthRangef (GLfloat theNearValue,
173 #if defined(GL_ES_VERSION_2_0)
174 ::glDepthRangef (theNearValue, theFarValue);
176 ::glDepthRange ((GLclampd )theNearValue, (GLclampd )theFarValue);
180 public: //! @name Transformation
182 inline void glViewport (GLint theX, GLint theY, GLsizei theWidth, GLsizei theHeight)
184 ::glViewport (theX, theY, theWidth, theHeight);
187 public: //! @name Vertex Arrays
189 inline void glDrawArrays (GLenum theMode, GLint theFirst, GLsizei theCount)
191 ::glDrawArrays (theMode, theFirst, theCount);
194 inline void glDrawElements (GLenum theMode, GLsizei theCount, GLenum theType, const GLvoid* theIndices)
196 ::glDrawElements (theMode, theCount, theType, theIndices);
199 public: //! @name Raster functions
201 inline void glPixelStorei (GLenum theParamName, GLint theParam)
203 ::glPixelStorei (theParamName, theParam);
206 inline void glReadPixels (GLint x, GLint y,
207 GLsizei width, GLsizei height,
208 GLenum format, GLenum type,
211 ::glReadPixels (x, y, width, height, format, type, pixels);
214 public: //! @name Stenciling
216 inline void glStencilFunc (GLenum func, GLint ref, GLuint mask)
218 ::glStencilFunc (func, ref, mask);
221 inline void glStencilMask (GLuint mask)
223 ::glStencilMask (mask);
226 inline void glStencilOp (GLenum fail, GLenum zfail, GLenum zpass)
228 ::glStencilOp (fail, zfail, zpass);
231 inline void glClearStencil (GLint s)
233 ::glClearStencil (s);
236 public: //! @name Texture mapping
238 inline void glTexParameterf (GLenum target, GLenum pname, GLfloat param)
240 ::glTexParameterf (target, pname, param);
243 inline void glTexParameteri (GLenum target, GLenum pname, GLint param)
245 ::glTexParameteri (target, pname, param);
248 inline void glTexParameterfv (GLenum target, GLenum pname, const GLfloat* params)
250 ::glTexParameterfv (target, pname, params);
253 inline void glTexParameteriv (GLenum target, GLenum pname, const GLint* params)
255 ::glTexParameteriv (target, pname, params);
258 inline void glGetTexParameterfv (GLenum target, GLenum pname, GLfloat* params)
260 ::glGetTexParameterfv (target, pname, params);
263 inline void glGetTexParameteriv (GLenum target, GLenum pname, GLint* params)
265 ::glGetTexParameteriv (target, pname, params);
268 inline void glTexImage2D (GLenum target, GLint level,
269 GLint internalFormat,
270 GLsizei width, GLsizei height,
271 GLint border, GLenum format, GLenum type,
272 const GLvoid* pixels)
274 ::glTexImage2D(target, level, internalFormat, width, height, border, format, type, pixels);
277 inline void glGenTextures (GLsizei n, GLuint* textures)
279 ::glGenTextures(n, textures);
282 inline void glDeleteTextures (GLsizei n, const GLuint* textures)
284 ::glDeleteTextures(n, textures);
287 inline void glBindTexture (GLenum target, GLuint texture)
289 ::glBindTexture(target, texture);
292 inline GLboolean glIsTexture (GLuint texture)
294 return ::glIsTexture (texture);
297 inline void glTexSubImage2D (GLenum target, GLint level,
298 GLint xoffset, GLint yoffset,
299 GLsizei width, GLsizei height,
300 GLenum format, GLenum type,
301 const GLvoid* pixels)
303 ::glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels);
306 inline void glCopyTexImage2D (GLenum target, GLint level,
307 GLenum internalformat,
309 GLsizei width, GLsizei height,
312 ::glCopyTexImage2D(target, level, internalformat, x, y, width, height, border);
315 inline void glCopyTexSubImage2D (GLenum target, GLint level,
316 GLint xoffset, GLint yoffset,
318 GLsizei width, GLsizei height)
320 ::glCopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height);
323 #if !defined(GL_ES_VERSION_2_0)
324 inline void glTexImage1D (GLenum target, GLint level,
325 GLint internalFormat,
326 GLsizei width, GLint border,
327 GLenum format, GLenum type,
328 const GLvoid* pixels)
330 ::glTexImage1D(target, level, internalFormat, width, border, format, type, pixels);
333 inline void glTexSubImage1D (GLenum target, GLint level,
335 GLsizei width, GLenum format,
336 GLenum type, const GLvoid* pixels)
338 ::glTexSubImage1D(target, level, xoffset, width, format, type, pixels);
341 inline void glCopyTexImage1D (GLenum target, GLint level,
342 GLenum internalformat,
344 GLsizei width, GLint border)
346 ::glCopyTexImage1D(target, level, internalformat, x, y, width, border);
349 inline void glCopyTexSubImage1D (GLenum target, GLint level,
350 GLint xoffset, GLint x, GLint y,
353 ::glCopyTexSubImage1D(target, level, xoffset, x, y, width);
356 inline void glGetTexImage (GLenum target, GLint level,
357 GLenum format, GLenum type,
360 ::glGetTexImage (target, level, format, type, pixels);
364 #if !defined(GL_ES_VERSION_2_0)
366 inline void glAlphaFunc (GLenum theFunc, GLclampf theRef)
368 ::glAlphaFunc (theFunc, theRef);
371 inline void glPointSize (GLfloat theSize)
373 ::glPointSize (theSize);
378 /*#if !defined(GL_ES_VERSION_2_0)
380 inline void glTexEnvf (GLenum target, GLenum pname, GLfloat param)
382 ::glTexEnvf (target, pname, param);
385 inline void glTexEnvi (GLenum target, GLenum pname, GLint param)
387 ::glTexEnvi (target, pname, param);
390 inline void glTexEnvfv (GLenum target, GLenum pname, const GLfloat* params)
392 ::glTexEnvfv (target, pname, params);
395 inline void glTexEnviv (GLenum target, GLenum pname, const GLint* params)
397 ::glTexEnviv (target, pname, params);
400 inline void glGetTexEnvfv (GLenum target, GLenum pname, GLfloat* params)
402 ::glGetTexEnvfv (target, pname, params);
405 inline void glGetTexEnviv (GLenum target, GLenum pname, GLint* params)
407 ::glGetTexEnviv (target, pname, params);
410 inline void glGetTexLevelParameterfv (GLenum target, GLint level, GLenum pname, GLfloat* params)
412 ::glGetTexLevelParameterfv (target, level, pname, params);
415 inline void glGetTexLevelParameteriv (GLenum target, GLint level, GLenum pname, GLint* params)
417 ::glGetTexLevelParameteriv (target, level, pname, params);
420 inline void glClearIndex (GLfloat c)
425 inline void glIndexMask (GLuint theMask)
427 ::glIndexMask (theMask);
430 inline void glLogicOp (GLenum opcode)
435 inline void glPolygonMode (GLenum theFace, GLenum theMode)
437 ::glPolygonMode (theFace, theMode);
440 inline void glDrawBuffer (GLenum theMode)
442 ::glDrawBuffer (theMode);
445 inline void glReadBuffer (GLenum theMode)
447 ::glReadBuffer (theMode);
450 inline void glGetDoublev (GLenum theParamName, GLdouble* theValues)
452 ::glGetDoublev (theParamName, theValues);
455 inline GLint glRenderMode (GLenum theMode)
457 return ::glRenderMode (theMode);
460 inline void glArrayElement (GLint i)
462 ::glArrayElement (i);
465 inline void glPixelStoref (GLenum theParamName, GLfloat theParam)
467 ::glPixelStoref (theParamName, theParam);
470 inline void glPixelTransferf (GLenum theParamName, GLfloat theParam)
472 ::glPixelTransferf (theParamName, theParam);
475 inline void glPixelTransferi (GLenum theParamName, GLint theParam)
477 ::glPixelTransferi (theParamName, theParam);
480 inline void glPixelMapfv (GLenum map, GLsizei mapsize, const GLfloat* values)
482 ::glPixelMapfv (map, mapsize, values);
485 inline void glPixelMapuiv (GLenum map, GLsizei mapsize, const GLuint* values)
487 ::glPixelMapuiv (map, mapsize, values);
490 inline void glPixelMapusv (GLenum map, GLsizei mapsize, const GLushort* values)
492 ::glPixelMapusv (map, mapsize, values);
495 inline void glGetPixelMapfv (GLenum map, GLfloat* values)
497 ::glGetPixelMapfv (map, values);
500 inline void glGetPixelMapuiv (GLenum map, GLuint* values)
502 ::glGetPixelMapuiv (map, values);
505 inline void glGetPixelMapusv (GLenum map, GLushort* values)
507 ::glGetPixelMapusv (map, values);
513 #endif // _OpenGl_GlCore11Fwd_Header