0030700: Visualization, TKOpenGl - support PBR Metallic-Roughness shading model
[occt.git] / src / OpenGl / OpenGl_GlCore11Fwd.hxx
CommitLineData
01ca42b2 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_GlCore11Fwd_Header
17#define _OpenGl_GlCore11Fwd_Header
18
19#include <OpenGl_GlFunctions.hxx>
20
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!).
25struct OpenGl_GlCore11Fwd : protected OpenGl_GlFunctions
26{
27
28public: //! @name Miscellaneous
29
01ca42b2 30 inline void glClearColor (GLclampf theRed, GLclampf theGreen, GLclampf theBlue, GLclampf theAlpha)
31 {
32 ::glClearColor (theRed, theGreen, theBlue, theAlpha);
33 }
34
35 inline void glClear (GLbitfield theMask)
36 {
37 ::glClear (theMask);
38 }
39
01ca42b2 40 inline void glColorMask (GLboolean theRed, GLboolean theGreen, GLboolean theBlue, GLboolean theAlpha)
41 {
42 ::glColorMask (theRed, theGreen, theBlue, theAlpha);
43 }
44
01ca42b2 45 inline void glBlendFunc (GLenum sfactor, GLenum dfactor)
46 {
47 ::glBlendFunc(sfactor, dfactor);
48 }
49
01ca42b2 50 inline void glCullFace (GLenum theMode)
51 {
52 ::glCullFace (theMode);
53 }
54
55 inline void glFrontFace (GLenum theMode)
56 {
57 ::glFrontFace (theMode);
58 }
59
01ca42b2 60 inline void glLineWidth (GLfloat theWidth)
61 {
62 ::glLineWidth (theWidth);
63 }
64
01ca42b2 65 inline void glPolygonOffset (GLfloat theFactor, GLfloat theUnits)
66 {
67 ::glPolygonOffset (theFactor, theUnits);
68 }
69
70 inline void glScissor (GLint theX, GLint theY, GLsizei theWidth, GLsizei theHeight)
71 {
72 ::glScissor (theX, theY, theWidth, theHeight);
73 }
74
01ca42b2 75 inline void glEnable (GLenum theCap)
76 {
77 ::glEnable (theCap);
78 }
79
80 inline void glDisable (GLenum theCap)
81 {
82 ::glDisable (theCap);
83 }
84
85 inline GLboolean glIsEnabled (GLenum theCap)
86 {
87 return ::glIsEnabled (theCap);
88 }
89
90 inline void glGetBooleanv (GLenum theParamName, GLboolean* theValues)
91 {
92 ::glGetBooleanv (theParamName, theValues);
93 }
94
01ca42b2 95 inline void glGetFloatv (GLenum theParamName, GLfloat* theValues)
96 {
97 ::glGetFloatv (theParamName, theValues);
98 }
99
100 inline void glGetIntegerv (GLenum theParamName, GLint* theValues)
101 {
102 ::glGetIntegerv (theParamName, theValues);
103 }
104
01ca42b2 105 inline GLenum glGetError()
106 {
107 return ::glGetError();
108 }
109
110 inline const GLubyte* glGetString (GLenum theName)
111 {
112 return ::glGetString (theName);
113 }
114
115 inline void glFinish()
116 {
117 ::glFinish();
118 }
119
120 inline void glFlush()
121 {
122 ::glFlush();
123 }
124
125 inline void glHint (GLenum theTarget, GLenum theMode)
126 {
127 ::glHint (theTarget, theMode);
128 }
129
130public: //! @name Depth Buffer
131
132 inline void glClearDepth (GLclampd theDepth)
133 {
ca3c13d1 134 #if defined(GL_ES_VERSION_2_0)
135 ::glClearDepthf ((GLfloat )theDepth);
136 #else
01ca42b2 137 ::glClearDepth (theDepth);
ca3c13d1 138 #endif
139 }
140
141 inline void glClearDepthf (GLfloat theDepth)
142 {
143 #if defined(GL_ES_VERSION_2_0)
144 ::glClearDepthf (theDepth);
145 #else
146 ::glClearDepth ((GLclampd )theDepth);
147 #endif
01ca42b2 148 }
149
150 inline void glDepthFunc (GLenum theFunc)
151 {
152 ::glDepthFunc (theFunc);
153 }
154
155 inline void glDepthMask (GLboolean theFlag)
156 {
157 ::glDepthMask (theFlag);
158 }
159
ca3c13d1 160 inline void glDepthRange (GLclampd theNearValue,
161 GLclampd theFarValue)
01ca42b2 162 {
ca3c13d1 163 #if defined(GL_ES_VERSION_2_0)
164 ::glDepthRangef ((GLfloat )theNearValue, (GLfloat )theFarValue);
165 #else
01ca42b2 166 ::glDepthRange (theNearValue, theFarValue);
ca3c13d1 167 #endif
168 }
169
170 inline void glDepthRangef (GLfloat theNearValue,
171 GLfloat theFarValue)
172 {
173 #if defined(GL_ES_VERSION_2_0)
174 ::glDepthRangef (theNearValue, theFarValue);
175 #else
176 ::glDepthRange ((GLclampd )theNearValue, (GLclampd )theFarValue);
177 #endif
01ca42b2 178 }
179
180public: //! @name Transformation
181
182 inline void glViewport (GLint theX, GLint theY, GLsizei theWidth, GLsizei theHeight)
183 {
184 ::glViewport (theX, theY, theWidth, theHeight);
185 }
186
187public: //! @name Vertex Arrays
188
01ca42b2 189 inline void glDrawArrays (GLenum theMode, GLint theFirst, GLsizei theCount)
190 {
191 ::glDrawArrays (theMode, theFirst, theCount);
192 }
193
194 inline void glDrawElements (GLenum theMode, GLsizei theCount, GLenum theType, const GLvoid* theIndices)
195 {
196 ::glDrawElements (theMode, theCount, theType, theIndices);
197 }
198
199public: //! @name Raster functions
200
ca3c13d1 201 inline void glPixelStorei (GLenum theParamName, GLint theParam)
01ca42b2 202 {
ca3c13d1 203 ::glPixelStorei (theParamName, theParam);
01ca42b2 204 }
205
ca3c13d1 206 inline void glReadPixels (GLint x, GLint y,
207 GLsizei width, GLsizei height,
208 GLenum format, GLenum type,
209 GLvoid* pixels)
01ca42b2 210 {
ca3c13d1 211 ::glReadPixels (x, y, width, height, format, type, pixels);
01ca42b2 212 }
213
ca3c13d1 214public: //! @name Stenciling
215
216 inline void glStencilFunc (GLenum func, GLint ref, GLuint mask)
01ca42b2 217 {
ca3c13d1 218 ::glStencilFunc (func, ref, mask);
01ca42b2 219 }
220
ca3c13d1 221 inline void glStencilMask (GLuint mask)
01ca42b2 222 {
ca3c13d1 223 ::glStencilMask (mask);
01ca42b2 224 }
225
ca3c13d1 226 inline void glStencilOp (GLenum fail, GLenum zfail, GLenum zpass)
01ca42b2 227 {
ca3c13d1 228 ::glStencilOp (fail, zfail, zpass);
01ca42b2 229 }
230
ca3c13d1 231 inline void glClearStencil (GLint s)
01ca42b2 232 {
ca3c13d1 233 ::glClearStencil (s);
01ca42b2 234 }
235
ca3c13d1 236public: //! @name Texture mapping
237
238 inline void glTexParameterf (GLenum target, GLenum pname, GLfloat param)
01ca42b2 239 {
ca3c13d1 240 ::glTexParameterf (target, pname, param);
01ca42b2 241 }
242
ca3c13d1 243 inline void glTexParameteri (GLenum target, GLenum pname, GLint param)
01ca42b2 244 {
ca3c13d1 245 ::glTexParameteri (target, pname, param);
01ca42b2 246 }
247
ca3c13d1 248 inline void glTexParameterfv (GLenum target, GLenum pname, const GLfloat* params)
01ca42b2 249 {
ca3c13d1 250 ::glTexParameterfv (target, pname, params);
01ca42b2 251 }
252
ca3c13d1 253 inline void glTexParameteriv (GLenum target, GLenum pname, const GLint* params)
01ca42b2 254 {
ca3c13d1 255 ::glTexParameteriv (target, pname, params);
01ca42b2 256 }
257
ca3c13d1 258 inline void glGetTexParameterfv (GLenum target, GLenum pname, GLfloat* params)
259 {
260 ::glGetTexParameterfv (target, pname, params);
261 }
262
263 inline void glGetTexParameteriv (GLenum target, GLenum pname, GLint* params)
264 {
265 ::glGetTexParameteriv (target, pname, params);
266 }
267
268 inline void glTexImage2D (GLenum target, GLint level,
269 GLint internalFormat,
01ca42b2 270 GLsizei width, GLsizei height,
ca3c13d1 271 GLint border, GLenum format, GLenum type,
272 const GLvoid* pixels)
273 {
274 ::glTexImage2D(target, level, internalFormat, width, height, border, format, type, pixels);
275 }
276
277 inline void glGenTextures (GLsizei n, GLuint* textures)
278 {
279 ::glGenTextures(n, textures);
280 }
281
282 inline void glDeleteTextures (GLsizei n, const GLuint* textures)
283 {
284 ::glDeleteTextures(n, textures);
285 }
286
287 inline void glBindTexture (GLenum target, GLuint texture)
288 {
289 ::glBindTexture(target, texture);
290 }
291
292 inline GLboolean glIsTexture (GLuint texture)
293 {
294 return ::glIsTexture (texture);
295 }
296
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)
302 {
303 ::glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels);
304 }
305
306 inline void glCopyTexImage2D (GLenum target, GLint level,
307 GLenum internalformat,
308 GLint x, GLint y,
309 GLsizei width, GLsizei height,
310 GLint border)
311 {
312 ::glCopyTexImage2D(target, level, internalformat, x, y, width, height, border);
313 }
314
315 inline void glCopyTexSubImage2D (GLenum target, GLint level,
316 GLint xoffset, GLint yoffset,
317 GLint x, GLint y,
318 GLsizei width, GLsizei height)
319 {
320 ::glCopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height);
321 }
322
323#if !defined(GL_ES_VERSION_2_0)
324 inline void glTexImage1D (GLenum target, GLint level,
325 GLint internalFormat,
326 GLsizei width, GLint border,
01ca42b2 327 GLenum format, GLenum type,
ca3c13d1 328 const GLvoid* pixels)
01ca42b2 329 {
ca3c13d1 330 ::glTexImage1D(target, level, internalFormat, width, border, format, type, pixels);
01ca42b2 331 }
332
ca3c13d1 333 inline void glTexSubImage1D (GLenum target, GLint level,
334 GLint xoffset,
335 GLsizei width, GLenum format,
336 GLenum type, const GLvoid* pixels)
337 {
338 ::glTexSubImage1D(target, level, xoffset, width, format, type, pixels);
339 }
01ca42b2 340
ca3c13d1 341 inline void glCopyTexImage1D (GLenum target, GLint level,
342 GLenum internalformat,
343 GLint x, GLint y,
344 GLsizei width, GLint border)
01ca42b2 345 {
ca3c13d1 346 ::glCopyTexImage1D(target, level, internalformat, x, y, width, border);
01ca42b2 347 }
348
ca3c13d1 349 inline void glCopyTexSubImage1D (GLenum target, GLint level,
350 GLint xoffset, GLint x, GLint y,
351 GLsizei width)
01ca42b2 352 {
ca3c13d1 353 ::glCopyTexSubImage1D(target, level, xoffset, x, y, width);
01ca42b2 354 }
3a9b5dc8 355
356 inline void glGetTexImage (GLenum target, GLint level,
357 GLenum format, GLenum type,
358 GLvoid* pixels)
359 {
360 ::glGetTexImage (target, level, format, type, pixels);
361 }
ca3c13d1 362#endif
01ca42b2 363
ca3c13d1 364#if !defined(GL_ES_VERSION_2_0)
365
366 inline void glAlphaFunc (GLenum theFunc, GLclampf theRef)
01ca42b2 367 {
ca3c13d1 368 ::glAlphaFunc (theFunc, theRef);
01ca42b2 369 }
370
ca3c13d1 371 inline void glPointSize (GLfloat theSize)
01ca42b2 372 {
ca3c13d1 373 ::glPointSize (theSize);
01ca42b2 374 }
375
ca3c13d1 376#endif
377
378/*#if !defined(GL_ES_VERSION_2_0)
01ca42b2 379
380 inline void glTexEnvf (GLenum target, GLenum pname, GLfloat param)
381 {
382 ::glTexEnvf (target, pname, param);
383 }
384
385 inline void glTexEnvi (GLenum target, GLenum pname, GLint param)
386 {
387 ::glTexEnvi (target, pname, param);
388 }
389
390 inline void glTexEnvfv (GLenum target, GLenum pname, const GLfloat* params)
391 {
392 ::glTexEnvfv (target, pname, params);
393 }
394
395 inline void glTexEnviv (GLenum target, GLenum pname, const GLint* params)
396 {
397 ::glTexEnviv (target, pname, params);
398 }
399
400 inline void glGetTexEnvfv (GLenum target, GLenum pname, GLfloat* params)
401 {
402 ::glGetTexEnvfv (target, pname, params);
403 }
404
405 inline void glGetTexEnviv (GLenum target, GLenum pname, GLint* params)
406 {
407 ::glGetTexEnviv (target, pname, params);
408 }
409
ca3c13d1 410 inline void glGetTexLevelParameterfv (GLenum target, GLint level, GLenum pname, GLfloat* params)
01ca42b2 411 {
ca3c13d1 412 ::glGetTexLevelParameterfv (target, level, pname, params);
01ca42b2 413 }
414
ca3c13d1 415 inline void glGetTexLevelParameteriv (GLenum target, GLint level, GLenum pname, GLint* params)
01ca42b2 416 {
ca3c13d1 417 ::glGetTexLevelParameteriv (target, level, pname, params);
01ca42b2 418 }
419
ca3c13d1 420 inline void glClearIndex (GLfloat c)
01ca42b2 421 {
ca3c13d1 422 ::glClearIndex(c);
01ca42b2 423 }
424
ca3c13d1 425 inline void glIndexMask (GLuint theMask)
01ca42b2 426 {
ca3c13d1 427 ::glIndexMask (theMask);
01ca42b2 428 }
429
ca3c13d1 430 inline void glLogicOp (GLenum opcode)
01ca42b2 431 {
ca3c13d1 432 ::glLogicOp(opcode);
01ca42b2 433 }
434
ca3c13d1 435 inline void glPolygonMode (GLenum theFace, GLenum theMode)
01ca42b2 436 {
ca3c13d1 437 ::glPolygonMode (theFace, theMode);
01ca42b2 438 }
439
ca3c13d1 440 inline void glDrawBuffer (GLenum theMode)
01ca42b2 441 {
ca3c13d1 442 ::glDrawBuffer (theMode);
01ca42b2 443 }
444
ca3c13d1 445 inline void glReadBuffer (GLenum theMode)
01ca42b2 446 {
ca3c13d1 447 ::glReadBuffer (theMode);
01ca42b2 448 }
449
ca3c13d1 450 inline void glGetDoublev (GLenum theParamName, GLdouble* theValues)
01ca42b2 451 {
ca3c13d1 452 ::glGetDoublev (theParamName, theValues);
01ca42b2 453 }
454
ca3c13d1 455 inline GLint glRenderMode (GLenum theMode)
01ca42b2 456 {
ca3c13d1 457 return ::glRenderMode (theMode);
01ca42b2 458 }
459
ca3c13d1 460 inline void glArrayElement (GLint i)
01ca42b2 461 {
ca3c13d1 462 ::glArrayElement (i);
01ca42b2 463 }
464
ca3c13d1 465 inline void glPixelStoref (GLenum theParamName, GLfloat theParam)
01ca42b2 466 {
ca3c13d1 467 ::glPixelStoref (theParamName, theParam);
01ca42b2 468 }
469
ca3c13d1 470 inline void glPixelTransferf (GLenum theParamName, GLfloat theParam)
01ca42b2 471 {
ca3c13d1 472 ::glPixelTransferf (theParamName, theParam);
01ca42b2 473 }
474
ca3c13d1 475 inline void glPixelTransferi (GLenum theParamName, GLint theParam)
01ca42b2 476 {
ca3c13d1 477 ::glPixelTransferi (theParamName, theParam);
01ca42b2 478 }
479
ca3c13d1 480 inline void glPixelMapfv (GLenum map, GLsizei mapsize, const GLfloat* values)
01ca42b2 481 {
ca3c13d1 482 ::glPixelMapfv (map, mapsize, values);
01ca42b2 483 }
484
ca3c13d1 485 inline void glPixelMapuiv (GLenum map, GLsizei mapsize, const GLuint* values)
01ca42b2 486 {
ca3c13d1 487 ::glPixelMapuiv (map, mapsize, values);
01ca42b2 488 }
489
ca3c13d1 490 inline void glPixelMapusv (GLenum map, GLsizei mapsize, const GLushort* values)
01ca42b2 491 {
ca3c13d1 492 ::glPixelMapusv (map, mapsize, values);
01ca42b2 493 }
494
ca3c13d1 495 inline void glGetPixelMapfv (GLenum map, GLfloat* values)
01ca42b2 496 {
ca3c13d1 497 ::glGetPixelMapfv (map, values);
01ca42b2 498 }
499
ca3c13d1 500 inline void glGetPixelMapuiv (GLenum map, GLuint* values)
01ca42b2 501 {
ca3c13d1 502 ::glGetPixelMapuiv (map, values);
01ca42b2 503 }
504
ca3c13d1 505 inline void glGetPixelMapusv (GLenum map, GLushort* values)
01ca42b2 506 {
ca3c13d1 507 ::glGetPixelMapusv (map, values);
01ca42b2 508 }
ca3c13d1 509#endif*/
01ca42b2 510
511};
512
513#endif // _OpenGl_GlCore11Fwd_Header