Drop unused OpenGl_ArbVBO.
Replace OpenGl_ExtFBO with OpenGl_ArbFBO.
OpenGl_Context - reorganize GL functions management.
OpenGl_GlFunctions structure now stores pointers for all GL functions,
while inheritors specify functions subset using access levels.
Drop fields core12, core13, core14; replace extFBO by arbFBO.
OpenGl_ArbIns, OpenGl_ArbTBO - use GL3.1 core functions
instead of ARB extensions when available.
OpenGl_ArbFBO - provide complete list of functions
OpenGl_GlCore11 - fix misprint
OpenGl_Context.hxx - remove redundant declarations
OpenGl_Context_1.mm
OpenGl_ArbIns.hxx
OpenGl_ArbTBO.hxx
-OpenGl_ArbVBO.hxx
OpenGl_ArbDbg.hxx
-OpenGl_ExtFBO.hxx
+OpenGl_ArbFBO.hxx
OpenGl_ExtGS.hxx
glext.h
+OpenGl_GlFunctions.hxx
OpenGl_GlCore11.hxx
+OpenGl_GlCore11Fwd.hxx
OpenGl_GlCore12.hxx
OpenGl_GlCore13.hxx
OpenGl_GlCore14.hxx
OpenGl_GlCore15.hxx
OpenGl_GlCore20.hxx
+OpenGl_GlCore21.hxx
+OpenGl_GlCore30.hxx
+OpenGl_GlCore31.hxx
+OpenGl_GlCore32.hxx
+OpenGl_GlCore33.hxx
+OpenGl_GlCore40.hxx
+OpenGl_GlCore41.hxx
+OpenGl_GlCore42.hxx
+OpenGl_GlCore43.hxx
+OpenGl_GlCore44.hxx
OpenGl_LayerList.cxx
OpenGl_LayerList.hxx
OpenGl_IndexBuffer.hxx
#ifndef _OpenGl_ArbDbg_H__
#define _OpenGl_ArbDbg_H__
-#include <OpenGl_GlCore12.hxx>
+#include <OpenGl_GlFunctions.hxx>
//! Debug context routines
-struct OpenGl_ArbDbg
+struct OpenGl_ArbDbg : protected OpenGl_GlFunctions
{
- PFNGLDEBUGMESSAGECONTROLARBPROC glDebugMessageControlARB;
- PFNGLDEBUGMESSAGEINSERTARBPROC glDebugMessageInsertARB;
- PFNGLDEBUGMESSAGECALLBACKARBPROC glDebugMessageCallbackARB;
- PFNGLGETDEBUGMESSAGELOGARBPROC glGetDebugMessageLogARB;
+ using OpenGl_GlFunctions::glDebugMessageControlARB;
+ using OpenGl_GlFunctions::glDebugMessageInsertARB;
+ using OpenGl_GlFunctions::glDebugMessageCallbackARB;
+ using OpenGl_GlFunctions::glGetDebugMessageLogARB;
};
--- /dev/null
+// Created on: 2012-01-26
+// Created by: Kirill GAVRILOV
+// Copyright (c) 2012-2014 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
+
+#ifndef _OpenGl_ArbFBO_H__
+#define _OpenGl_ArbFBO_H__
+
+#include <OpenGl_GlFunctions.hxx>
+
+//! FBO is available on OpenGL 2.0+ hardware
+struct OpenGl_ArbFBO : protected OpenGl_GlFunctions
+{
+
+ using OpenGl_GlFunctions::glIsRenderbuffer;
+ using OpenGl_GlFunctions::glBindRenderbuffer;
+ using OpenGl_GlFunctions::glDeleteRenderbuffers;
+ using OpenGl_GlFunctions::glGenRenderbuffers;
+ using OpenGl_GlFunctions::glRenderbufferStorage;
+ using OpenGl_GlFunctions::glGetRenderbufferParameteriv;
+ using OpenGl_GlFunctions::glIsFramebuffer;
+ using OpenGl_GlFunctions::glBindFramebuffer;
+ using OpenGl_GlFunctions::glDeleteFramebuffers;
+ using OpenGl_GlFunctions::glGenFramebuffers;
+ using OpenGl_GlFunctions::glCheckFramebufferStatus;
+ using OpenGl_GlFunctions::glFramebufferTexture1D;
+ using OpenGl_GlFunctions::glFramebufferTexture2D;
+ using OpenGl_GlFunctions::glFramebufferTexture3D;
+ using OpenGl_GlFunctions::glFramebufferRenderbuffer;
+ using OpenGl_GlFunctions::glGetFramebufferAttachmentParameteriv;
+ using OpenGl_GlFunctions::glGenerateMipmap;
+ using OpenGl_GlFunctions::glBlitFramebuffer;
+ using OpenGl_GlFunctions::glRenderbufferStorageMultisample;
+ using OpenGl_GlFunctions::glFramebufferTextureLayer;
+
+};
+
+#endif // _OpenGl_ArbFBO_H__
#ifndef _OpenGl_ArbIns_H__
#define _OpenGl_ArbIns_H__
-#include <OpenGl_GlCore12.hxx>
+#include <OpenGl_GlFunctions.hxx>
-//! TBO is available on OpenGL 3.0+ hardware
-struct OpenGl_ArbIns
+//! Instancing is available on OpenGL 3.0+ hardware
+struct OpenGl_ArbIns : protected OpenGl_GlFunctions
{
- PFNGLDRAWARRAYSINSTANCEDARBPROC glDrawArraysInstancedARB;
- PFNGLDRAWELEMENTSINSTANCEDARBPROC glDrawElementsInstancedARB;
+ using OpenGl_GlFunctions::glDrawArraysInstanced;
+ using OpenGl_GlFunctions::glDrawElementsInstanced;
};
#ifndef _OpenGl_ArbTBO_H__
#define _OpenGl_ArbTBO_H__
-#include <OpenGl_GlCore12.hxx>
+#include <OpenGl_GlFunctions.hxx>
//! TBO is available on OpenGL 3.0+ hardware
-struct OpenGl_ArbTBO
+struct OpenGl_ArbTBO : protected OpenGl_GlFunctions
{
- PFNGLTEXBUFFERARBPROC glTexBufferARB;
+ using OpenGl_GlFunctions::glTexBuffer;
};
+++ /dev/null
-// Created on: 2012-01-26
-// Created by: Kirill GAVRILOV
-// Copyright (c) 2012-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#ifndef _OpenGl_ArbVBO_H__
-#define _OpenGl_ArbVBO_H__
-
-#include <OpenGl_GlCore12.hxx>
-
-//! VBO is part of OpenGL since 1.5
-struct OpenGl_ArbVBO
-{
-
- PFNGLGENBUFFERSARBPROC glGenBuffersARB;
- PFNGLBINDBUFFERARBPROC glBindBufferARB;
- PFNGLBUFFERDATAARBPROC glBufferDataARB;
- PFNGLDELETEBUFFERSARBPROC glDeleteBuffersARB;
-
-};
-
-#endif // _OpenGl_ArbVBO_H__
#include <OpenGl_Context.hxx>
-#include <OpenGl_ArbVBO.hxx>
#include <OpenGl_ArbTBO.hxx>
#include <OpenGl_ArbIns.hxx>
#include <OpenGl_ArbDbg.hxx>
-#include <OpenGl_ExtFBO.hxx>
+#include <OpenGl_ArbFBO.hxx>
#include <OpenGl_ExtGS.hxx>
#include <OpenGl_GlCore20.hxx>
#include <OpenGl_ShaderManager.hxx>
IMPLEMENT_STANDARD_HANDLE (OpenGl_Context, Standard_Transient)
IMPLEMENT_STANDARD_RTTIEXT(OpenGl_Context, Standard_Transient)
-//! Make record shorter to retrieve function pointer using variable with same name
-#define FindProcShort(theStruct, theFunc) FindProc(#theFunc, theStruct->theFunc)
-
namespace
{
static const Handle(OpenGl_Resource) NULL_GL_RESOURCE;
static const GLdouble OpenGl_DefaultPlaneEq[] = {0.0, 0.0, 0.0, 0.0};
-};
+}
// =======================================================================
// function : OpenGl_Context
// purpose :
// =======================================================================
OpenGl_Context::OpenGl_Context (const Handle(OpenGl_Caps)& theCaps)
-: core12 (NULL),
- core13 (NULL),
- core14 (NULL),
- core15 (NULL),
- core20 (NULL),
+: core11 (NULL),
+ core11fwd (NULL),
+ core15 (NULL),
+ core15fwd (NULL),
+ core20 (NULL),
+ core20fwd (NULL),
+ core32 (NULL),
+ core32back (NULL),
+ core41 (NULL),
+ core41back (NULL),
+ core42 (NULL),
+ core42back (NULL),
+ core43 (NULL),
+ core43back (NULL),
+ core44 (NULL),
+ core44back (NULL),
caps (!theCaps.IsNull() ? theCaps : new OpenGl_Caps()),
arbNPTW(Standard_False),
- arbVBO (NULL),
arbTBO (NULL),
arbIns (NULL),
arbDbg (NULL),
- extFBO (NULL),
+ arbFBO (NULL),
extGS (NULL),
extBgra(Standard_False),
extAnis(Standard_False),
myReleaseQueue (new OpenGl_ResourcesQueue()),
myClippingState (),
myGlLibHandle (NULL),
- myGlCore20 (NULL),
+ myFuncs (new OpenGl_GlFunctions()),
myAnisoMax (1),
myMaxTexDim (1024),
myMaxClipPlanes (6),
// (depends on renderer).
myGlLibHandle = dlopen ("/System/Library/Frameworks/OpenGL.framework/Versions/Current/OpenGL", RTLD_LAZY);
#endif
-
+ memset (myFuncs.operator->(), 0, sizeof(OpenGl_GlFunctions));
myShaderManager = new OpenGl_ShaderManager (this);
}
arbDbg->glDebugMessageCallbackARB (NULL, NULL);
}
}
-
- delete myGlCore20;
- delete arbVBO;
- delete arbTBO;
- delete arbIns;
- delete arbDbg;
- delete extFBO;
- delete extGS;
}
// =======================================================================
{
//OpenGl_Context* aCtx = (OpenGl_Context* )theUserParam;
Standard_CString& aSrc = (theSource >= GL_DEBUG_SOURCE_API_ARB
- && theSource <= GL_DEBUG_SOURCE_OTHER_ARB)
+ && theSource <= GL_DEBUG_SOURCE_OTHER_ARB)
? THE_DBGMSG_SOURCES[theSource - GL_DEBUG_SOURCE_API_ARB]
: THE_DBGMSG_UNKNOWN;
Standard_CString& aType = (theType >= GL_DEBUG_TYPE_ERROR_ARB
- && theType <= GL_DEBUG_TYPE_OTHER_ARB)
+ && theType <= GL_DEBUG_TYPE_OTHER_ARB)
? THE_DBGMSG_TYPES[theType - GL_DEBUG_TYPE_ERROR_ARB]
: THE_DBGMSG_UNKNOWN;
Standard_CString& aSev = theSeverity == GL_DEBUG_SEVERITY_HIGH_ARB
// read version
readGlVersion();
+ core11 = (OpenGl_GlCore11* )(&(*myFuncs));
+ core11fwd = (OpenGl_GlCore11Fwd* )(&(*myFuncs));
+ core15 = NULL;
+ core15fwd = NULL;
+ core20 = NULL;
+ core20fwd = NULL;
+ core32 = NULL;
+ core32back = NULL;
+ core41 = NULL;
+ core41back = NULL;
+ core42 = NULL;
+ core42back = NULL;
+ core43 = NULL;
+ core43back = NULL;
+ core44 = NULL;
+ core44back = NULL;
+ arbTBO = NULL;
+ arbIns = NULL;
+ arbDbg = NULL;
+ arbFBO = NULL;
+ extGS = NULL;
+
arbNPTW = CheckExtension ("GL_ARB_texture_non_power_of_two");
extBgra = CheckExtension ("GL_EXT_bgra");
extAnis = CheckExtension ("GL_EXT_texture_filter_anisotropic");
myClippingState.Init (myMaxClipPlanes);
+ bool has12 = false;
+ bool has13 = false;
+ bool has14 = false;
+ bool has15 = false;
+ bool has20 = false;
+ bool has21 = false;
+ bool has30 = false;
+ bool has31 = false;
+ bool has32 = false;
+ bool has33 = false;
+ bool has40 = false;
+ bool has41 = false;
+ bool has42 = false;
+ bool has43 = false;
+ bool has44 = false;
+
+ //! Make record shorter to retrieve function pointer using variable with same name
+ #define FindProcShort(theFunc) FindProc(#theFunc, myFuncs->theFunc)
+
+ // retrieve platform-dependent extensions
+#ifdef _WIN32
+ if (FindProcShort (wglGetExtensionsStringARB))
+ {
+ const char* aWglExts = myFuncs->wglGetExtensionsStringARB (wglGetCurrentDC());
+ if (CheckExtension (aWglExts, "WGL_EXT_swap_control"))
+ {
+ FindProcShort (wglSwapIntervalEXT);
+ }
+ if (CheckExtension (aWglExts, "WGL_ARB_pixel_format"))
+ {
+ FindProcShort (wglChoosePixelFormatARB);
+ }
+ if (CheckExtension (aWglExts, "WGL_ARB_create_context_profile"))
+ {
+ FindProcShort (wglCreateContextAttribsARB);
+ }
+ if (CheckExtension (aWglExts, "WGL_NV_DX_interop"))
+ {
+ FindProcShort (wglDXSetResourceShareHandleNV);
+ FindProcShort (wglDXOpenDeviceNV);
+ FindProcShort (wglDXCloseDeviceNV);
+ FindProcShort (wglDXRegisterObjectNV);
+ FindProcShort (wglDXUnregisterObjectNV);
+ FindProcShort (wglDXObjectAccessNV);
+ FindProcShort (wglDXLockObjectsNV);
+ FindProcShort (wglDXUnlockObjectsNV);
+ }
+ }
+#endif
+
// initialize debug context extension
if (CheckExtension ("GL_ARB_debug_output"))
{
- arbDbg = new OpenGl_ArbDbg();
- memset (arbDbg, 0, sizeof(OpenGl_ArbDbg)); // nullify whole structure
- if (!FindProcShort (arbDbg, glDebugMessageControlARB)
- || !FindProcShort (arbDbg, glDebugMessageInsertARB)
- || !FindProcShort (arbDbg, glDebugMessageCallbackARB)
- || !FindProcShort (arbDbg, glGetDebugMessageLogARB))
+ arbDbg = NULL;
+ if (FindProcShort (glDebugMessageControlARB)
+ && FindProcShort (glDebugMessageInsertARB)
+ && FindProcShort (glDebugMessageCallbackARB)
+ && FindProcShort (glGetDebugMessageLogARB))
{
- delete arbDbg;
- arbDbg = NULL;
+ arbDbg = (OpenGl_ArbDbg* )(&(*myFuncs));
}
if (arbDbg != NULL
&& caps->contextDebug)
}
}
- // initialize VBO extension (ARB)
- if (CheckExtension ("GL_ARB_vertex_buffer_object"))
+ // load OpenGL 1.2 new functions
+ has12 = IsGlGreaterEqual (1, 2)
+ && FindProcShort (glBlendColor)
+ && FindProcShort (glBlendEquation)
+ && FindProcShort (glDrawRangeElements)
+ && FindProcShort (glTexImage3D)
+ && FindProcShort (glTexSubImage3D)
+ && FindProcShort (glCopyTexSubImage3D);
+
+ // load OpenGL 1.3 new functions
+ has13 = IsGlGreaterEqual (1, 3)
+ && FindProcShort (glActiveTexture)
+ && FindProcShort (glSampleCoverage)
+ && FindProcShort (glCompressedTexImage3D)
+ && FindProcShort (glCompressedTexImage2D)
+ && FindProcShort (glCompressedTexImage1D)
+ && FindProcShort (glCompressedTexSubImage3D)
+ && FindProcShort (glCompressedTexSubImage2D)
+ && FindProcShort (glCompressedTexSubImage1D)
+ && FindProcShort (glGetCompressedTexImage)
+ && FindProcShort (glClientActiveTexture)
+ && FindProcShort (glMultiTexCoord1d)
+ && FindProcShort (glMultiTexCoord1dv)
+ && FindProcShort (glMultiTexCoord1f)
+ && FindProcShort (glMultiTexCoord1fv)
+ && FindProcShort (glMultiTexCoord1i)
+ && FindProcShort (glMultiTexCoord1iv)
+ && FindProcShort (glMultiTexCoord1s)
+ && FindProcShort (glMultiTexCoord1sv)
+ && FindProcShort (glMultiTexCoord2d)
+ && FindProcShort (glMultiTexCoord2dv)
+ && FindProcShort (glMultiTexCoord2f)
+ && FindProcShort (glMultiTexCoord2fv)
+ && FindProcShort (glMultiTexCoord2i)
+ && FindProcShort (glMultiTexCoord2iv)
+ && FindProcShort (glMultiTexCoord2s)
+ && FindProcShort (glMultiTexCoord2sv)
+ && FindProcShort (glMultiTexCoord3d)
+ && FindProcShort (glMultiTexCoord3dv)
+ && FindProcShort (glMultiTexCoord3f)
+ && FindProcShort (glMultiTexCoord3fv)
+ && FindProcShort (glMultiTexCoord3i)
+ && FindProcShort (glMultiTexCoord3iv)
+ && FindProcShort (glMultiTexCoord3s)
+ && FindProcShort (glMultiTexCoord3sv)
+ && FindProcShort (glMultiTexCoord4d)
+ && FindProcShort (glMultiTexCoord4dv)
+ && FindProcShort (glMultiTexCoord4f)
+ && FindProcShort (glMultiTexCoord4fv)
+ && FindProcShort (glMultiTexCoord4i)
+ && FindProcShort (glMultiTexCoord4iv)
+ && FindProcShort (glMultiTexCoord4s)
+ && FindProcShort (glMultiTexCoord4sv)
+ && FindProcShort (glLoadTransposeMatrixf)
+ && FindProcShort (glLoadTransposeMatrixd)
+ && FindProcShort (glMultTransposeMatrixf)
+ && FindProcShort (glMultTransposeMatrixd);
+
+ // load OpenGL 1.4 new functions
+ has14 = IsGlGreaterEqual (1, 4)
+ && FindProcShort (glBlendFuncSeparate)
+ && FindProcShort (glMultiDrawArrays)
+ && FindProcShort (glMultiDrawElements)
+ && FindProcShort (glPointParameterf)
+ && FindProcShort (glPointParameterfv)
+ && FindProcShort (glPointParameteri)
+ && FindProcShort (glPointParameteriv);
+
+ // load OpenGL 1.5 new functions
+ has15 = IsGlGreaterEqual (1, 5)
+ && FindProcShort (glGenQueries)
+ && FindProcShort (glDeleteQueries)
+ && FindProcShort (glIsQuery)
+ && FindProcShort (glBeginQuery)
+ && FindProcShort (glEndQuery)
+ && FindProcShort (glGetQueryiv)
+ && FindProcShort (glGetQueryObjectiv)
+ && FindProcShort (glGetQueryObjectuiv)
+ && FindProcShort (glBindBuffer)
+ && FindProcShort (glDeleteBuffers)
+ && FindProcShort (glGenBuffers)
+ && FindProcShort (glIsBuffer)
+ && FindProcShort (glBufferData)
+ && FindProcShort (glBufferSubData)
+ && FindProcShort (glGetBufferSubData)
+ && FindProcShort (glMapBuffer)
+ && FindProcShort (glUnmapBuffer)
+ && FindProcShort (glGetBufferParameteriv)
+ && FindProcShort (glGetBufferPointerv);
+
+ // load OpenGL 2.0 new functions
+ has20 = IsGlGreaterEqual (2, 0)
+ && FindProcShort (glBlendEquationSeparate)
+ && FindProcShort (glDrawBuffers)
+ && FindProcShort (glStencilOpSeparate)
+ && FindProcShort (glStencilFuncSeparate)
+ && FindProcShort (glStencilMaskSeparate)
+ && FindProcShort (glAttachShader)
+ && FindProcShort (glBindAttribLocation)
+ && FindProcShort (glCompileShader)
+ && FindProcShort (glCreateProgram)
+ && FindProcShort (glCreateShader)
+ && FindProcShort (glDeleteProgram)
+ && FindProcShort (glDeleteShader)
+ && FindProcShort (glDetachShader)
+ && FindProcShort (glDisableVertexAttribArray)
+ && FindProcShort (glEnableVertexAttribArray)
+ && FindProcShort (glGetActiveAttrib)
+ && FindProcShort (glGetActiveUniform)
+ && FindProcShort (glGetAttachedShaders)
+ && FindProcShort (glGetAttribLocation)
+ && FindProcShort (glGetProgramiv)
+ && FindProcShort (glGetProgramInfoLog)
+ && FindProcShort (glGetShaderiv)
+ && FindProcShort (glGetShaderInfoLog)
+ && FindProcShort (glGetShaderSource)
+ && FindProcShort (glGetUniformLocation)
+ && FindProcShort (glGetUniformfv)
+ && FindProcShort (glGetUniformiv)
+ && FindProcShort (glGetVertexAttribdv)
+ && FindProcShort (glGetVertexAttribfv)
+ && FindProcShort (glGetVertexAttribiv)
+ && FindProcShort (glGetVertexAttribPointerv)
+ && FindProcShort (glIsProgram)
+ && FindProcShort (glIsShader)
+ && FindProcShort (glLinkProgram)
+ && FindProcShort (glShaderSource)
+ && FindProcShort (glUseProgram)
+ && FindProcShort (glUniform1f)
+ && FindProcShort (glUniform2f)
+ && FindProcShort (glUniform3f)
+ && FindProcShort (glUniform4f)
+ && FindProcShort (glUniform1i)
+ && FindProcShort (glUniform2i)
+ && FindProcShort (glUniform3i)
+ && FindProcShort (glUniform4i)
+ && FindProcShort (glUniform1fv)
+ && FindProcShort (glUniform2fv)
+ && FindProcShort (glUniform3fv)
+ && FindProcShort (glUniform4fv)
+ && FindProcShort (glUniform1iv)
+ && FindProcShort (glUniform2iv)
+ && FindProcShort (glUniform3iv)
+ && FindProcShort (glUniform4iv)
+ && FindProcShort (glUniformMatrix2fv)
+ && FindProcShort (glUniformMatrix3fv)
+ && FindProcShort (glUniformMatrix4fv)
+ && FindProcShort (glValidateProgram)
+ && FindProcShort (glVertexAttrib1d)
+ && FindProcShort (glVertexAttrib1dv)
+ && FindProcShort (glVertexAttrib1f)
+ && FindProcShort (glVertexAttrib1fv)
+ && FindProcShort (glVertexAttrib1s)
+ && FindProcShort (glVertexAttrib1sv)
+ && FindProcShort (glVertexAttrib2d)
+ && FindProcShort (glVertexAttrib2dv)
+ && FindProcShort (glVertexAttrib2f)
+ && FindProcShort (glVertexAttrib2fv)
+ && FindProcShort (glVertexAttrib2s)
+ && FindProcShort (glVertexAttrib2sv)
+ && FindProcShort (glVertexAttrib3d)
+ && FindProcShort (glVertexAttrib3dv)
+ && FindProcShort (glVertexAttrib3f)
+ && FindProcShort (glVertexAttrib3fv)
+ && FindProcShort (glVertexAttrib3s)
+ && FindProcShort (glVertexAttrib3sv)
+ && FindProcShort (glVertexAttrib4Nbv)
+ && FindProcShort (glVertexAttrib4Niv)
+ && FindProcShort (glVertexAttrib4Nsv)
+ && FindProcShort (glVertexAttrib4Nub)
+ && FindProcShort (glVertexAttrib4Nubv)
+ && FindProcShort (glVertexAttrib4Nuiv)
+ && FindProcShort (glVertexAttrib4Nusv)
+ && FindProcShort (glVertexAttrib4bv)
+ && FindProcShort (glVertexAttrib4d)
+ && FindProcShort (glVertexAttrib4dv)
+ && FindProcShort (glVertexAttrib4f)
+ && FindProcShort (glVertexAttrib4fv)
+ && FindProcShort (glVertexAttrib4iv)
+ && FindProcShort (glVertexAttrib4s)
+ && FindProcShort (glVertexAttrib4sv)
+ && FindProcShort (glVertexAttrib4ubv)
+ && FindProcShort (glVertexAttrib4uiv)
+ && FindProcShort (glVertexAttrib4usv)
+ && FindProcShort (glVertexAttribPointer);
+
+ // load OpenGL 2.1 new functions
+ has21 = IsGlGreaterEqual (2, 1)
+ && FindProcShort (glUniformMatrix2x3fv)
+ && FindProcShort (glUniformMatrix3x2fv)
+ && FindProcShort (glUniformMatrix2x4fv)
+ && FindProcShort (glUniformMatrix4x2fv)
+ && FindProcShort (glUniformMatrix3x4fv)
+ && FindProcShort (glUniformMatrix4x3fv);
+
+ // load GL_ARB_framebuffer_object (added to OpenGL 3.0 core)
+ const bool hasFBO = (IsGlGreaterEqual (3, 0) || CheckExtension ("GL_ARB_framebuffer_object"))
+ && FindProcShort (glIsRenderbuffer)
+ && FindProcShort (glBindRenderbuffer)
+ && FindProcShort (glDeleteRenderbuffers)
+ && FindProcShort (glGenRenderbuffers)
+ && FindProcShort (glRenderbufferStorage)
+ && FindProcShort (glGetRenderbufferParameteriv)
+ && FindProcShort (glIsFramebuffer)
+ && FindProcShort (glBindFramebuffer)
+ && FindProcShort (glDeleteFramebuffers)
+ && FindProcShort (glGenFramebuffers)
+ && FindProcShort (glCheckFramebufferStatus)
+ && FindProcShort (glFramebufferTexture1D)
+ && FindProcShort (glFramebufferTexture2D)
+ && FindProcShort (glFramebufferTexture3D)
+ && FindProcShort (glFramebufferRenderbuffer)
+ && FindProcShort (glGetFramebufferAttachmentParameteriv)
+ && FindProcShort (glGenerateMipmap)
+ && FindProcShort (glBlitFramebuffer)
+ && FindProcShort (glRenderbufferStorageMultisample)
+ && FindProcShort (glFramebufferTextureLayer);
+
+ // load GL_ARB_vertex_array_object (added to OpenGL 3.0 core)
+ const bool hasVAO = (IsGlGreaterEqual (3, 0) || CheckExtension ("GL_ARB_vertex_array_object"))
+ && FindProcShort (glBindVertexArray)
+ && FindProcShort (glDeleteVertexArrays)
+ && FindProcShort (glGenVertexArrays)
+ && FindProcShort (glIsVertexArray);
+
+ // load GL_ARB_map_buffer_range (added to OpenGL 3.0 core)
+ const bool hasMapBufferRange = (IsGlGreaterEqual (3, 0) || CheckExtension ("GL_ARB_map_buffer_range"))
+ && FindProcShort (glMapBufferRange)
+ && FindProcShort (glFlushMappedBufferRange);
+
+ // load OpenGL 3.0 new functions
+ has30 = IsGlGreaterEqual (3, 0)
+ && hasFBO
+ && hasVAO
+ && hasMapBufferRange
+ && FindProcShort (glColorMaski)
+ && FindProcShort (glGetBooleani_v)
+ && FindProcShort (glGetIntegeri_v)
+ && FindProcShort (glEnablei)
+ && FindProcShort (glDisablei)
+ && FindProcShort (glIsEnabledi)
+ && FindProcShort (glBeginTransformFeedback)
+ && FindProcShort (glEndTransformFeedback)
+ && FindProcShort (glBindBufferRange)
+ && FindProcShort (glBindBufferBase)
+ && FindProcShort (glTransformFeedbackVaryings)
+ && FindProcShort (glGetTransformFeedbackVarying)
+ && FindProcShort (glClampColor)
+ && FindProcShort (glBeginConditionalRender)
+ && FindProcShort (glEndConditionalRender)
+ && FindProcShort (glVertexAttribIPointer)
+ && FindProcShort (glGetVertexAttribIiv)
+ && FindProcShort (glGetVertexAttribIuiv)
+ && FindProcShort (glVertexAttribI1i)
+ && FindProcShort (glVertexAttribI2i)
+ && FindProcShort (glVertexAttribI3i)
+ && FindProcShort (glVertexAttribI4i)
+ && FindProcShort (glVertexAttribI1ui)
+ && FindProcShort (glVertexAttribI2ui)
+ && FindProcShort (glVertexAttribI3ui)
+ && FindProcShort (glVertexAttribI4ui)
+ && FindProcShort (glVertexAttribI1iv)
+ && FindProcShort (glVertexAttribI2iv)
+ && FindProcShort (glVertexAttribI3iv)
+ && FindProcShort (glVertexAttribI4iv)
+ && FindProcShort (glVertexAttribI1uiv)
+ && FindProcShort (glVertexAttribI2uiv)
+ && FindProcShort (glVertexAttribI3uiv)
+ && FindProcShort (glVertexAttribI4uiv)
+ && FindProcShort (glVertexAttribI4bv)
+ && FindProcShort (glVertexAttribI4sv)
+ && FindProcShort (glVertexAttribI4ubv)
+ && FindProcShort (glVertexAttribI4usv)
+ && FindProcShort (glGetUniformuiv)
+ && FindProcShort (glBindFragDataLocation)
+ && FindProcShort (glGetFragDataLocation)
+ && FindProcShort (glUniform1ui)
+ && FindProcShort (glUniform2ui)
+ && FindProcShort (glUniform3ui)
+ && FindProcShort (glUniform4ui)
+ && FindProcShort (glUniform1uiv)
+ && FindProcShort (glUniform2uiv)
+ && FindProcShort (glUniform3uiv)
+ && FindProcShort (glUniform4uiv)
+ && FindProcShort (glTexParameterIiv)
+ && FindProcShort (glTexParameterIuiv)
+ && FindProcShort (glGetTexParameterIiv)
+ && FindProcShort (glGetTexParameterIuiv)
+ && FindProcShort (glClearBufferiv)
+ && FindProcShort (glClearBufferuiv)
+ && FindProcShort (glClearBufferfv)
+ && FindProcShort (glClearBufferfi)
+ && FindProcShort (glGetStringi);
+
+ // load GL_ARB_uniform_buffer_object (added to OpenGL 3.1 core)
+ const bool hasUBO = (IsGlGreaterEqual (3, 1) || CheckExtension ("GL_ARB_uniform_buffer_object"))
+ && FindProcShort (glGetUniformIndices)
+ && FindProcShort (glGetActiveUniformsiv)
+ && FindProcShort (glGetActiveUniformName)
+ && FindProcShort (glGetUniformBlockIndex)
+ && FindProcShort (glGetActiveUniformBlockiv)
+ && FindProcShort (glGetActiveUniformBlockName)
+ && FindProcShort (glUniformBlockBinding);
+
+ // load GL_ARB_copy_buffer (added to OpenGL 3.1 core)
+ const bool hasCopyBufSubData = (IsGlGreaterEqual (3, 1) || CheckExtension ("GL_ARB_copy_buffer"))
+ && FindProcShort (glCopyBufferSubData);
+
+ if (has30)
{
- arbVBO = new OpenGl_ArbVBO();
- memset (arbVBO, 0, sizeof(OpenGl_ArbVBO)); // nullify whole structure
- if (!FindProcShort (arbVBO, glGenBuffersARB)
- || !FindProcShort (arbVBO, glBindBufferARB)
- || !FindProcShort (arbVBO, glBufferDataARB)
- || !FindProcShort (arbVBO, glDeleteBuffersARB))
- {
- delete arbVBO;
- arbVBO = NULL;
- }
+ // NPOT textures are required by OpenGL 2.0 specifications
+ // but doesn't hardware accelerated by some ancient OpenGL 2.1 hardware (GeForce FX, RadeOn 9700 etc.)
+ arbNPTW = Standard_True;
+ arbTexRG = Standard_True;
}
+ // load OpenGL 3.1 new functions
+ has31 = IsGlGreaterEqual (3, 1)
+ && hasUBO
+ && hasCopyBufSubData
+ && FindProcShort (glDrawArraysInstanced)
+ && FindProcShort (glDrawElementsInstanced)
+ && FindProcShort (glTexBuffer)
+ && FindProcShort (glPrimitiveRestartIndex);
+
+ // load GL_ARB_draw_elements_base_vertex (added to OpenGL 3.2 core)
+ const bool hasDrawElemsBaseVert = (IsGlGreaterEqual (3, 2) || CheckExtension ("GL_ARB_draw_elements_base_vertex"))
+ && FindProcShort (glDrawElementsBaseVertex)
+ && FindProcShort (glDrawRangeElementsBaseVertex)
+ && FindProcShort (glDrawElementsInstancedBaseVertex)
+ && FindProcShort (glMultiDrawElementsBaseVertex);
+
+ // load GL_ARB_provoking_vertex (added to OpenGL 3.2 core)
+ const bool hasProvokingVert = (IsGlGreaterEqual (3, 2) || CheckExtension ("GL_ARB_provoking_vertex"))
+ && FindProcShort (glProvokingVertex);
+
+ // load GL_ARB_sync (added to OpenGL 3.2 core)
+ const bool hasSync = (IsGlGreaterEqual (3, 2) || CheckExtension ("GL_ARB_sync"))
+ && FindProcShort (glFenceSync)
+ && FindProcShort (glIsSync)
+ && FindProcShort (glDeleteSync)
+ && FindProcShort (glClientWaitSync)
+ && FindProcShort (glWaitSync)
+ && FindProcShort (glGetInteger64v)
+ && FindProcShort (glGetSynciv);
+
+ // load GL_ARB_texture_multisample (added to OpenGL 3.2 core)
+ const bool hasTextureMultisample = (IsGlGreaterEqual (3, 2) || CheckExtension ("GL_ARB_texture_multisample"))
+ && FindProcShort (glTexImage2DMultisample)
+ && FindProcShort (glTexImage3DMultisample)
+ && FindProcShort (glGetMultisamplefv)
+ && FindProcShort (glSampleMaski);
+
+ // load OpenGL 3.2 new functions
+ has32 = IsGlGreaterEqual (3, 2)
+ && hasDrawElemsBaseVert
+ && hasProvokingVert
+ && hasSync
+ && hasTextureMultisample
+ && FindProcShort (glGetInteger64i_v)
+ && FindProcShort (glGetBufferParameteri64v)
+ && FindProcShort (glFramebufferTexture);
+
+ // load GL_ARB_blend_func_extended (added to OpenGL 3.3 core)
+ const bool hasBlendFuncExtended = (IsGlGreaterEqual (3, 3) || CheckExtension ("GL_ARB_blend_func_extended"))
+ && FindProcShort (glBindFragDataLocationIndexed)
+ && FindProcShort (glGetFragDataIndex);
+
+ // load GL_ARB_sampler_objects (added to OpenGL 3.3 core)
+ const bool hasSamplerObjects = (IsGlGreaterEqual (3, 3) || CheckExtension ("GL_ARB_sampler_objects"))
+ && FindProcShort (glGenSamplers)
+ && FindProcShort (glDeleteSamplers)
+ && FindProcShort (glIsSampler)
+ && FindProcShort (glBindSampler)
+ && FindProcShort (glSamplerParameteri)
+ && FindProcShort (glSamplerParameteriv)
+ && FindProcShort (glSamplerParameterf)
+ && FindProcShort (glSamplerParameterfv)
+ && FindProcShort (glSamplerParameterIiv)
+ && FindProcShort (glSamplerParameterIuiv)
+ && FindProcShort (glGetSamplerParameteriv)
+ && FindProcShort (glGetSamplerParameterIiv)
+ && FindProcShort (glGetSamplerParameterfv)
+ && FindProcShort (glGetSamplerParameterIuiv);
+
+ // load GL_ARB_timer_query (added to OpenGL 3.3 core)
+ const bool hasTimerQuery = (IsGlGreaterEqual (3, 3) || CheckExtension ("GL_ARB_timer_query"))
+ && FindProcShort (glQueryCounter)
+ && FindProcShort (glGetQueryObjecti64v)
+ && FindProcShort (glGetQueryObjectui64v);
+
+ // load GL_ARB_vertex_type_2_10_10_10_rev (added to OpenGL 3.3 core)
+ const bool hasVertType21010101rev = (IsGlGreaterEqual (3, 3) || CheckExtension ("GL_ARB_vertex_type_2_10_10_10_rev"))
+ && FindProcShort (glVertexP2ui)
+ && FindProcShort (glVertexP2uiv)
+ && FindProcShort (glVertexP3ui)
+ && FindProcShort (glVertexP3uiv)
+ && FindProcShort (glVertexP4ui)
+ && FindProcShort (glVertexP4uiv)
+ && FindProcShort (glTexCoordP1ui)
+ && FindProcShort (glTexCoordP1uiv)
+ && FindProcShort (glTexCoordP2ui)
+ && FindProcShort (glTexCoordP2uiv)
+ && FindProcShort (glTexCoordP3ui)
+ && FindProcShort (glTexCoordP3uiv)
+ && FindProcShort (glTexCoordP4ui)
+ && FindProcShort (glTexCoordP4uiv)
+ && FindProcShort (glMultiTexCoordP1ui)
+ && FindProcShort (glMultiTexCoordP1uiv)
+ && FindProcShort (glMultiTexCoordP2ui)
+ && FindProcShort (glMultiTexCoordP2uiv)
+ && FindProcShort (glMultiTexCoordP3ui)
+ && FindProcShort (glMultiTexCoordP3uiv)
+ && FindProcShort (glMultiTexCoordP4ui)
+ && FindProcShort (glMultiTexCoordP4uiv)
+ && FindProcShort (glNormalP3ui)
+ && FindProcShort (glNormalP3uiv)
+ && FindProcShort (glColorP3ui)
+ && FindProcShort (glColorP3uiv)
+ && FindProcShort (glColorP4ui)
+ && FindProcShort (glColorP4uiv)
+ && FindProcShort (glSecondaryColorP3ui)
+ && FindProcShort (glSecondaryColorP3uiv)
+ && FindProcShort (glVertexAttribP1ui)
+ && FindProcShort (glVertexAttribP1uiv)
+ && FindProcShort (glVertexAttribP2ui)
+ && FindProcShort (glVertexAttribP2uiv)
+ && FindProcShort (glVertexAttribP3ui)
+ && FindProcShort (glVertexAttribP3uiv)
+ && FindProcShort (glVertexAttribP4ui)
+ && FindProcShort (glVertexAttribP4uiv);
+
+ // load OpenGL 3.3 extra functions
+ has33 = IsGlGreaterEqual (3, 3)
+ && hasBlendFuncExtended
+ && hasSamplerObjects
+ && hasTimerQuery
+ && hasVertType21010101rev
+ && FindProcShort (glVertexAttribDivisor);
+
+ // load GL_ARB_draw_indirect (added to OpenGL 4.0 core)
+ const bool hasDrawIndirect = (IsGlGreaterEqual (4, 0) || CheckExtension ("GL_ARB_draw_indirect"))
+ && FindProcShort (glDrawArraysIndirect)
+ && FindProcShort (glDrawElementsIndirect);
+
+ // load GL_ARB_gpu_shader_fp64 (added to OpenGL 4.0 core)
+ const bool hasShaderFP64 = (IsGlGreaterEqual (4, 0) || CheckExtension ("GL_ARB_gpu_shader_fp64"))
+ && FindProcShort (glUniform1d)
+ && FindProcShort (glUniform2d)
+ && FindProcShort (glUniform3d)
+ && FindProcShort (glUniform4d)
+ && FindProcShort (glUniform1dv)
+ && FindProcShort (glUniform2dv)
+ && FindProcShort (glUniform3dv)
+ && FindProcShort (glUniform4dv)
+ && FindProcShort (glUniformMatrix2dv)
+ && FindProcShort (glUniformMatrix3dv)
+ && FindProcShort (glUniformMatrix4dv)
+ && FindProcShort (glUniformMatrix2x3dv)
+ && FindProcShort (glUniformMatrix2x4dv)
+ && FindProcShort (glUniformMatrix3x2dv)
+ && FindProcShort (glUniformMatrix3x4dv)
+ && FindProcShort (glUniformMatrix4x2dv)
+ && FindProcShort (glUniformMatrix4x3dv)
+ && FindProcShort (glGetUniformdv);
+
+ // load GL_ARB_shader_subroutine (added to OpenGL 4.0 core)
+ const bool hasShaderSubroutine = (IsGlGreaterEqual (4, 0) || CheckExtension ("GL_ARB_shader_subroutine"))
+ && FindProcShort (glGetSubroutineUniformLocation)
+ && FindProcShort (glGetSubroutineIndex)
+ && FindProcShort (glGetActiveSubroutineUniformiv)
+ && FindProcShort (glGetActiveSubroutineUniformName)
+ && FindProcShort (glGetActiveSubroutineName)
+ && FindProcShort (glUniformSubroutinesuiv)
+ && FindProcShort (glGetUniformSubroutineuiv)
+ && FindProcShort (glGetProgramStageiv);
+
+ // load GL_ARB_tessellation_shader (added to OpenGL 4.0 core)
+ const bool hasTessellationShader = (IsGlGreaterEqual (4, 0) || CheckExtension ("GL_ARB_tessellation_shader"))
+ && FindProcShort (glPatchParameteri)
+ && FindProcShort (glPatchParameterfv);
+
+ // load GL_ARB_transform_feedback2 (added to OpenGL 4.0 core)
+ const bool hasTrsfFeedback2 = (IsGlGreaterEqual (4, 0) || CheckExtension ("GL_ARB_transform_feedback2"))
+ && FindProcShort (glBindTransformFeedback)
+ && FindProcShort (glDeleteTransformFeedbacks)
+ && FindProcShort (glGenTransformFeedbacks)
+ && FindProcShort (glIsTransformFeedback)
+ && FindProcShort (glPauseTransformFeedback)
+ && FindProcShort (glResumeTransformFeedback)
+ && FindProcShort (glDrawTransformFeedback);
+
+ // load GL_ARB_transform_feedback3 (added to OpenGL 4.0 core)
+ const bool hasTrsfFeedback3 = (IsGlGreaterEqual (4, 0) || CheckExtension ("GL_ARB_transform_feedback3"))
+ && FindProcShort (glDrawTransformFeedbackStream)
+ && FindProcShort (glBeginQueryIndexed)
+ && FindProcShort (glEndQueryIndexed)
+ && FindProcShort (glGetQueryIndexediv);
+
+ // load OpenGL 4.0 new functions
+ has40 = IsGlGreaterEqual (4, 0)
+ && hasDrawIndirect
+ && hasShaderFP64
+ && hasShaderSubroutine
+ && hasTessellationShader
+ && hasTrsfFeedback2
+ && hasTrsfFeedback3
+ && FindProcShort (glMinSampleShading)
+ && FindProcShort (glBlendEquationi)
+ && FindProcShort (glBlendEquationSeparatei)
+ && FindProcShort (glBlendFunci)
+ && FindProcShort (glBlendFuncSeparatei);
+
+ // load GL_ARB_ES2_compatibility (added to OpenGL 4.1 core)
+ const bool hasES2Compatibility = (IsGlGreaterEqual (4, 1) || CheckExtension ("GL_ARB_ES2_compatibility"))
+ && FindProcShort (glReleaseShaderCompiler)
+ && FindProcShort (glShaderBinary)
+ && FindProcShort (glGetShaderPrecisionFormat)
+ && FindProcShort (glDepthRangef)
+ && FindProcShort (glClearDepthf);
+
+ // load GL_ARB_get_program_binary (added to OpenGL 4.1 core)
+ const bool hasGetProgramBinary = (IsGlGreaterEqual (4, 1) || CheckExtension ("GL_ARB_get_program_binary"))
+ && FindProcShort (glGetProgramBinary)
+ && FindProcShort (glProgramBinary)
+ && FindProcShort (glProgramParameteri);
+
+
+ // load GL_ARB_separate_shader_objects (added to OpenGL 4.1 core)
+ const bool hasSeparateShaderObjects = (IsGlGreaterEqual (4, 1) || CheckExtension ("GL_ARB_separate_shader_objects"))
+ && FindProcShort (glUseProgramStages)
+ && FindProcShort (glActiveShaderProgram)
+ && FindProcShort (glCreateShaderProgramv)
+ && FindProcShort (glBindProgramPipeline)
+ && FindProcShort (glDeleteProgramPipelines)
+ && FindProcShort (glGenProgramPipelines)
+ && FindProcShort (glIsProgramPipeline)
+ && FindProcShort (glGetProgramPipelineiv)
+ && FindProcShort (glProgramUniform1i)
+ && FindProcShort (glProgramUniform1iv)
+ && FindProcShort (glProgramUniform1f)
+ && FindProcShort (glProgramUniform1fv)
+ && FindProcShort (glProgramUniform1d)
+ && FindProcShort (glProgramUniform1dv)
+ && FindProcShort (glProgramUniform1ui)
+ && FindProcShort (glProgramUniform1uiv)
+ && FindProcShort (glProgramUniform2i)
+ && FindProcShort (glProgramUniform2iv)
+ && FindProcShort (glProgramUniform2f)
+ && FindProcShort (glProgramUniform2fv)
+ && FindProcShort (glProgramUniform2d)
+ && FindProcShort (glProgramUniform2dv)
+ && FindProcShort (glProgramUniform2ui)
+ && FindProcShort (glProgramUniform2uiv)
+ && FindProcShort (glProgramUniform3i)
+ && FindProcShort (glProgramUniform3iv)
+ && FindProcShort (glProgramUniform3f)
+ && FindProcShort (glProgramUniform3fv)
+ && FindProcShort (glProgramUniform3d)
+ && FindProcShort (glProgramUniform3dv)
+ && FindProcShort (glProgramUniform3ui)
+ && FindProcShort (glProgramUniform3uiv)
+ && FindProcShort (glProgramUniform4i)
+ && FindProcShort (glProgramUniform4iv)
+ && FindProcShort (glProgramUniform4f)
+ && FindProcShort (glProgramUniform4fv)
+ && FindProcShort (glProgramUniform4d)
+ && FindProcShort (glProgramUniform4dv)
+ && FindProcShort (glProgramUniform4ui)
+ && FindProcShort (glProgramUniform4uiv)
+ && FindProcShort (glProgramUniformMatrix2fv)
+ && FindProcShort (glProgramUniformMatrix3fv)
+ && FindProcShort (glProgramUniformMatrix4fv)
+ && FindProcShort (glProgramUniformMatrix2dv)
+ && FindProcShort (glProgramUniformMatrix3dv)
+ && FindProcShort (glProgramUniformMatrix4dv)
+ && FindProcShort (glProgramUniformMatrix2x3fv)
+ && FindProcShort (glProgramUniformMatrix3x2fv)
+ && FindProcShort (glProgramUniformMatrix2x4fv)
+ && FindProcShort (glProgramUniformMatrix4x2fv)
+ && FindProcShort (glProgramUniformMatrix3x4fv)
+ && FindProcShort (glProgramUniformMatrix4x3fv)
+ && FindProcShort (glProgramUniformMatrix2x3dv)
+ && FindProcShort (glProgramUniformMatrix3x2dv)
+ && FindProcShort (glProgramUniformMatrix2x4dv)
+ && FindProcShort (glProgramUniformMatrix4x2dv)
+ && FindProcShort (glProgramUniformMatrix3x4dv)
+ && FindProcShort (glProgramUniformMatrix4x3dv)
+ && FindProcShort (glValidateProgramPipeline)
+ && FindProcShort (glGetProgramPipelineInfoLog);
+
+ // load GL_ARB_vertex_attrib_64bit (added to OpenGL 4.1 core)
+ const bool hasVertAttrib64bit = (IsGlGreaterEqual (4, 1) || CheckExtension ("GL_ARB_vertex_attrib_64bit"))
+ && FindProcShort (glVertexAttribL1d)
+ && FindProcShort (glVertexAttribL2d)
+ && FindProcShort (glVertexAttribL3d)
+ && FindProcShort (glVertexAttribL4d)
+ && FindProcShort (glVertexAttribL1dv)
+ && FindProcShort (glVertexAttribL2dv)
+ && FindProcShort (glVertexAttribL3dv)
+ && FindProcShort (glVertexAttribL4dv)
+ && FindProcShort (glVertexAttribLPointer)
+ && FindProcShort (glGetVertexAttribLdv);
+
+ // load GL_ARB_viewport_array (added to OpenGL 4.1 core)
+ const bool hasViewportArray = (IsGlGreaterEqual (4, 1) || CheckExtension ("GL_ARB_viewport_array"))
+ && FindProcShort (glViewportArrayv)
+ && FindProcShort (glViewportIndexedf)
+ && FindProcShort (glViewportIndexedfv)
+ && FindProcShort (glScissorArrayv)
+ && FindProcShort (glScissorIndexed)
+ && FindProcShort (glScissorIndexedv)
+ && FindProcShort (glDepthRangeArrayv)
+ && FindProcShort (glDepthRangeIndexed)
+ && FindProcShort (glGetFloati_v)
+ && FindProcShort (glGetDoublei_v);
+
+ has41 = IsGlGreaterEqual (4, 1)
+ && hasES2Compatibility
+ && hasGetProgramBinary
+ && hasSeparateShaderObjects
+ && hasVertAttrib64bit
+ && hasViewportArray;
+
+ // load GL_ARB_base_instance (added to OpenGL 4.2 core)
+ const bool hasBaseInstance = (IsGlGreaterEqual (4, 2) || CheckExtension ("GL_ARB_base_instance"))
+ && FindProcShort (glDrawArraysInstancedBaseInstance)
+ && FindProcShort (glDrawElementsInstancedBaseInstance)
+ && FindProcShort (glDrawElementsInstancedBaseVertexBaseInstance);
+
+ // load GL_ARB_transform_feedback_instanced (added to OpenGL 4.2 core)
+ const bool hasTrsfFeedbackInstanced = (IsGlGreaterEqual (4, 2) || CheckExtension ("GL_ARB_transform_feedback_instanced"))
+ && FindProcShort (glDrawTransformFeedbackInstanced)
+ && FindProcShort (glDrawTransformFeedbackStreamInstanced);
+
+ // load GL_ARB_internalformat_query (added to OpenGL 4.2 core)
+ const bool hasInternalFormatQuery = (IsGlGreaterEqual (4, 2) || CheckExtension ("GL_ARB_internalformat_query"))
+ && FindProcShort (glGetInternalformativ);
+
+ // load GL_ARB_shader_atomic_counters (added to OpenGL 4.2 core)
+ const bool hasShaderAtomicCounters = (IsGlGreaterEqual (4, 2) || CheckExtension ("GL_ARB_shader_atomic_counters"))
+ && FindProcShort (glGetActiveAtomicCounterBufferiv);
+
+ // load GL_ARB_shader_image_load_store (added to OpenGL 4.2 core)
+ const bool hasShaderImgLoadStore = (IsGlGreaterEqual (4, 2) || CheckExtension ("GL_ARB_shader_image_load_store"))
+ && FindProcShort (glBindImageTexture)
+ && FindProcShort (glMemoryBarrier);
+
+ // load GL_ARB_texture_storage (added to OpenGL 4.2 core)
+ const bool hasTextureStorage = (IsGlGreaterEqual (4, 2) || CheckExtension ("GL_ARB_texture_storage"))
+ && FindProcShort (glTexStorage1D)
+ && FindProcShort (glTexStorage2D)
+ && FindProcShort (glTexStorage3D)
+ && FindProcShort (glTextureStorage1DEXT)
+ && FindProcShort (glTextureStorage2DEXT)
+ && FindProcShort (glTextureStorage3DEXT);
+
+ has42 = IsGlGreaterEqual (4, 2)
+ && hasBaseInstance
+ && hasTrsfFeedbackInstanced
+ && hasInternalFormatQuery
+ && hasShaderAtomicCounters
+ && hasShaderImgLoadStore
+ && hasTextureStorage;
+
+ has43 = IsGlGreaterEqual (4, 3)
+ && FindProcShort (glClearBufferData)
+ && FindProcShort (glClearBufferSubData)
+ && FindProcShort (glDispatchCompute)
+ && FindProcShort (glDispatchComputeIndirect)
+ && FindProcShort (glCopyImageSubData)
+ && FindProcShort (glFramebufferParameteri)
+ && FindProcShort (glGetFramebufferParameteriv)
+ && FindProcShort (glGetInternalformati64v)
+ && FindProcShort (glInvalidateTexSubImage)
+ && FindProcShort (glInvalidateTexImage)
+ && FindProcShort (glInvalidateBufferSubData)
+ && FindProcShort (glInvalidateBufferData)
+ && FindProcShort (glInvalidateFramebuffer)
+ && FindProcShort (glInvalidateSubFramebuffer)
+ && FindProcShort (glMultiDrawArraysIndirect)
+ && FindProcShort (glMultiDrawElementsIndirect)
+ && FindProcShort (glGetProgramInterfaceiv)
+ && FindProcShort (glGetProgramResourceIndex)
+ && FindProcShort (glGetProgramResourceName)
+ && FindProcShort (glGetProgramResourceiv)
+ && FindProcShort (glGetProgramResourceLocation)
+ && FindProcShort (glGetProgramResourceLocationIndex)
+ && FindProcShort (glShaderStorageBlockBinding)
+ && FindProcShort (glTexBufferRange)
+ && FindProcShort (glTexStorage2DMultisample)
+ && FindProcShort (glTexStorage3DMultisample)
+ && FindProcShort (glTextureView)
+ && FindProcShort (glBindVertexBuffer)
+ && FindProcShort (glVertexAttribFormat)
+ && FindProcShort (glVertexAttribIFormat)
+ && FindProcShort (glVertexAttribLFormat)
+ && FindProcShort (glVertexAttribBinding)
+ && FindProcShort (glVertexBindingDivisor)
+ && FindProcShort (glDebugMessageControl)
+ && FindProcShort (glDebugMessageInsert)
+ && FindProcShort (glDebugMessageCallback)
+ && FindProcShort (glGetDebugMessageLog)
+ && FindProcShort (glPushDebugGroup)
+ && FindProcShort (glPopDebugGroup)
+ && FindProcShort (glObjectLabel)
+ && FindProcShort (glGetObjectLabel)
+ && FindProcShort (glObjectPtrLabel)
+ && FindProcShort (glGetObjectPtrLabel);
+
+ // load GL_ARB_clear_texture (added to OpenGL 4.4 core)
+ bool arbTexClear = (IsGlGreaterEqual (4, 4) || CheckExtension ("GL_ARB_clear_texture"))
+ && FindProcShort (glClearTexImage)
+ && FindProcShort (glClearTexSubImage);
+
+ has44 = IsGlGreaterEqual (4, 4)
+ && arbTexClear
+ && FindProcShort (glBufferStorage)
+ && FindProcShort (glBindBuffersBase)
+ && FindProcShort (glBindBuffersRange)
+ && FindProcShort (glBindTextures)
+ && FindProcShort (glBindSamplers)
+ && FindProcShort (glBindImageTextures)
+ && FindProcShort (glBindVertexBuffers);
+
// initialize TBO extension (ARB)
- if (CheckExtension ("GL_ARB_texture_buffer_object"))
+ if (!has31
+ && CheckExtension ("GL_ARB_texture_buffer_object")
+ && FindProc ("glTexBufferARB", myFuncs->glTexBuffer))
{
- arbTBO = new OpenGl_ArbTBO();
- memset (arbTBO, 0, sizeof(OpenGl_ArbTBO)); // nullify whole structure
- if (!FindProcShort (arbTBO, glTexBufferARB))
- {
- delete arbTBO;
- arbTBO = NULL;
- }
+ arbTBO = (OpenGl_ArbTBO* )(&(*myFuncs));
}
// initialize hardware instancing extension (ARB)
- if (CheckExtension ("GL_ARB_draw_instanced"))
+ if (!has31
+ && CheckExtension ("GL_ARB_draw_instanced")
+ && FindProc ("glDrawArraysInstancedARB", myFuncs->glDrawArraysInstanced)
+ && FindProc ("glDrawElementsInstancedARB", myFuncs->glDrawElementsInstanced))
{
- arbIns = new OpenGl_ArbIns();
- memset (arbIns, 0, sizeof(OpenGl_ArbIns)); // nullify whole structure
- if (!FindProcShort (arbIns, glDrawArraysInstancedARB)
- || !FindProcShort (arbIns, glDrawElementsInstancedARB))
- {
- delete arbIns;
- arbIns = NULL;
- }
+ arbIns = (OpenGl_ArbIns* )(&(*myFuncs));
}
- // initialize FBO extension (EXT)
- if (CheckExtension ("GL_EXT_framebuffer_object"))
- {
- extFBO = new OpenGl_ExtFBO();
- memset (extFBO, 0, sizeof(OpenGl_ExtFBO)); // nullify whole structure
- if (!FindProcShort (extFBO, glGenFramebuffersEXT)
- || !FindProcShort (extFBO, glDeleteFramebuffersEXT)
- || !FindProcShort (extFBO, glBindFramebufferEXT)
- || !FindProcShort (extFBO, glFramebufferTexture2DEXT)
- || !FindProcShort (extFBO, glCheckFramebufferStatusEXT)
- || !FindProcShort (extFBO, glGenRenderbuffersEXT)
- || !FindProcShort (extFBO, glDeleteRenderbuffersEXT)
- || !FindProcShort (extFBO, glBindRenderbufferEXT)
- || !FindProcShort (extFBO, glRenderbufferStorageEXT)
- || !FindProcShort (extFBO, glFramebufferRenderbufferEXT)
- || !FindProcShort (extFBO, glGenerateMipmapEXT))
- {
- delete extFBO;
- extFBO = NULL;
- }
+ // initialize FBO extension (ARB)
+ if (hasFBO)
+ {
+ arbFBO = (OpenGl_ArbFBO* )(&(*myFuncs));
+ extPDS = Standard_True; // extension for EXT, but part of ARB
}
// initialize GS extension (EXT)
- if (CheckExtension ("GL_EXT_geometry_shader4"))
+ if (CheckExtension ("GL_EXT_geometry_shader4")
+ && FindProcShort (glProgramParameteriEXT))
{
- extGS = new OpenGl_ExtGS();
- memset (extGS, 0, sizeof(OpenGl_ExtGS)); // nullify whole structure
- if (!FindProcShort (extGS, glProgramParameteriEXT))
- {
- delete extGS;
- extGS = NULL;
- }
+ extGS = (OpenGl_ExtGS* )(&(*myFuncs));
}
- myGlCore20 = new OpenGl_GlCore20();
- memset (myGlCore20, 0, sizeof(OpenGl_GlCore20)); // nullify whole structure
-
- // Check if OpenGL 1.2 core functionality is actually present
- Standard_Boolean hasGlCore12 = IsGlGreaterEqual (1, 2)
- && FindProcShort (myGlCore20, glBlendColor)
- && FindProcShort (myGlCore20, glBlendEquation)
- && FindProcShort (myGlCore20, glDrawRangeElements)
- && FindProcShort (myGlCore20, glTexImage3D)
- && FindProcShort (myGlCore20, glTexSubImage3D)
- && FindProcShort (myGlCore20, glCopyTexSubImage3D);
-
- // Check if OpenGL 1.3 core functionality is actually present
- Standard_Boolean hasGlCore13 = IsGlGreaterEqual (1, 3)
- && FindProcShort (myGlCore20, glActiveTexture)
- && FindProcShort (myGlCore20, glSampleCoverage)
- && FindProcShort (myGlCore20, glCompressedTexImage3D)
- && FindProcShort (myGlCore20, glCompressedTexImage2D)
- && FindProcShort (myGlCore20, glCompressedTexImage1D)
- && FindProcShort (myGlCore20, glCompressedTexSubImage3D)
- && FindProcShort (myGlCore20, glCompressedTexSubImage2D)
- && FindProcShort (myGlCore20, glCompressedTexSubImage1D)
- && FindProcShort (myGlCore20, glGetCompressedTexImage)
- // deprecated
- && FindProcShort (myGlCore20, glClientActiveTexture)
- && FindProcShort (myGlCore20, glMultiTexCoord1d)
- && FindProcShort (myGlCore20, glMultiTexCoord1dv)
- && FindProcShort (myGlCore20, glMultiTexCoord1f)
- && FindProcShort (myGlCore20, glMultiTexCoord1fv)
- && FindProcShort (myGlCore20, glMultiTexCoord1i)
- && FindProcShort (myGlCore20, glMultiTexCoord1iv)
- && FindProcShort (myGlCore20, glMultiTexCoord1s)
- && FindProcShort (myGlCore20, glMultiTexCoord1sv)
- && FindProcShort (myGlCore20, glMultiTexCoord2d)
- && FindProcShort (myGlCore20, glMultiTexCoord2dv)
- && FindProcShort (myGlCore20, glMultiTexCoord2f)
- && FindProcShort (myGlCore20, glMultiTexCoord2fv)
- && FindProcShort (myGlCore20, glMultiTexCoord2i)
- && FindProcShort (myGlCore20, glMultiTexCoord2iv)
- && FindProcShort (myGlCore20, glMultiTexCoord2s)
- && FindProcShort (myGlCore20, glMultiTexCoord2sv)
- && FindProcShort (myGlCore20, glMultiTexCoord3d)
- && FindProcShort (myGlCore20, glMultiTexCoord3dv)
- && FindProcShort (myGlCore20, glMultiTexCoord3f)
- && FindProcShort (myGlCore20, glMultiTexCoord3fv)
- && FindProcShort (myGlCore20, glMultiTexCoord3i)
- && FindProcShort (myGlCore20, glMultiTexCoord3iv)
- && FindProcShort (myGlCore20, glMultiTexCoord3s)
- && FindProcShort (myGlCore20, glMultiTexCoord3sv)
- && FindProcShort (myGlCore20, glMultiTexCoord4d)
- && FindProcShort (myGlCore20, glMultiTexCoord4dv)
- && FindProcShort (myGlCore20, glMultiTexCoord4f)
- && FindProcShort (myGlCore20, glMultiTexCoord4fv)
- && FindProcShort (myGlCore20, glMultiTexCoord4i)
- && FindProcShort (myGlCore20, glMultiTexCoord4iv)
- && FindProcShort (myGlCore20, glMultiTexCoord4s)
- && FindProcShort (myGlCore20, glMultiTexCoord4sv)
- && FindProcShort (myGlCore20, glLoadTransposeMatrixf)
- && FindProcShort (myGlCore20, glLoadTransposeMatrixd)
- && FindProcShort (myGlCore20, glMultTransposeMatrixf)
- && FindProcShort (myGlCore20, glMultTransposeMatrixd);
-
- // Check if OpenGL 1.4 core functionality is actually present
- Standard_Boolean hasGlCore14 = IsGlGreaterEqual (1, 4)
- && FindProcShort (myGlCore20, glBlendFuncSeparate)
- && FindProcShort (myGlCore20, glMultiDrawArrays)
- && FindProcShort (myGlCore20, glMultiDrawElements)
- && FindProcShort (myGlCore20, glPointParameterf)
- && FindProcShort (myGlCore20, glPointParameterfv)
- && FindProcShort (myGlCore20, glPointParameteri)
- && FindProcShort (myGlCore20, glPointParameteriv);
-
- // Check if OpenGL 1.5 core functionality is actually present
- Standard_Boolean hasGlCore15 = IsGlGreaterEqual (1, 5)
- && FindProcShort (myGlCore20, glGenQueries)
- && FindProcShort (myGlCore20, glDeleteQueries)
- && FindProcShort (myGlCore20, glIsQuery)
- && FindProcShort (myGlCore20, glBeginQuery)
- && FindProcShort (myGlCore20, glEndQuery)
- && FindProcShort (myGlCore20, glGetQueryiv)
- && FindProcShort (myGlCore20, glGetQueryObjectiv)
- && FindProcShort (myGlCore20, glGetQueryObjectuiv)
- && FindProcShort (myGlCore20, glBindBuffer)
- && FindProcShort (myGlCore20, glDeleteBuffers)
- && FindProcShort (myGlCore20, glGenBuffers)
- && FindProcShort (myGlCore20, glIsBuffer)
- && FindProcShort (myGlCore20, glBufferData)
- && FindProcShort (myGlCore20, glBufferSubData)
- && FindProcShort (myGlCore20, glGetBufferSubData)
- && FindProcShort (myGlCore20, glMapBuffer)
- && FindProcShort (myGlCore20, glUnmapBuffer)
- && FindProcShort (myGlCore20, glGetBufferParameteriv)
- && FindProcShort (myGlCore20, glGetBufferPointerv);
-
- // Check if OpenGL 2.0 core functionality is actually present
- Standard_Boolean hasGlCore20 = IsGlGreaterEqual (2, 0)
- && FindProcShort (myGlCore20, glBlendEquationSeparate)
- && FindProcShort (myGlCore20, glDrawBuffers)
- && FindProcShort (myGlCore20, glStencilOpSeparate)
- && FindProcShort (myGlCore20, glStencilFuncSeparate)
- && FindProcShort (myGlCore20, glStencilMaskSeparate)
- && FindProcShort (myGlCore20, glAttachShader)
- && FindProcShort (myGlCore20, glBindAttribLocation)
- && FindProcShort (myGlCore20, glCompileShader)
- && FindProcShort (myGlCore20, glCreateProgram)
- && FindProcShort (myGlCore20, glCreateShader)
- && FindProcShort (myGlCore20, glDeleteProgram)
- && FindProcShort (myGlCore20, glDeleteShader)
- && FindProcShort (myGlCore20, glDetachShader)
- && FindProcShort (myGlCore20, glDisableVertexAttribArray)
- && FindProcShort (myGlCore20, glEnableVertexAttribArray)
- && FindProcShort (myGlCore20, glGetActiveAttrib)
- && FindProcShort (myGlCore20, glGetActiveUniform)
- && FindProcShort (myGlCore20, glGetAttachedShaders)
- && FindProcShort (myGlCore20, glGetAttribLocation)
- && FindProcShort (myGlCore20, glGetProgramiv)
- && FindProcShort (myGlCore20, glGetProgramInfoLog)
- && FindProcShort (myGlCore20, glGetShaderiv)
- && FindProcShort (myGlCore20, glGetShaderInfoLog)
- && FindProcShort (myGlCore20, glGetShaderSource)
- && FindProcShort (myGlCore20, glGetUniformLocation)
- && FindProcShort (myGlCore20, glGetUniformfv)
- && FindProcShort (myGlCore20, glGetUniformiv)
- && FindProcShort (myGlCore20, glGetVertexAttribdv)
- && FindProcShort (myGlCore20, glGetVertexAttribfv)
- && FindProcShort (myGlCore20, glGetVertexAttribiv)
- && FindProcShort (myGlCore20, glGetVertexAttribPointerv)
- && FindProcShort (myGlCore20, glIsProgram)
- && FindProcShort (myGlCore20, glIsShader)
- && FindProcShort (myGlCore20, glLinkProgram)
- && FindProcShort (myGlCore20, glShaderSource)
- && FindProcShort (myGlCore20, glUseProgram)
- && FindProcShort (myGlCore20, glUniform1f)
- && FindProcShort (myGlCore20, glUniform2f)
- && FindProcShort (myGlCore20, glUniform3f)
- && FindProcShort (myGlCore20, glUniform4f)
- && FindProcShort (myGlCore20, glUniform1i)
- && FindProcShort (myGlCore20, glUniform2i)
- && FindProcShort (myGlCore20, glUniform3i)
- && FindProcShort (myGlCore20, glUniform4i)
- && FindProcShort (myGlCore20, glUniform1fv)
- && FindProcShort (myGlCore20, glUniform2fv)
- && FindProcShort (myGlCore20, glUniform3fv)
- && FindProcShort (myGlCore20, glUniform4fv)
- && FindProcShort (myGlCore20, glUniform1iv)
- && FindProcShort (myGlCore20, glUniform2iv)
- && FindProcShort (myGlCore20, glUniform3iv)
- && FindProcShort (myGlCore20, glUniform4iv)
- && FindProcShort (myGlCore20, glUniformMatrix2fv)
- && FindProcShort (myGlCore20, glUniformMatrix3fv)
- && FindProcShort (myGlCore20, glUniformMatrix4fv)
- && FindProcShort (myGlCore20, glValidateProgram)
- && FindProcShort (myGlCore20, glVertexAttrib1d)
- && FindProcShort (myGlCore20, glVertexAttrib1dv)
- && FindProcShort (myGlCore20, glVertexAttrib1f)
- && FindProcShort (myGlCore20, glVertexAttrib1fv)
- && FindProcShort (myGlCore20, glVertexAttrib1s)
- && FindProcShort (myGlCore20, glVertexAttrib1sv)
- && FindProcShort (myGlCore20, glVertexAttrib2d)
- && FindProcShort (myGlCore20, glVertexAttrib2dv)
- && FindProcShort (myGlCore20, glVertexAttrib2f)
- && FindProcShort (myGlCore20, glVertexAttrib2fv)
- && FindProcShort (myGlCore20, glVertexAttrib2s)
- && FindProcShort (myGlCore20, glVertexAttrib2sv)
- && FindProcShort (myGlCore20, glVertexAttrib3d)
- && FindProcShort (myGlCore20, glVertexAttrib3dv)
- && FindProcShort (myGlCore20, glVertexAttrib3f)
- && FindProcShort (myGlCore20, glVertexAttrib3fv)
- && FindProcShort (myGlCore20, glVertexAttrib3s)
- && FindProcShort (myGlCore20, glVertexAttrib3sv)
- && FindProcShort (myGlCore20, glVertexAttrib4Nbv)
- && FindProcShort (myGlCore20, glVertexAttrib4Niv)
- && FindProcShort (myGlCore20, glVertexAttrib4Nsv)
- && FindProcShort (myGlCore20, glVertexAttrib4Nub)
- && FindProcShort (myGlCore20, glVertexAttrib4Nubv)
- && FindProcShort (myGlCore20, glVertexAttrib4Nuiv)
- && FindProcShort (myGlCore20, glVertexAttrib4Nusv)
- && FindProcShort (myGlCore20, glVertexAttrib4bv)
- && FindProcShort (myGlCore20, glVertexAttrib4d)
- && FindProcShort (myGlCore20, glVertexAttrib4dv)
- && FindProcShort (myGlCore20, glVertexAttrib4f)
- && FindProcShort (myGlCore20, glVertexAttrib4fv)
- && FindProcShort (myGlCore20, glVertexAttrib4iv)
- && FindProcShort (myGlCore20, glVertexAttrib4s)
- && FindProcShort (myGlCore20, glVertexAttrib4sv)
- && FindProcShort (myGlCore20, glVertexAttrib4ubv)
- && FindProcShort (myGlCore20, glVertexAttrib4uiv)
- && FindProcShort (myGlCore20, glVertexAttrib4usv)
- && FindProcShort (myGlCore20, glVertexAttribPointer);
-
- if (!hasGlCore12)
+ if (!has12)
{
myGlVerMajor = 1;
myGlVerMinor = 1;
return;
}
- else
+ else if (!has13)
{
- core12 = myGlCore20;
+ myGlVerMajor = 1;
+ myGlVerMinor = 2;
+ return;
}
- if (!hasGlCore13)
+ else if (!has14)
{
myGlVerMajor = 1;
- myGlVerMinor = 2;
+ myGlVerMinor = 3;
return;
}
- else
+ else if (!has15)
{
- core13 = myGlCore20;
+ myGlVerMajor = 1;
+ myGlVerMinor = 4;
+ return;
}
- if(!hasGlCore14)
+ core15 = (OpenGl_GlCore15* )(&(*myFuncs));
+ core15fwd = (OpenGl_GlCore15Fwd* )(&(*myFuncs));
+
+ if (!has20)
{
myGlVerMajor = 1;
- myGlVerMinor = 3;
+ myGlVerMinor = 5;
return;
}
- else
+
+ core20 = (OpenGl_GlCore20* )(&(*myFuncs));
+ core20fwd = (OpenGl_GlCore20Fwd* )(&(*myFuncs));
+
+ if (!has21)
{
- core14 = myGlCore20;
+ myGlVerMajor = 2;
+ myGlVerMinor = 0;
+ return;
}
- if(!hasGlCore15)
+
+ if (!has30)
{
- myGlVerMajor = 1;
- myGlVerMinor = 4;
+ myGlVerMajor = 2;
+ myGlVerMinor = 1;
return;
}
- else
+
+ if (!has31)
{
- core15 = myGlCore20;
+ myGlVerMajor = 3;
+ myGlVerMinor = 0;
+ return;
}
- if(!hasGlCore20)
+ arbTBO = (OpenGl_ArbTBO* )(&(*myFuncs));
+ arbIns = (OpenGl_ArbIns* )(&(*myFuncs));
+
+ if (!has32)
{
- myGlVerMajor = 1;
- myGlVerMinor = 5;
+ myGlVerMajor = 3;
+ myGlVerMinor = 1;
+ return;
}
- else
+ core32 = (OpenGl_GlCore32* )(&(*myFuncs));
+ core32back = (OpenGl_GlCore32Back* )(&(*myFuncs));
+
+ if (!has33)
+ {
+ myGlVerMajor = 3;
+ myGlVerMinor = 2;
+ return;
+ }
+
+ if (!has40)
{
- core20 = myGlCore20;
+ myGlVerMajor = 3;
+ myGlVerMinor = 3;
+ return;
+ }
+
+ if (!has41)
+ {
+ myGlVerMajor = 4;
+ myGlVerMinor = 0;
+ return;
+ }
+ core41 = (OpenGl_GlCore41* )(&(*myFuncs));
+ core41back = (OpenGl_GlCore41Back* )(&(*myFuncs));
+
+ if(!has42)
+ {
+ myGlVerMajor = 4;
+ myGlVerMinor = 1;
+ return;
+ }
+ core42 = (OpenGl_GlCore42* )(&(*myFuncs));
+ core42back = (OpenGl_GlCore42Back* )(&(*myFuncs));
+
+ if(!has43)
+ {
+ myGlVerMajor = 4;
+ myGlVerMinor = 2;
+ return;
+ }
+ core43 = (OpenGl_GlCore43* )(&(*myFuncs));
+ core43back = (OpenGl_GlCore43Back* )(&(*myFuncs));
+
+ if (!has44)
+ {
+ myGlVerMajor = 4;
+ myGlVerMinor = 3;
+ return;
}
+ core44 = (OpenGl_GlCore44* )(&(*myFuncs));
+ core44back = (OpenGl_GlCore44Back* )(&(*myFuncs));
}
// =======================================================================
#include <OpenGl_GlCore11.hxx>
//! Forward declarations
-struct OpenGl_GlCore12;
-struct OpenGl_GlCore13;
-struct OpenGl_GlCore14;
-struct OpenGl_GlCore15;
-struct OpenGl_GlCore20;
-struct OpenGl_ArbVBO;
+struct OpenGl_GlFunctions;
struct OpenGl_ArbTBO;
struct OpenGl_ArbIns;
struct OpenGl_ArbDbg;
-struct OpenGl_ExtFBO;
+struct OpenGl_ArbFBO;
struct OpenGl_ExtGS;
+template<typename theBaseClass_t> struct OpenGl_TmplCore12;
+typedef OpenGl_TmplCore12<OpenGl_GlCore11> OpenGl_GlCore12;
+typedef OpenGl_TmplCore12<OpenGl_GlCore11Fwd> OpenGl_GlCore12Fwd;
+
+struct OpenGl_GlCore13;
+struct OpenGl_GlCore13Fwd;
+
+template<typename theBaseClass_t> struct OpenGl_TmplCore14;
+typedef OpenGl_TmplCore14<OpenGl_GlCore13> OpenGl_GlCore14;
+typedef OpenGl_TmplCore14<OpenGl_GlCore13Fwd> OpenGl_GlCore14Fwd;
+
+template<typename theBaseClass_t> struct OpenGl_TmplCore15;
+typedef OpenGl_TmplCore15<OpenGl_GlCore14> OpenGl_GlCore15;
+typedef OpenGl_TmplCore15<OpenGl_GlCore14Fwd> OpenGl_GlCore15Fwd;
+
+template<typename theBaseClass_t> struct OpenGl_TmplCore20;
+typedef OpenGl_TmplCore20<OpenGl_GlCore15> OpenGl_GlCore20;
+typedef OpenGl_TmplCore20<OpenGl_GlCore15Fwd> OpenGl_GlCore20Fwd;
+
+template<typename theBaseClass_t> struct OpenGl_TmplCore21;
+typedef OpenGl_TmplCore21<OpenGl_GlCore20> OpenGl_GlCore21;
+typedef OpenGl_TmplCore21<OpenGl_GlCore20Fwd> OpenGl_GlCore21Fwd;
+
+template<typename theBaseClass_t> struct OpenGl_TmplCore30;
+typedef OpenGl_TmplCore30<OpenGl_GlCore21> OpenGl_GlCore30;
+typedef OpenGl_TmplCore30<OpenGl_GlCore21Fwd> OpenGl_GlCore30Fwd;
+
+template<typename theBaseClass_t> struct OpenGl_TmplCore31;
+typedef OpenGl_TmplCore31<OpenGl_GlCore30> OpenGl_GlCore31Back;
+typedef OpenGl_TmplCore31<OpenGl_GlCore30Fwd> OpenGl_GlCore31;
+
+template<typename theBaseClass_t> struct OpenGl_TmplCore32;
+typedef OpenGl_TmplCore32<OpenGl_GlCore31Back> OpenGl_GlCore32Back;
+typedef OpenGl_TmplCore32<OpenGl_GlCore31> OpenGl_GlCore32;
+
+template<typename theBaseClass_t> struct OpenGl_TmplCore33;
+typedef OpenGl_TmplCore33<OpenGl_GlCore32Back> OpenGl_GlCore33Back;
+typedef OpenGl_TmplCore33<OpenGl_GlCore32> OpenGl_GlCore33;
+
+template<typename theBaseClass_t> struct OpenGl_TmplCore40;
+typedef OpenGl_TmplCore40<OpenGl_GlCore33Back> OpenGl_GlCore40Back;
+typedef OpenGl_TmplCore40<OpenGl_GlCore33> OpenGl_GlCore40;
+
+template<typename theBaseClass_t> struct OpenGl_TmplCore41;
+typedef OpenGl_TmplCore41<OpenGl_GlCore40Back> OpenGl_GlCore41Back;
+typedef OpenGl_TmplCore41<OpenGl_GlCore40> OpenGl_GlCore41;
+
+template<typename theBaseClass_t> struct OpenGl_TmplCore42;
+typedef OpenGl_TmplCore42<OpenGl_GlCore41Back> OpenGl_GlCore42Back;
+typedef OpenGl_TmplCore42<OpenGl_GlCore41> OpenGl_GlCore42;
+
+template<typename theBaseClass_t> struct OpenGl_TmplCore43;
+typedef OpenGl_TmplCore43<OpenGl_GlCore42Back> OpenGl_GlCore43Back;
+typedef OpenGl_TmplCore43<OpenGl_GlCore42> OpenGl_GlCore43;
+
+template<typename theBaseClass_t> struct OpenGl_TmplCore44;
+typedef OpenGl_TmplCore44<OpenGl_GlCore43Back> OpenGl_GlCore44Back;
+typedef OpenGl_TmplCore44<OpenGl_GlCore43> OpenGl_GlCore44;
+
//! This class generalize access to the GL context and available extensions.
//!
//! Functions are grouped into structures and accessed as fields.
//!
//! Current implementation provide access to OpenGL core functionality up to 2.0 version
//! (core12, core13, core14, core15, fields core20).
-//! within several extensions (arbVBO, extFBO, etc.).
+//! within several extensions (arbTBO, arbFBO, etc.).
//!
//! Simplified extensions classification:
//! - prefixed with NV, AMD, ATI are vendor-specific (however may be provided by other vendors in some cases);
//! Private initialization function that should be called only once.
Standard_EXPORT void init();
-public: // core profiles
-
- OpenGl_GlCore12* core12;
- OpenGl_GlCore13* core13;
- OpenGl_GlCore14* core14;
- OpenGl_GlCore15* core15;
- OpenGl_GlCore20* core20;
+public: //! @name core profiles
+
+ OpenGl_GlCore11* core11; //!< OpenGL 1.1 core functionality
+ OpenGl_GlCore11Fwd* core11fwd; //!< OpenGL 1.1 without deprecated entry points
+ OpenGl_GlCore15* core15; //!< OpenGL 1.5 core functionality
+ OpenGl_GlCore15Fwd* core15fwd; //!< OpenGL 1.5 without deprecated entry points
+ OpenGl_GlCore20* core20; //!< OpenGL 2.0 core functionality (includes 1.5)
+ OpenGl_GlCore20Fwd* core20fwd; //!< OpenGL 2.0 without deprecated entry points
+ OpenGl_GlCore32* core32; //!< OpenGL 3.2 core profile
+ OpenGl_GlCore32Back* core32back; //!< OpenGL 3.2 backward compatibility profile
+ OpenGl_GlCore41* core41; //!< OpenGL 4.1 core profile
+ OpenGl_GlCore41Back* core41back; //!< OpenGL 4.1 backward compatibility profile
+ OpenGl_GlCore42* core42; //!< OpenGL 4.2 core profile
+ OpenGl_GlCore42Back* core42back; //!< OpenGL 4.2 backward compatibility profile
+ OpenGl_GlCore43* core43; //!< OpenGL 4.3 core profile
+ OpenGl_GlCore43Back* core43back; //!< OpenGL 4.3 backward compatibility profile
+ OpenGl_GlCore44* core44; //!< OpenGL 4.4 core profile
+ OpenGl_GlCore44Back* core44back; //!< OpenGL 4.4 backward compatibility profile
Handle(OpenGl_Caps) caps; //!< context options
-public: // extensions
+public: //! @name extensions
Standard_Boolean arbNPTW; //!< GL_ARB_texture_non_power_of_two
- OpenGl_ArbVBO* arbVBO; //!< GL_ARB_vertex_buffer_object
+ Standard_Boolean arbTexRG;//!< GL_ARB_texture_rg
OpenGl_ArbTBO* arbTBO; //!< GL_ARB_texture_buffer_object
OpenGl_ArbIns* arbIns; //!< GL_ARB_draw_instanced
OpenGl_ArbDbg* arbDbg; //!< GL_ARB_debug_output
- OpenGl_ExtFBO* extFBO; //!< GL_EXT_framebuffer_object
+ OpenGl_ArbFBO* arbFBO; //!< GL_ARB_framebuffer_object
OpenGl_ExtGS* extGS; //!< GL_EXT_geometry_shader4
Standard_Boolean extBgra; //!< GL_EXT_bgra
Standard_Boolean extAnis; //!< GL_EXT_texture_filter_anisotropic
OpenGl_Clipping myClippingState; //!< state of clip planes
void* myGlLibHandle; //!< optional handle to GL library
- OpenGl_GlCore20* myGlCore20; //!< common structure for GL core functions upto 2.0
+ NCollection_Handle<OpenGl_GlFunctions>
+ myFuncs; //!< mega structure for all GL functions
Standard_Integer myAnisoMax; //!< maximum level of anisotropy texture filter
Standard_Integer myMaxTexDim; //!< value for GL_MAX_TEXTURE_SIZE
Standard_Integer myMaxClipPlanes; //!< value for GL_MAX_CLIP_PLANES
+++ /dev/null
-// Created on: 2012-01-26
-// Created by: Kirill GAVRILOV
-// Copyright (c) 2012-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#ifndef _OpenGl_ExtFBO_H__
-#define _OpenGl_ExtFBO_H__
-
-#include <OpenGl_GlCore12.hxx>
-
-//! FBO is available on OpenGL 2.0+ hardware
-struct OpenGl_ExtFBO
-{
-
- PFNGLGENFRAMEBUFFERSEXTPROC glGenFramebuffersEXT;
- PFNGLDELETEFRAMEBUFFERSEXTPROC glDeleteFramebuffersEXT;
- PFNGLBINDFRAMEBUFFEREXTPROC glBindFramebufferEXT;
- PFNGLFRAMEBUFFERTEXTURE2DEXTPROC glFramebufferTexture2DEXT;
- PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC glCheckFramebufferStatusEXT;
- PFNGLGENRENDERBUFFERSEXTPROC glGenRenderbuffersEXT;
- PFNGLDELETERENDERBUFFERSEXTPROC glDeleteRenderbuffersEXT;
- PFNGLBINDRENDERBUFFEREXTPROC glBindRenderbufferEXT;
- PFNGLRENDERBUFFERSTORAGEEXTPROC glRenderbufferStorageEXT;
- PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC glFramebufferRenderbufferEXT;
- PFNGLGENERATEMIPMAPEXTPROC glGenerateMipmapEXT;
-
-};
-
-#endif // _OpenGl_ExtFBO_H__
#ifndef _OpenGl_ExtGS_H__
#define _OpenGl_ExtGS_H__
-#include <OpenGl_GlCore12.hxx>
+#include <OpenGl_GlFunctions.hxx>
//! Geometry shader as extension is available on OpenGL 2.0+
-struct OpenGl_ExtGS
+struct OpenGl_ExtGS : protected OpenGl_GlFunctions
{
- PFNGLPROGRAMPARAMETERIEXTPROC glProgramParameteriEXT;
+ using OpenGl_GlFunctions::glProgramParameteriEXT;
};
#endif // _OpenGl_ExtGS_H__
// commercial license or contractual agreement.
#include <OpenGl_FrameBuffer.hxx>
+#include <OpenGl_ArbFBO.hxx>
#include <Standard_Assert.hxx>
const GLsizei theViewportSizeY,
const GLboolean toForcePowerOfTwo)
{
- if (theGlContext->extFBO == NULL)
+ if (theGlContext->arbFBO == NULL)
{
return Standard_False;
}
if (!theGlContext->extPDS)
{
// Create RenderBuffer to be used as depth buffer
- theGlContext->extFBO->glGenRenderbuffersEXT (1, &myGlDepthRBId);
- theGlContext->extFBO->glBindRenderbufferEXT (GL_RENDERBUFFER_EXT, myGlDepthRBId);
- theGlContext->extFBO->glRenderbufferStorageEXT (GL_RENDERBUFFER_EXT, GL_DEPTH_COMPONENT, mySizeX, mySizeY);
+ theGlContext->arbFBO->glGenRenderbuffers (1, &myGlDepthRBId);
+ theGlContext->arbFBO->glBindRenderbuffer (GL_RENDERBUFFER, myGlDepthRBId);
+ theGlContext->arbFBO->glRenderbufferStorage (GL_RENDERBUFFER, GL_DEPTH_COMPONENT, mySizeX, mySizeY);
// Create RenderBuffer to be used as stencil buffer
- theGlContext->extFBO->glGenRenderbuffersEXT (1, &myGlStencilRBId);
- theGlContext->extFBO->glBindRenderbufferEXT (GL_RENDERBUFFER_EXT, myGlStencilRBId);
- theGlContext->extFBO->glRenderbufferStorageEXT (GL_RENDERBUFFER_EXT, GL_STENCIL_INDEX, mySizeX, mySizeY);
+ theGlContext->arbFBO->glGenRenderbuffers (1, &myGlStencilRBId);
+ theGlContext->arbFBO->glBindRenderbuffer (GL_RENDERBUFFER, myGlStencilRBId);
+ theGlContext->arbFBO->glRenderbufferStorage (GL_RENDERBUFFER, GL_STENCIL_INDEX, mySizeX, mySizeY);
}
else
{
// Create combined depth stencil buffer
- theGlContext->extFBO->glGenRenderbuffersEXT (1, &myGlDepthRBId);
- theGlContext->extFBO->glBindRenderbufferEXT (GL_RENDERBUFFER_EXT, myGlDepthRBId);
- theGlContext->extFBO->glRenderbufferStorageEXT (GL_RENDERBUFFER_EXT, GL_DEPTH24_STENCIL8_EXT, mySizeX, mySizeY);
+ theGlContext->arbFBO->glGenRenderbuffers (1, &myGlDepthRBId);
+ theGlContext->arbFBO->glBindRenderbuffer (GL_RENDERBUFFER, myGlDepthRBId);
+ theGlContext->arbFBO->glRenderbufferStorage (GL_RENDERBUFFER, GL_DEPTH24_STENCIL8, mySizeX, mySizeY);
myGlStencilRBId = myGlDepthRBId;
}
// Build FBO and setup it as texture
- theGlContext->extFBO->glGenFramebuffersEXT (1, &myGlFBufferId);
- theGlContext->extFBO->glBindFramebufferEXT (GL_FRAMEBUFFER_EXT, myGlFBufferId);
+ theGlContext->arbFBO->glGenFramebuffers (1, &myGlFBufferId);
+ theGlContext->arbFBO->glBindFramebuffer (GL_FRAMEBUFFER, myGlFBufferId);
glEnable (GL_TEXTURE_2D);
glBindTexture (GL_TEXTURE_2D, myGlTextureId);
- theGlContext->extFBO->glFramebufferTexture2DEXT (GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, myGlTextureId, 0);
- theGlContext->extFBO->glFramebufferRenderbufferEXT (GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_RENDERBUFFER_EXT, myGlDepthRBId);
- theGlContext->extFBO->glFramebufferRenderbufferEXT (GL_FRAMEBUFFER_EXT, GL_STENCIL_ATTACHMENT_EXT, GL_RENDERBUFFER_EXT, myGlStencilRBId);
- if (theGlContext->extFBO->glCheckFramebufferStatusEXT (GL_FRAMEBUFFER_EXT) != GL_FRAMEBUFFER_COMPLETE_EXT)
+ theGlContext->arbFBO->glFramebufferTexture2D (GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, myGlTextureId, 0);
+ theGlContext->arbFBO->glFramebufferRenderbuffer (GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, myGlDepthRBId);
+ theGlContext->arbFBO->glFramebufferRenderbuffer (GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_RENDERBUFFER, myGlStencilRBId);
+ if (theGlContext->arbFBO->glCheckFramebufferStatus (GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE)
{
if (!isPowerOfTwo (mySizeX) || !isPowerOfTwo (mySizeY))
{
UnbindBuffer (theGlContext);
UnbindTexture (theGlContext);
- theGlContext->extFBO->glBindRenderbufferEXT (GL_RENDERBUFFER_EXT, NO_RENDERBUFFER);
+ theGlContext->arbFBO->glBindRenderbuffer (GL_RENDERBUFFER, NO_RENDERBUFFER);
return Standard_True;
}
if (theGlCtx->IsValid()
&& myGlStencilRBId != myGlDepthRBId)
{
- theGlCtx->extFBO->glDeleteRenderbuffersEXT (1, &myGlStencilRBId);
+ theGlCtx->arbFBO->glDeleteRenderbuffers (1, &myGlStencilRBId);
}
myGlStencilRBId = NO_RENDERBUFFER;
}
{
if (theGlCtx->IsValid())
{
- theGlCtx->extFBO->glDeleteRenderbuffersEXT (1, &myGlDepthRBId);
+ theGlCtx->arbFBO->glDeleteRenderbuffers (1, &myGlDepthRBId);
}
myGlDepthRBId = NO_RENDERBUFFER;
}
{
if (theGlCtx->IsValid())
{
- theGlCtx->extFBO->glDeleteFramebuffersEXT (1, &myGlFBufferId);
+ theGlCtx->arbFBO->glDeleteFramebuffers (1, &myGlFBufferId);
}
myGlFBufferId = NO_FRAMEBUFFER;
}
// =======================================================================
void OpenGl_FrameBuffer::BindBuffer (const Handle(OpenGl_Context)& theGlCtx)
{
- theGlCtx->extFBO->glBindFramebufferEXT (GL_FRAMEBUFFER_EXT, myGlFBufferId);
+ theGlCtx->arbFBO->glBindFramebuffer (GL_FRAMEBUFFER, myGlFBufferId);
}
// =======================================================================
// =======================================================================
void OpenGl_FrameBuffer::UnbindBuffer (const Handle(OpenGl_Context)& theGlCtx)
{
- theGlCtx->extFBO->glBindFramebufferEXT (GL_FRAMEBUFFER_EXT, NO_FRAMEBUFFER);
+ theGlCtx->arbFBO->glBindFramebuffer (GL_FRAMEBUFFER, NO_FRAMEBUFFER);
}
// =======================================================================
#define OPENGL_FRAME_BUFFER_H
#include <OpenGl_Context.hxx>
-#include <OpenGl_ExtFBO.hxx>
#include <OpenGl_Resource.hxx>
#include <Standard_Boolean.hxx>
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#ifndef _OpenGl_GlCore11_H__
-#define _OpenGl_GlCore11_H__
-
-// required for correct APIENTRY definition
-#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#endif
-
-#ifndef APIENTRY
- #define APIENTRY
-#endif
-#ifndef APIENTRYP
- #define APIENTRYP APIENTRY *
-#endif
-#ifndef GLAPI
- #define GLAPI extern
-#endif
-
-// exclude modern definitions and system-provided glext.h, should be defined before gl.h inclusion
-#define GL_GLEXT_LEGACY
-
-// include main OpenGL header provided with system
-#if defined(__APPLE__)
- #include <OpenGL/gl.h>
- #include <OpenGL/glu.h>
- #define __X_GL_H // prevent chaotic gl.h inclusions to avoid compile errors
-#else
- #include <GL/gl.h>
- #include <GL/glu.h>
-#endif
-
-#include <InterfaceGraphic.hxx>
-#include <InterfaceGraphic_tgl_all.hxx>
-#include <InterfaceGraphic_telem.hxx>
-
-#endif // _OpenGl_GlCore11_H__
+#ifndef _OpenGl_GlCore11_Header
+#define _OpenGl_GlCore11_Header
+
+#include <OpenGl_GlCore11Fwd.hxx>
+
+//! OpenGL 1.1 core.
+//! Notice that all functions within this structure are actually exported by system GL library.
+//! The main purpose for these hint - to control visibility of functions per GL version
+//! (global functions should not be used directly to achieve this effect!).
+struct OpenGl_GlCore11 : protected OpenGl_GlFunctions
+{
+
+public: //! @name Begin/End primitive specification (removed since 3.1)
+
+ inline void glBegin (GLenum theMode)
+ {
+ ::glBegin (theMode);
+ }
+
+ inline void glEnd()
+ {
+ ::glEnd();
+ }
+
+ inline void glVertex2d (GLdouble theX, GLdouble theY)
+ {
+ ::glVertex2d (theX, theY);
+ }
+
+ inline void glVertex2f (GLfloat theX, GLfloat theY)
+ {
+ ::glVertex2f (theX, theY);
+ }
+
+ inline void glVertex2i (GLint theX, GLint theY)
+ {
+ ::glVertex2i (theX, theY);
+ }
+
+ inline void glVertex2s (GLshort theX, GLshort theY)
+ {
+ ::glVertex2s (theX, theY);
+ }
+
+ inline void glVertex3d (GLdouble theX, GLdouble theY, GLdouble theZ)
+ {
+ ::glVertex3d (theX, theY, theZ);
+ }
+
+ inline void glVertex3f (GLfloat theX, GLfloat theY, GLfloat theZ)
+ {
+ ::glVertex3f (theX, theY, theZ);
+ }
+
+ inline void glVertex3i (GLint theX, GLint theY, GLint theZ)
+ {
+ ::glVertex3i (theX, theY, theZ);
+ }
+
+ inline void glVertex3s (GLshort theX, GLshort theY, GLshort theZ)
+ {
+ ::glVertex3s (theX, theY, theZ);
+ }
+
+ inline void glVertex4d (GLdouble theX, GLdouble theY, GLdouble theZ, GLdouble theW)
+ {
+ ::glVertex4d (theX, theY, theZ, theW);
+ }
+
+ inline void glVertex4f (GLfloat theX, GLfloat theY, GLfloat theZ, GLfloat theW)
+ {
+ ::glVertex4f (theX, theY, theZ, theW);
+ }
+
+ inline void glVertex4i (GLint theX, GLint theY, GLint theZ, GLint theW)
+ {
+ ::glVertex4i (theX, theY, theZ, theW);
+ }
+
+ inline void glVertex4s (GLshort theX, GLshort theY, GLshort theZ, GLshort theW)
+ {
+ ::glVertex4s (theX, theY, theZ, theW);
+ }
+
+ inline void glVertex2dv (const GLdouble* theVec2)
+ {
+ ::glVertex2dv (theVec2);
+ }
+
+ inline void glVertex2fv (const GLfloat* theVec2)
+ {
+ ::glVertex2fv (theVec2);
+ }
+
+ inline void glVertex2iv (const GLint* theVec2)
+ {
+ ::glVertex2iv (theVec2);
+ }
+
+ inline void glVertex2sv (const GLshort* theVec2)
+ {
+ ::glVertex2sv (theVec2);
+ }
+
+ inline void glVertex3dv (const GLdouble* theVec3)
+ {
+ ::glVertex3dv (theVec3);
+ }
+
+ inline void glVertex3fv (const GLfloat* theVec3)
+ {
+ ::glVertex3fv (theVec3);
+ }
+
+ inline void glVertex3iv (const GLint* theVec3)
+ {
+ ::glVertex3iv (theVec3);
+ }
+
+ inline void glVertex3sv (const GLshort* theVec3)
+ {
+ ::glVertex3sv (theVec3);
+ }
+
+ inline void glVertex4dv (const GLdouble* theVec4)
+ {
+ ::glVertex4dv (theVec4);
+ }
+
+ inline void glVertex4fv (const GLfloat* theVec4)
+ {
+ ::glVertex4fv (theVec4);
+ }
+
+ inline void glVertex4iv (const GLint* theVec4)
+ {
+ ::glVertex4iv (theVec4);
+ }
+
+ inline void glVertex4sv (const GLshort* theVec4)
+ {
+ ::glVertex4sv (theVec4);
+ }
+
+ inline void glNormal3b (GLbyte nx, GLbyte ny, GLbyte nz)
+ {
+ ::glNormal3b(nx, ny, nz);
+ }
+
+ inline void glNormal3d (GLdouble nx, GLdouble ny, GLdouble nz)
+ {
+ ::glNormal3d(nx, ny, nz);
+ }
+
+ inline void glNormal3f (GLfloat nx, GLfloat ny, GLfloat nz)
+ {
+ ::glNormal3f(nx, ny, nz);
+ }
+
+ inline void glNormal3i (GLint nx, GLint ny, GLint nz)
+ {
+ ::glNormal3i(nx, ny, nz);
+ }
+
+ inline void glNormal3s (GLshort nx, GLshort ny, GLshort nz)
+ {
+ ::glNormal3s(nx, ny, nz);
+ }
+
+ inline void glNormal3bv (const GLbyte* theVec)
+ {
+ ::glNormal3bv (theVec);
+ }
+
+ inline void glNormal3dv (const GLdouble* theVec)
+ {
+ ::glNormal3dv (theVec);
+ }
+
+ inline void glNormal3fv (const GLfloat* theVec)
+ {
+ ::glNormal3fv (theVec);
+ }
+
+ inline void glNormal3iv (const GLint* theVec)
+ {
+ ::glNormal3iv (theVec);
+ }
+
+ inline void glNormal3sv (const GLshort* theVec)
+ {
+ ::glNormal3sv (theVec);
+ }
+
+ inline void glIndexd (GLdouble c)
+ {
+ ::glIndexd(c);
+ }
+
+ inline void glIndexf (GLfloat c)
+ {
+ ::glIndexf(c);
+ }
+
+ inline void glIndexi (GLint c)
+ {
+ ::glIndexi(c);
+ }
+
+ inline void glIndexs (GLshort c)
+ {
+ ::glIndexs(c);
+ }
+
+ inline void glIndexub (GLubyte c)
+ {
+ ::glIndexub(c);
+ }
+
+ inline void glIndexdv (const GLdouble* c)
+ {
+ ::glIndexdv(c);
+ }
+
+ inline void glIndexfv (const GLfloat* c)
+ {
+ ::glIndexfv(c);
+ }
+
+ inline void glIndexiv (const GLint* c)
+ {
+ ::glIndexiv(c);
+ }
+
+ inline void glIndexsv (const GLshort* c)
+ {
+ ::glIndexsv(c);
+ }
+
+ inline void glIndexubv (const GLubyte* c)
+ {
+ ::glIndexubv(c);
+ }
+
+ inline void glColor3b (GLbyte theRed, GLbyte theGreen, GLbyte theBlue)
+ {
+ ::glColor3b (theRed, theGreen, theBlue);
+ }
+
+ inline void glColor3d (GLdouble theRed, GLdouble theGreen, GLdouble theBlue)
+ {
+ ::glColor3d (theRed, theGreen, theBlue);
+ }
+
+ inline void glColor3f (GLfloat theRed, GLfloat theGreen, GLfloat theBlue)
+ {
+ ::glColor3f (theRed, theGreen, theBlue);
+ }
+
+ inline void glColor3i (GLint theRed, GLint theGreen, GLint theBlue)
+ {
+ ::glColor3i (theRed, theGreen, theBlue);
+ }
+
+ inline void glColor3s (GLshort theRed, GLshort theGreen, GLshort theBlue)
+ {
+ ::glColor3s (theRed, theGreen, theBlue);
+ }
+
+ inline void glColor3ub (GLubyte theRed, GLubyte theGreen, GLubyte theBlue)
+ {
+ ::glColor3ub (theRed, theGreen, theBlue);
+ }
+
+ inline void glColor3ui (GLuint theRed, GLuint theGreen, GLuint theBlue)
+ {
+ ::glColor3ui (theRed, theGreen, theBlue);
+ }
+
+ inline void glColor3us (GLushort theRed, GLushort theGreen, GLushort theBlue)
+ {
+ ::glColor3us (theRed, theGreen, theBlue);
+ }
+
+ inline void glColor4b (GLbyte theRed, GLbyte theGreen, GLbyte theBlue, GLbyte theAlpha)
+ {
+ ::glColor4b (theRed, theGreen, theBlue, theAlpha);
+ }
+
+ inline void glColor4d (GLdouble theRed, GLdouble theGreen, GLdouble theBlue, GLdouble theAlpha)
+ {
+ ::glColor4d (theRed, theGreen, theBlue, theAlpha);
+ }
+
+ inline void glColor4f (GLfloat theRed, GLfloat theGreen, GLfloat theBlue, GLfloat theAlpha)
+ {
+ ::glColor4f (theRed, theGreen, theBlue, theAlpha);
+ }
+
+ inline void glColor4i (GLint theRed, GLint theGreen, GLint theBlue, GLint theAlpha)
+ {
+ ::glColor4i (theRed, theGreen, theBlue, theAlpha);
+ }
+
+ inline void glColor4s (GLshort theRed, GLshort theGreen, GLshort theBlue, GLshort theAlpha)
+ {
+ ::glColor4s (theRed, theGreen, theBlue, theAlpha);
+ }
+
+ inline void glColor4ub (GLubyte theRed, GLubyte theGreen, GLubyte theBlue, GLubyte theAlpha)
+ {
+ ::glColor4ub (theRed, theGreen, theBlue, theAlpha);
+ }
+
+ inline void glColor4ui (GLuint theRed, GLuint theGreen, GLuint theBlue, GLuint theAlpha)
+ {
+ ::glColor4ui (theRed, theGreen, theBlue, theAlpha);
+ }
+
+ inline void glColor4us (GLushort theRed, GLushort theGreen, GLushort theBlue, GLushort theAlpha)
+ {
+ ::glColor4us (theRed, theGreen, theBlue, theAlpha);
+ }
+
+ inline void glColor3bv (const GLbyte* theVec)
+ {
+ ::glColor3bv (theVec);
+ }
+
+ inline void glColor3dv (const GLdouble* theVec)
+ {
+ ::glColor3dv (theVec);
+ }
+
+ inline void glColor3fv (const GLfloat* theVec)
+ {
+ ::glColor3fv (theVec);
+ }
+
+ inline void glColor3iv (const GLint* theVec)
+ {
+ ::glColor3iv (theVec);
+ }
+
+ inline void glColor3sv (const GLshort* theVec)
+ {
+ ::glColor3sv (theVec);
+ }
+
+ inline void glColor3ubv (const GLubyte* theVec)
+ {
+ ::glColor3ubv (theVec);
+ }
+
+ inline void glColor3uiv (const GLuint* theVec)
+ {
+ ::glColor3uiv (theVec);
+ }
+
+ inline void glColor3usv (const GLushort* theVec)
+ {
+ ::glColor3usv (theVec);
+ }
+
+ inline void glColor4bv (const GLbyte* theVec)
+ {
+ ::glColor4bv (theVec);
+ }
+
+ inline void glColor4dv (const GLdouble* theVec)
+ {
+ ::glColor4dv (theVec);
+ }
+
+ inline void glColor4fv (const GLfloat* theVec)
+ {
+ ::glColor4fv (theVec);
+ }
+
+ inline void glColor4iv (const GLint* theVec)
+ {
+ ::glColor4iv (theVec);
+ }
+
+ inline void glColor4sv (const GLshort* theVec)
+ {
+ ::glColor4sv (theVec);
+ }
+
+ inline void glColor4ubv (const GLubyte* theVec)
+ {
+ ::glColor4ubv (theVec);
+ }
+
+ inline void glColor4uiv (const GLuint* theVec)
+ {
+ ::glColor4uiv (theVec);
+ }
+
+ inline void glColor4usv (const GLushort* theVec)
+ {
+ ::glColor4usv (theVec);
+ }
+
+ inline void glTexCoord1d (GLdouble s)
+ {
+ ::glTexCoord1d(s);
+ }
+
+ inline void glTexCoord1f (GLfloat s)
+ {
+ ::glTexCoord1f(s);
+ }
+
+ inline void glTexCoord1i (GLint s)
+ {
+ ::glTexCoord1i(s);
+ }
+
+ inline void glTexCoord1s (GLshort s)
+ {
+ ::glTexCoord1s(s);
+ }
+
+ inline void glTexCoord2d (GLdouble s, GLdouble t)
+ {
+ ::glTexCoord2d(s, t);
+ }
+
+ inline void glTexCoord2f (GLfloat s, GLfloat t)
+ {
+ ::glTexCoord2f(s, t);
+ }
+
+ inline void glTexCoord2i (GLint s, GLint t)
+ {
+ ::glTexCoord2i(s, t);
+ }
+
+ inline void glTexCoord2s (GLshort s, GLshort t)
+ {
+ ::glTexCoord2s(s, t);
+ }
+
+ inline void glTexCoord3d (GLdouble s, GLdouble t, GLdouble r)
+ {
+ ::glTexCoord3d(s, t, r);
+ }
+
+ inline void glTexCoord3f (GLfloat s, GLfloat t, GLfloat r)
+ {
+ ::glTexCoord3f(s, t, r);
+ }
+
+ inline void glTexCoord3i (GLint s, GLint t, GLint r)
+ {
+ ::glTexCoord3i(s, t, r);
+ }
+
+ inline void glTexCoord3s (GLshort s, GLshort t, GLshort r)
+ {
+ ::glTexCoord3s(s, t, r);
+ }
+
+ inline void glTexCoord4d (GLdouble s, GLdouble t, GLdouble r, GLdouble q)
+ {
+ ::glTexCoord4d(s, t, r, q);
+ }
+
+ inline void glTexCoord4f (GLfloat s, GLfloat t, GLfloat r, GLfloat q)
+ {
+ ::glTexCoord4f(s, t, r, q);
+ }
+
+ inline void glTexCoord4i (GLint s, GLint t, GLint r, GLint q)
+ {
+ ::glTexCoord4i(s, t, r, q);
+ }
+
+ inline void glTexCoord4s (GLshort s, GLshort t, GLshort r, GLshort q)
+ {
+ ::glTexCoord4s(s, t, r, q);
+ }
+
+ inline void glTexCoord1dv (const GLdouble* theVec1)
+ {
+ ::glTexCoord1dv (theVec1);
+ }
+
+ inline void glTexCoord1fv (const GLfloat* theVec1)
+ {
+ ::glTexCoord1fv (theVec1);
+ }
+
+ inline void glTexCoord1iv (const GLint* theVec1)
+ {
+ ::glTexCoord1iv (theVec1);
+ }
+
+ inline void glTexCoord1sv (const GLshort* theVec1)
+ {
+ ::glTexCoord1sv (theVec1);
+ }
+
+ inline void glTexCoord2dv (const GLdouble* theVec2)
+ {
+ ::glTexCoord2dv (theVec2);
+ }
+
+ inline void glTexCoord2fv (const GLfloat* theVec2)
+ {
+ ::glTexCoord2fv (theVec2);
+ }
+
+ inline void glTexCoord2iv (const GLint* theVec2)
+ {
+ ::glTexCoord2iv (theVec2);
+ }
+
+ inline void glTexCoord2sv (const GLshort* theVec)
+ {
+ ::glTexCoord2sv (theVec);
+ }
+
+ inline void glTexCoord3dv (const GLdouble* theVec3)
+ {
+ ::glTexCoord3dv (theVec3);
+ }
+
+ inline void glTexCoord3fv (const GLfloat* theVec3)
+ {
+ ::glTexCoord3fv (theVec3);
+ }
+
+ inline void glTexCoord3iv (const GLint* theVec3)
+ {
+ ::glTexCoord3iv (theVec3);
+ }
+
+ inline void glTexCoord3sv (const GLshort* theVec3)
+ {
+ ::glTexCoord3sv (theVec3);
+ }
+
+ inline void glTexCoord4dv (const GLdouble* theVec4)
+ {
+ ::glTexCoord4dv (theVec4);
+ }
+
+ inline void glTexCoord4fv (const GLfloat* theVec4)
+ {
+ ::glTexCoord4fv (theVec4);
+ }
+
+ inline void glTexCoord4iv (const GLint* theVec4)
+ {
+ ::glTexCoord4iv (theVec4);
+ }
+
+ inline void glTexCoord4sv (const GLshort* theVec4)
+ {
+ ::glTexCoord4sv (theVec4);
+ }
+
+public: //! @name Matrix operations (removed since 3.1)
+
+ inline void glMatrixMode (GLenum theMode)
+ {
+ ::glMatrixMode (theMode);
+ }
+
+ inline void glOrtho (GLdouble theLeft, GLdouble theRight,
+ GLdouble theBottom, GLdouble theTop,
+ GLdouble theNearVal, GLdouble theFarVal)
+ {
+ ::glOrtho (theLeft, theRight, theBottom, theTop, theNearVal, theFarVal);
+ }
+
+ inline void glFrustum (GLdouble theLeft, GLdouble theRight,
+ GLdouble theBottom, GLdouble theTop,
+ GLdouble theNearVal, GLdouble theFarVal)
+ {
+ ::glFrustum (theLeft, theRight, theBottom, theTop, theNearVal, theFarVal);
+ }
+
+ inline void glPushMatrix()
+ {
+ ::glPushMatrix();
+ }
+
+ inline void glPopMatrix()
+ {
+ ::glPopMatrix();
+ }
+
+ inline void glLoadIdentity()
+ {
+ ::glLoadIdentity();
+ }
+
+ inline void glLoadMatrixd (const GLdouble* theMatrix)
+ {
+ ::glLoadMatrixd (theMatrix);
+ }
+
+ inline void glLoadMatrixf (const GLfloat* theMatrix)
+ {
+ ::glLoadMatrixf (theMatrix);
+ }
+
+ inline void glMultMatrixd (const GLdouble* theMatrix)
+ {
+ ::glMultMatrixd (theMatrix);
+ }
+
+ inline void glMultMatrixf (const GLfloat* theMatrix)
+ {
+ ::glMultMatrixf (theMatrix);
+ }
+
+ inline void glRotated (GLdouble theAngleDegrees,
+ GLdouble theX, GLdouble theY, GLdouble theZ)
+ {
+ ::glRotated (theAngleDegrees, theX, theY, theZ);
+ }
+
+ inline void glRotatef (GLfloat theAngleDegrees,
+ GLfloat theX, GLfloat theY, GLfloat theZ)
+ {
+ ::glRotatef (theAngleDegrees, theX, theY, theZ);
+ }
+
+ inline void glScaled (GLdouble theX, GLdouble theY, GLdouble theZ)
+ {
+ ::glScaled (theX, theY, theZ);
+ }
+
+ inline void glScalef (GLfloat theX, GLfloat theY, GLfloat theZ)
+ {
+ ::glScalef (theX, theY, theZ);
+ }
+
+ inline void glTranslated (GLdouble theX, GLdouble theY, GLdouble theZ)
+ {
+ ::glTranslated (theX, theY, theZ);
+ }
+
+ inline void glTranslatef (GLfloat theX, GLfloat theY, GLfloat theZ)
+ {
+ ::glTranslatef (theX, theY, theZ);
+ }
+
+public: //! @name Line and Polygon stripple (removed since 3.1)
+
+ //void glLineWidth (GLfloat theWidth) { ::glLineWidth (theWidth); }
+
+ inline void glLineStipple (GLint theFactor, GLushort thePattern)
+ {
+ ::glLineStipple (theFactor, thePattern);
+ }
+
+ inline void glPolygonStipple (const GLubyte* theMask)
+ {
+ ::glPolygonStipple (theMask);
+ }
+
+ inline void glGetPolygonStipple (GLubyte* theMask)
+ {
+ ::glGetPolygonStipple (theMask);
+ }
+
+public: //! @name Attribute stacks (removed since 3.1)
+
+ inline void glPushAttrib (GLbitfield theMask)
+ {
+ ::glPushAttrib (theMask);
+ }
+
+ inline void glPopAttrib()
+ {
+ ::glPopAttrib();
+ }
+
+ inline void glPushClientAttrib (GLbitfield theMask)
+ {
+ ::glPushClientAttrib (theMask);
+ }
+
+ inline void glPopClientAttrib()
+ {
+ ::glPopClientAttrib();
+ }
+
+public: //! @name Fixed pipeline lighting (removed since 3.1)
+
+ inline void glShadeModel (GLenum theMode)
+ {
+ ::glShadeModel (theMode);
+ }
+
+ inline void glLightf (GLenum theLight, GLenum pname, GLfloat param)
+ {
+ ::glLightf (theLight, pname, param);
+ }
+
+ inline void glLighti (GLenum theLight, GLenum pname, GLint param)
+ {
+ ::glLighti (theLight, pname, param);
+ }
+
+ inline void glLightfv (GLenum theLight, GLenum pname, const GLfloat* params)
+ {
+ ::glLightfv (theLight, pname, params);
+ }
+
+ inline void glLightiv (GLenum theLight, GLenum pname, const GLint* params)
+ {
+ ::glLightiv (theLight, pname, params);
+ }
+
+ inline void glGetLightfv (GLenum theLight, GLenum pname, GLfloat *params)
+ {
+ ::glGetLightfv (theLight, pname, params);
+ }
+
+ inline void glGetLightiv (GLenum theLight, GLenum pname, GLint *params)
+ {
+ ::glGetLightiv (theLight, pname, params);
+ }
+
+ inline void glLightModelf (GLenum pname, GLfloat param)
+ {
+ ::glLightModelf(pname, param);
+ }
+
+ inline void glLightModeli (GLenum pname, GLint param)
+ {
+ ::glLightModeli(pname, param);
+ }
+
+ inline void glLightModelfv (GLenum pname, const GLfloat* params)
+ {
+ ::glLightModelfv(pname, params);
+ }
+
+ inline void glLightModeliv (GLenum pname, const GLint* params)
+ {
+ ::glLightModeliv(pname, params);
+ }
+
+ inline void glMaterialf (GLenum face, GLenum pname, GLfloat param)
+ {
+ ::glMaterialf(face, pname, param);
+ }
+
+ inline void glMateriali (GLenum face, GLenum pname, GLint param)
+ {
+ ::glMateriali(face, pname, param);
+ }
+
+ inline void glMaterialfv (GLenum face, GLenum pname, const GLfloat* params)
+ {
+ ::glMaterialfv(face, pname, params);
+ }
+
+ inline void glMaterialiv (GLenum face, GLenum pname, const GLint* params)
+ {
+ ::glMaterialiv(face, pname, params);
+ }
+
+ inline void glGetMaterialfv (GLenum face, GLenum pname, GLfloat* params)
+ {
+ ::glGetMaterialfv(face, pname, params);
+ }
+
+ inline void glGetMaterialiv (GLenum face, GLenum pname, GLint* params)
+ {
+ ::glGetMaterialiv(face, pname, params);
+ }
+
+ inline void glColorMaterial (GLenum face, GLenum mode)
+ {
+ ::glColorMaterial(face, mode);
+ }
+
+public: //! @name clipping plane (removed since 3.1)
+
+ inline void glClipPlane (GLenum thePlane, const GLdouble* theEquation)
+ {
+ ::glClipPlane (thePlane, theEquation);
+ }
+
+ inline void glGetClipPlane (GLenum thePlane, GLdouble* theEquation)
+ {
+ ::glGetClipPlane (thePlane, theEquation);
+ }
+
+public: //! @name Display lists (removed since 3.1)
+
+ inline GLboolean glIsList (GLuint theList) {
+ return ::glIsList (theList);
+ }
+
+ inline void glDeleteLists (GLuint theList, GLsizei theRange)
+ {
+ ::glDeleteLists (theList, theRange);
+ }
+
+ inline GLuint glGenLists (GLsizei theRange)
+ {
+ return ::glGenLists (theRange);
+ }
+
+ inline void glNewList (GLuint theList, GLenum theMode)
+ {
+ ::glNewList (theList, theMode);
+ }
+
+ inline void glEndList()
+ {
+ ::glEndList();
+ }
+
+ inline void glCallList (GLuint theList)
+ {
+ ::glCallList (theList);
+ }
+
+ inline void glCallLists (GLsizei theNb, GLenum theType, const GLvoid* theLists)
+ {
+ ::glCallLists (theNb, theType, theLists);
+ }
+
+ inline void glListBase (GLuint theBase)
+ {
+ ::glListBase (theBase);
+ }
+
+public: //! @name Current raster position and Rectangles (removed since 3.1)
+
+ inline void glRasterPos2d (GLdouble x, GLdouble y)
+ {
+ ::glRasterPos2d (x, y);
+ }
+
+ inline void glRasterPos2f (GLfloat x, GLfloat y)
+ {
+ ::glRasterPos2f (x, y);
+ }
+
+ inline void glRasterPos2i (GLint x, GLint y)
+ {
+ ::glRasterPos2i (x, y);
+ }
+
+ inline void glRasterPos2s (GLshort x, GLshort y)
+ {
+ ::glRasterPos2s (x, y);
+ }
+
+ inline void glRasterPos3d (GLdouble x, GLdouble y, GLdouble z)
+ {
+ ::glRasterPos3d (x, y, z);
+ }
+
+ inline void glRasterPos3f (GLfloat x, GLfloat y, GLfloat z)
+ {
+ ::glRasterPos3f (x, y, z);
+ }
+
+ inline void glRasterPos3i (GLint x, GLint y, GLint z)
+ {
+ ::glRasterPos3i (x, y, z);
+ }
+
+ inline void glRasterPos3s (GLshort x, GLshort y, GLshort z)
+ {
+ ::glRasterPos3s (x, y, z);
+ }
+
+ inline void glRasterPos4d (GLdouble x, GLdouble y, GLdouble z, GLdouble w)
+ {
+ ::glRasterPos4d (x, y, z, w);
+ }
+
+ inline void glRasterPos4f (GLfloat x, GLfloat y, GLfloat z, GLfloat w)
+ {
+ ::glRasterPos4f (x, y, z, w);
+ }
+
+ inline void glRasterPos4i (GLint x, GLint y, GLint z, GLint w)
+ {
+ ::glRasterPos4i (x, y, z, w);
+ }
+
+ inline void glRasterPos4s (GLshort x, GLshort y, GLshort z, GLshort w)
+ {
+ ::glRasterPos4s (x, y, z, w);
+ }
+
+ inline void glRasterPos2dv (const GLdouble* theVec)
+ {
+ ::glRasterPos2dv (theVec);
+ }
+
+ inline void glRasterPos2fv (const GLfloat* theVec)
+ {
+ ::glRasterPos2fv (theVec);
+ }
+
+ inline void glRasterPos2iv (const GLint* theVec)
+ {
+ ::glRasterPos2iv (theVec);
+ }
+
+ inline void glRasterPos2sv (const GLshort* theVec)
+ {
+ ::glRasterPos2sv (theVec);
+ }
+
+ inline void glRasterPos3dv (const GLdouble* theVec)
+ {
+ ::glRasterPos3dv (theVec);
+ }
+
+ inline void glRasterPos3fv (const GLfloat* theVec)
+ {
+ ::glRasterPos3fv (theVec);
+ }
+
+ inline void glRasterPos3iv (const GLint* theVec)
+ {
+ ::glRasterPos3iv (theVec);
+ }
+
+ inline void glRasterPos3sv (const GLshort* theVec)
+ {
+ ::glRasterPos3sv (theVec);
+ }
+
+ inline void glRasterPos4dv (const GLdouble* theVec)
+ {
+ ::glRasterPos4dv (theVec);
+ }
+
+ inline void glRasterPos4fv (const GLfloat* theVec)
+ {
+ ::glRasterPos4fv (theVec);
+ }
+
+ inline void glRasterPos4iv (const GLint* theVec)
+ {
+ ::glRasterPos4iv (theVec);
+ }
+
+ inline void glRasterPos4sv (const GLshort* theVec)
+ {
+ ::glRasterPos4sv (theVec);
+ }
+
+ inline void glRectd (GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2)
+ {
+ ::glRectd (x1, y1, x2, y2);
+ }
+
+ inline void glRectf (GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2)
+ {
+ ::glRectf (x1, y1, x2, y2);
+ }
+
+ inline void glRecti (GLint x1, GLint y1, GLint x2, GLint y2)
+ {
+ ::glRecti (x1, y1, x2, y2);
+ }
+
+ inline void glRects (GLshort x1, GLshort y1, GLshort x2, GLshort y2)
+ {
+ ::glRects (x1, y1, x2, y2);
+ }
+
+ inline void glRectdv (const GLdouble* v1, const GLdouble* v2)
+ {
+ ::glRectdv (v1, v2);
+ }
+
+ inline void glRectfv (const GLfloat* v1, const GLfloat* v2)
+ {
+ ::glRectfv (v1, v2);
+ }
+
+ inline void glRectiv (const GLint* v1, const GLint* v2)
+ {
+ ::glRectiv (v1, v2);
+ }
+
+ inline void glRectsv (const GLshort* v1, const GLshort* v2)
+ {
+ ::glRectsv (v1, v2);
+ }
+
+public: //! @name Texture mapping (removed since 3.1)
+
+ inline void glTexGend (GLenum coord, GLenum pname, GLdouble param)
+ {
+ ::glTexGend (coord, pname, param);
+ }
+
+ inline void glTexGenf (GLenum coord, GLenum pname, GLfloat param)
+ {
+ ::glTexGenf (coord, pname, param);
+ }
+
+ inline void glTexGeni (GLenum coord, GLenum pname, GLint param)
+ {
+ ::glTexGeni (coord, pname, param);
+ }
+
+ inline void glTexGendv (GLenum coord, GLenum pname, const GLdouble* params)
+ {
+ ::glTexGendv (coord, pname, params);
+ }
+
+ inline void glTexGenfv (GLenum coord, GLenum pname, const GLfloat* params)
+ {
+ ::glTexGenfv (coord, pname, params);
+ }
+
+ inline void glTexGeniv (GLenum coord, GLenum pname, const GLint* params)
+ {
+ ::glTexGeniv (coord, pname, params);
+ }
+
+ inline void glGetTexGendv (GLenum coord, GLenum pname, GLdouble* params)
+ {
+ ::glGetTexGendv (coord, pname, params);
+ }
+
+ inline void glGetTexGenfv (GLenum coord, GLenum pname, GLfloat* params)
+ {
+ ::glGetTexGenfv (coord, pname, params);
+ }
+
+ inline void glGetTexGeniv (GLenum coord, GLenum pname, GLint* params)
+ {
+ ::glGetTexGeniv (coord, pname, params);
+ }
+
+public: //! @name Resident textures and priorities (removed since 3.1)
+
+ inline void glPrioritizeTextures (GLsizei n, const GLuint* textures, const GLclampf* priorities)
+ {
+ ::glPrioritizeTextures (n, textures, priorities);
+ }
+
+ inline GLboolean glAreTexturesResident (GLsizei n, const GLuint* textures, GLboolean* residences)
+ {
+ return ::glAreTexturesResident (n, textures, residences);
+ }
+
+public: //! @name Pixel copying (removed since 3.1)
+
+ inline void glDrawPixels (GLsizei width, GLsizei height,
+ GLenum format, GLenum type,
+ const GLvoid* pixels)
+ {
+ ::glDrawPixels (width, height, format, type, pixels);
+ }
+
+ inline void glCopyPixels (GLint x, GLint y,
+ GLsizei width, GLsizei height,
+ GLenum type)
+ {
+ ::glCopyPixels (x, y, width, height, type);
+ }
+
+ inline void glBitmap (GLsizei width, GLsizei height,
+ GLfloat xorig, GLfloat yorig,
+ GLfloat xmove, GLfloat ymove,
+ const GLubyte* bitmap)
+ {
+ ::glBitmap (width, height, xorig, yorig, xmove, ymove, bitmap);
+ }
+
+ inline void glPixelZoom (GLfloat xfactor, GLfloat yfactor)
+ {
+ ::glPixelZoom (xfactor, yfactor);
+ }
+
+public: //! @name Fog and all associated parameters (removed since 3.1)
+
+ inline void glFogf (GLenum pname, GLfloat param)
+ {
+ ::glFogf (pname, param);
+ }
+
+ inline void glFogi (GLenum pname, GLint param)
+ {
+ ::glFogi (pname, param);
+ }
+
+ inline void glFogfv (GLenum pname, const GLfloat* params)
+ {
+ ::glFogfv (pname, params);
+ }
+
+ inline void glFogiv (GLenum pname, const GLint* params)
+ {
+ ::glFogiv (pname, params);
+ }
+
+public: //! @name Evaluators (removed since 3.1)
+
+ inline void glMap1d (GLenum target, GLdouble u1, GLdouble u2,
+ GLint stride,
+ GLint order, const GLdouble* points)
+ {
+ ::glMap1d (target, u1, u2, stride, order, points);
+ }
+
+ inline void glMap1f (GLenum target, GLfloat u1, GLfloat u2,
+ GLint stride,
+ GLint order, const GLfloat* points)
+ {
+ ::glMap1f (target, u1, u2, stride, order, points);
+ }
+
+ inline void glMap2d (GLenum target,
+ GLdouble u1, GLdouble u2, GLint ustride, GLint uorder,
+ GLdouble v1, GLdouble v2, GLint vstride, GLint vorder,
+ const GLdouble* points)
+ {
+ ::glMap2d (target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points);
+ }
+
+ inline void glMap2f (GLenum target,
+ GLfloat u1, GLfloat u2, GLint ustride, GLint uorder,
+ GLfloat v1, GLfloat v2, GLint vstride, GLint vorder,
+ const GLfloat* points)
+ {
+ ::glMap2f (target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points);
+ }
+
+ inline void glGetMapdv (GLenum target, GLenum query, GLdouble* v)
+ {
+ ::glGetMapdv (target, query, v);
+ }
+
+ inline void glGetMapfv (GLenum target, GLenum query, GLfloat* v)
+ {
+ ::glGetMapfv (target, query, v);
+ }
+
+ inline void glGetMapiv (GLenum target, GLenum query, GLint* v)
+ {
+ ::glGetMapiv (target, query, v);
+ }
+
+ inline void glEvalCoord1d (GLdouble u)
+ {
+ ::glEvalCoord1d (u);
+ }
+
+ inline void glEvalCoord1f (GLfloat u)
+ {
+ ::glEvalCoord1f (u);
+ }
+
+ inline void glEvalCoord1dv (const GLdouble* u)
+ {
+ ::glEvalCoord1dv (u);
+ }
+
+ inline void glEvalCoord1fv (const GLfloat* u)
+ {
+ ::glEvalCoord1fv (u);
+ }
+
+ inline void glEvalCoord2d (GLdouble u, GLdouble v)
+ {
+ ::glEvalCoord2d (u, v);
+ }
+
+ inline void glEvalCoord2f (GLfloat u, GLfloat v)
+ {
+ ::glEvalCoord2f (u, v);
+ }
+
+ inline void glEvalCoord2dv (const GLdouble* u)
+ {
+ ::glEvalCoord2dv (u);
+ }
+
+ inline void glEvalCoord2fv (const GLfloat* u)
+ {
+ ::glEvalCoord2fv (u);
+ }
+
+ inline void glMapGrid1d (GLint un, GLdouble u1, GLdouble u2)
+ {
+ ::glMapGrid1d (un, u1, u2);
+ }
+
+ inline void glMapGrid1f (GLint un, GLfloat u1, GLfloat u2)
+ {
+ ::glMapGrid1f (un, u1, u2);
+ }
+
+ inline void glMapGrid2d (GLint un, GLdouble u1, GLdouble u2,
+ GLint vn, GLdouble v1, GLdouble v2)
+ {
+ ::glMapGrid2d (un, u1, u2, vn, v1, v2);
+ }
+
+ inline void glMapGrid2f (GLint un, GLfloat u1, GLfloat u2,
+ GLint vn, GLfloat v1, GLfloat v2)
+ {
+ ::glMapGrid2f (un, u1, u2, vn, v1, v2);
+ }
+
+ inline void glEvalPoint1 (GLint i)
+ {
+ ::glEvalPoint1 (i);
+ }
+
+ inline void glEvalPoint2 (GLint i, GLint j)
+ {
+ ::glEvalPoint2 (i, j);
+ }
+
+ inline void glEvalMesh1 (GLenum mode, GLint i1, GLint i2)
+ {
+ ::glEvalMesh1 (mode, i1, i2);
+ }
+
+ inline void glEvalMesh2 (GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2)
+ {
+ ::glEvalMesh2 (mode, i1, i2, j1, j2);
+ }
+
+public: //! @name Selection and feedback modes (removed since 3.1)
+
+ inline void glFeedbackBuffer (GLsizei theSize, GLenum theType, GLfloat* theBuffer)
+ {
+ ::glFeedbackBuffer (theSize, theType, theBuffer);
+ }
+
+ inline void glPassThrough (GLfloat token)
+ {
+ ::glPassThrough (token);
+ }
+
+ inline void glSelectBuffer (GLsizei theSize, GLuint* theBuffer)
+ {
+ ::glSelectBuffer (theSize, theBuffer);
+ }
+
+ inline void glInitNames()
+ {
+ ::glInitNames();
+ }
+
+ inline void glLoadName (GLuint theName)
+ {
+ ::glLoadName (theName);
+ }
+
+ inline void glPushName (GLuint theName)
+ {
+ ::glPushName (theName);
+ }
+
+ inline void glPopName()
+ {
+ ::glPopName();
+ }
+
+public: //! @name Accumulation Buffer (removed since 3.1)
+
+ inline void glClearAccum (GLfloat theRed, GLfloat theGreen, GLfloat theBlue, GLfloat theAlpha)
+ {
+ ::glClearAccum (theRed, theGreen, theBlue, theAlpha);
+ }
+
+ inline void glAccum (GLenum theOp, GLfloat theValue)
+ {
+ ::glAccum (theOp, theValue);
+ }
+
+public: //! @name Edge flags and fixed-function vertex processing (removed since 3.1)
+
+ inline void glEdgeFlag (GLboolean theFlag)
+ {
+ ::glEdgeFlag (theFlag);
+ }
+
+ inline void glEdgeFlagv (const GLboolean* theFlag)
+ {
+ ::glEdgeFlagv (theFlag);
+ }
+
+ inline void glVertexPointer (GLint theSize, GLenum theType, GLsizei theStride, const GLvoid* thePtr)
+ {
+ ::glVertexPointer (theSize, theType, theStride, thePtr);
+ }
+
+ inline void glNormalPointer (GLenum theType, GLsizei theStride, const GLvoid* thePtr)
+ {
+ ::glNormalPointer (theType, theStride, thePtr);
+ }
+
+ inline void glColorPointer (GLint theSize, GLenum theType, GLsizei theStride, const GLvoid* thePtr)
+ {
+ ::glColorPointer (theSize, theType, theStride, thePtr);
+ }
+
+ inline void glIndexPointer (GLenum theType, GLsizei theStride, const GLvoid* thePtr)
+ {
+ ::glIndexPointer (theType, theStride, thePtr);
+ }
+
+ inline void glTexCoordPointer (GLint theSize, GLenum theType, GLsizei theStride, const GLvoid* thePtr)
+ {
+ ::glTexCoordPointer (theSize, theType, theStride, thePtr);
+ }
+
+ inline void glEdgeFlagPointer (GLsizei theStride, const GLvoid* thePtr)
+ {
+ ::glEdgeFlagPointer (theStride, thePtr);
+ }
+
+ inline void glGetPointerv (GLenum pname, GLvoid** params)
+ {
+ ::glGetPointerv(pname, params);
+ }
+
+ inline void glInterleavedArrays (GLenum theFormat, GLsizei theStride, const GLvoid* thePointer)
+ {
+ ::glInterleavedArrays (theFormat, theStride, thePointer);
+ }
+
+ inline void glEnableClientState (GLenum theCap)
+ {
+ ::glEnableClientState (theCap);
+ }
+
+ inline void glDisableClientState (GLenum theCap)
+ {
+ ::glDisableClientState (theCap);
+ }
+
+};
+
+#endif // _OpenGl_GlCore11_Header
--- /dev/null
+// Created on: 2014-03-17
+// Created by: Kirill GAVRILOV
+// Copyright (c) 2014 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
+
+#ifndef _OpenGl_GlCore11Fwd_Header
+#define _OpenGl_GlCore11Fwd_Header
+
+#include <OpenGl_GlFunctions.hxx>
+
+//! OpenGL 1.1 core without deprecated Fixed Pipeline entry points.
+//! Notice that all functions within this structure are actually exported by system GL library.
+//! The main purpose for these hint - to control visibility of functions per GL version
+//! (global functions should not be used directly to achieve this effect!).
+struct OpenGl_GlCore11Fwd : protected OpenGl_GlFunctions
+{
+
+public: //! @name Miscellaneous
+
+ inline void glClearIndex (GLfloat c)
+ {
+ ::glClearIndex(c);
+ }
+
+ inline void glClearColor (GLclampf theRed, GLclampf theGreen, GLclampf theBlue, GLclampf theAlpha)
+ {
+ ::glClearColor (theRed, theGreen, theBlue, theAlpha);
+ }
+
+ inline void glClear (GLbitfield theMask)
+ {
+ ::glClear (theMask);
+ }
+
+ inline void glIndexMask (GLuint theMask)
+ {
+ ::glIndexMask (theMask);
+ }
+
+ inline void glColorMask (GLboolean theRed, GLboolean theGreen, GLboolean theBlue, GLboolean theAlpha)
+ {
+ ::glColorMask (theRed, theGreen, theBlue, theAlpha);
+ }
+
+ inline void glAlphaFunc (GLenum theFunc, GLclampf theRef)
+ {
+ ::glAlphaFunc (theFunc, theRef);
+ }
+
+ inline void glBlendFunc (GLenum sfactor, GLenum dfactor)
+ {
+ ::glBlendFunc(sfactor, dfactor);
+ }
+
+ inline void glLogicOp (GLenum opcode)
+ {
+ ::glLogicOp(opcode);
+ }
+
+ inline void glCullFace (GLenum theMode)
+ {
+ ::glCullFace (theMode);
+ }
+
+ inline void glFrontFace (GLenum theMode)
+ {
+ ::glFrontFace (theMode);
+ }
+
+ inline void glPointSize (GLfloat theSize)
+ {
+ ::glPointSize (theSize);
+ }
+
+ inline void glLineWidth (GLfloat theWidth)
+ {
+ ::glLineWidth (theWidth);
+ }
+
+ inline void glPolygonMode (GLenum theFace, GLenum theMode)
+ {
+ ::glPolygonMode (theFace, theMode);
+ }
+
+ inline void glPolygonOffset (GLfloat theFactor, GLfloat theUnits)
+ {
+ ::glPolygonOffset (theFactor, theUnits);
+ }
+
+ inline void glScissor (GLint theX, GLint theY, GLsizei theWidth, GLsizei theHeight)
+ {
+ ::glScissor (theX, theY, theWidth, theHeight);
+ }
+
+ inline void glDrawBuffer (GLenum theMode)
+ {
+ ::glDrawBuffer (theMode);
+ }
+
+ inline void glReadBuffer (GLenum theMode)
+ {
+ ::glReadBuffer (theMode);
+ }
+
+ inline void glEnable (GLenum theCap)
+ {
+ ::glEnable (theCap);
+ }
+
+ inline void glDisable (GLenum theCap)
+ {
+ ::glDisable (theCap);
+ }
+
+ inline GLboolean glIsEnabled (GLenum theCap)
+ {
+ return ::glIsEnabled (theCap);
+ }
+
+ inline void glGetBooleanv (GLenum theParamName, GLboolean* theValues)
+ {
+ ::glGetBooleanv (theParamName, theValues);
+ }
+
+ inline void glGetDoublev (GLenum theParamName, GLdouble* theValues)
+ {
+ ::glGetDoublev (theParamName, theValues);
+ }
+
+ inline void glGetFloatv (GLenum theParamName, GLfloat* theValues)
+ {
+ ::glGetFloatv (theParamName, theValues);
+ }
+
+ inline void glGetIntegerv (GLenum theParamName, GLint* theValues)
+ {
+ ::glGetIntegerv (theParamName, theValues);
+ }
+
+ inline GLint glRenderMode (GLenum theMode)
+ {
+ return ::glRenderMode (theMode);
+ }
+
+ inline GLenum glGetError()
+ {
+ return ::glGetError();
+ }
+
+ inline const GLubyte* glGetString (GLenum theName)
+ {
+ return ::glGetString (theName);
+ }
+
+ inline void glFinish()
+ {
+ ::glFinish();
+ }
+
+ inline void glFlush()
+ {
+ ::glFlush();
+ }
+
+ inline void glHint (GLenum theTarget, GLenum theMode)
+ {
+ ::glHint (theTarget, theMode);
+ }
+
+public: //! @name Depth Buffer
+
+ inline void glClearDepth (GLclampd theDepth)
+ {
+ ::glClearDepth (theDepth);
+ }
+
+ inline void glDepthFunc (GLenum theFunc)
+ {
+ ::glDepthFunc (theFunc);
+ }
+
+ inline void glDepthMask (GLboolean theFlag)
+ {
+ ::glDepthMask (theFlag);
+ }
+
+ inline void glDepthRange (GLclampd theNearValue, GLclampd theFarValue)
+ {
+ ::glDepthRange (theNearValue, theFarValue);
+ }
+
+public: //! @name Transformation
+
+ inline void glViewport (GLint theX, GLint theY, GLsizei theWidth, GLsizei theHeight)
+ {
+ ::glViewport (theX, theY, theWidth, theHeight);
+ }
+
+public: //! @name Vertex Arrays
+
+ inline void glArrayElement (GLint i)
+ {
+ ::glArrayElement (i);
+ }
+
+ inline void glDrawArrays (GLenum theMode, GLint theFirst, GLsizei theCount)
+ {
+ ::glDrawArrays (theMode, theFirst, theCount);
+ }
+
+ inline void glDrawElements (GLenum theMode, GLsizei theCount, GLenum theType, const GLvoid* theIndices)
+ {
+ ::glDrawElements (theMode, theCount, theType, theIndices);
+ }
+
+public: //! @name Raster functions
+
+ inline void glPixelStoref (GLenum theParamName, GLfloat theParam)
+ {
+ ::glPixelStoref (theParamName, theParam);
+ }
+
+ inline void glPixelStorei (GLenum theParamName, GLint theParam)
+ {
+ ::glPixelStorei (theParamName, theParam);
+ }
+
+ inline void glPixelTransferf (GLenum theParamName, GLfloat theParam)
+ {
+ ::glPixelTransferf (theParamName, theParam);
+ }
+
+ inline void glPixelTransferi (GLenum theParamName, GLint theParam)
+ {
+ ::glPixelTransferi (theParamName, theParam);
+ }
+
+ inline void glPixelMapfv (GLenum map, GLsizei mapsize, const GLfloat* values)
+ {
+ ::glPixelMapfv (map, mapsize, values);
+ }
+
+ inline void glPixelMapuiv (GLenum map, GLsizei mapsize, const GLuint* values)
+ {
+ ::glPixelMapuiv (map, mapsize, values);
+ }
+
+ inline void glPixelMapusv (GLenum map, GLsizei mapsize, const GLushort* values)
+ {
+ ::glPixelMapusv (map, mapsize, values);
+ }
+
+ inline void glGetPixelMapfv (GLenum map, GLfloat* values)
+ {
+ ::glGetPixelMapfv (map, values);
+ }
+
+ inline void glGetPixelMapuiv (GLenum map, GLuint* values)
+ {
+ ::glGetPixelMapuiv (map, values);
+ }
+
+ inline void glGetPixelMapusv (GLenum map, GLushort* values)
+ {
+ ::glGetPixelMapusv (map, values);
+ }
+
+ inline void glReadPixels (GLint x, GLint y,
+ GLsizei width, GLsizei height,
+ GLenum format, GLenum type,
+ GLvoid* pixels)
+ {
+ ::glReadPixels (x, y, width, height, format, type, pixels);
+ }
+
+public: //! @name Stenciling
+
+ inline void glStencilFunc (GLenum func, GLint ref, GLuint mask)
+ {
+ ::glStencilFunc (func, ref, mask);
+ }
+
+ inline void glStencilMask (GLuint mask)
+ {
+ ::glStencilMask (mask);
+ }
+
+ inline void glStencilOp (GLenum fail, GLenum zfail, GLenum zpass)
+ {
+ ::glStencilOp (fail, zfail, zpass);
+ }
+
+ inline void glClearStencil (GLint s)
+ {
+ ::glClearStencil (s);
+ }
+
+public: //! @name Texture mapping
+
+ inline void glTexEnvf (GLenum target, GLenum pname, GLfloat param)
+ {
+ ::glTexEnvf (target, pname, param);
+ }
+
+ inline void glTexEnvi (GLenum target, GLenum pname, GLint param)
+ {
+ ::glTexEnvi (target, pname, param);
+ }
+
+ inline void glTexEnvfv (GLenum target, GLenum pname, const GLfloat* params)
+ {
+ ::glTexEnvfv (target, pname, params);
+ }
+
+ inline void glTexEnviv (GLenum target, GLenum pname, const GLint* params)
+ {
+ ::glTexEnviv (target, pname, params);
+ }
+
+ inline void glGetTexEnvfv (GLenum target, GLenum pname, GLfloat* params)
+ {
+ ::glGetTexEnvfv (target, pname, params);
+ }
+
+ inline void glGetTexEnviv (GLenum target, GLenum pname, GLint* params)
+ {
+ ::glGetTexEnviv (target, pname, params);
+ }
+
+ inline void glTexParameterf (GLenum target, GLenum pname, GLfloat param)
+ {
+ ::glTexParameterf (target, pname, param);
+ }
+
+ inline void glTexParameteri (GLenum target, GLenum pname, GLint param)
+ {
+ ::glTexParameteri (target, pname, param);
+ }
+
+ inline void glTexParameterfv (GLenum target, GLenum pname, const GLfloat* params)
+ {
+ ::glTexParameterfv (target, pname, params);
+ }
+
+ inline void glTexParameteriv (GLenum target, GLenum pname, const GLint* params)
+ {
+ ::glTexParameteriv (target, pname, params);
+ }
+
+ inline void glGetTexParameterfv (GLenum target, GLenum pname, GLfloat* params)
+ {
+ ::glGetTexParameterfv (target, pname, params);
+ }
+
+ inline void glGetTexParameteriv (GLenum target, GLenum pname, GLint* params)
+ {
+ ::glGetTexParameteriv (target, pname, params);
+ }
+
+ inline void glGetTexLevelParameterfv (GLenum target, GLint level, GLenum pname, GLfloat* params)
+ {
+ ::glGetTexLevelParameterfv (target, level, pname, params);
+ }
+
+ inline void glGetTexLevelParameteriv (GLenum target, GLint level, GLenum pname, GLint* params)
+ {
+ ::glGetTexLevelParameteriv (target, level, pname, params);
+ }
+
+ inline void glTexImage1D (GLenum target, GLint level,
+ GLint internalFormat,
+ GLsizei width, GLint border,
+ GLenum format, GLenum type,
+ const GLvoid* pixels)
+ {
+ ::glTexImage1D(target, level, internalFormat, width, border, format, type, pixels);
+ }
+
+ inline void glTexImage2D (GLenum target, GLint level,
+ GLint internalFormat,
+ GLsizei width, GLsizei height,
+ GLint border, GLenum format, GLenum type,
+ const GLvoid* pixels)
+ {
+ ::glTexImage2D(target, level, internalFormat, width, height, border, format, type, pixels);
+ }
+
+ inline void glGetTexImage (GLenum target, GLint level,
+ GLenum format, GLenum type,
+ GLvoid* pixels)
+ {
+ ::glGetTexImage(target, level, format, type, pixels);
+ }
+
+ inline void glGenTextures (GLsizei n, GLuint* textures)
+ {
+ ::glGenTextures(n, textures);
+ }
+
+ inline void glDeleteTextures (GLsizei n, const GLuint* textures)
+ {
+ ::glDeleteTextures(n, textures);
+ }
+
+ inline void glBindTexture (GLenum target, GLuint texture)
+ {
+ ::glBindTexture(target, texture);
+ }
+
+ inline GLboolean glIsTexture (GLuint texture)
+ {
+ return ::glIsTexture (texture);
+ }
+
+ inline void glTexSubImage1D (GLenum target, GLint level,
+ GLint xoffset,
+ GLsizei width, GLenum format,
+ GLenum type, const GLvoid* pixels)
+ {
+ ::glTexSubImage1D(target, level, xoffset, width, format, type, pixels);
+ }
+
+ inline void glTexSubImage2D (GLenum target, GLint level,
+ GLint xoffset, GLint yoffset,
+ GLsizei width, GLsizei height,
+ GLenum format, GLenum type,
+ const GLvoid* pixels)
+ {
+ ::glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels);
+ }
+
+ inline void glCopyTexImage1D (GLenum target, GLint level,
+ GLenum internalformat,
+ GLint x, GLint y,
+ GLsizei width, GLint border)
+ {
+ ::glCopyTexImage1D(target, level, internalformat, x, y, width, border);
+ }
+
+ inline void glCopyTexImage2D (GLenum target, GLint level,
+ GLenum internalformat,
+ GLint x, GLint y,
+ GLsizei width, GLsizei height,
+ GLint border)
+ {
+ ::glCopyTexImage2D(target, level, internalformat, x, y, width, height, border);
+ }
+
+ inline void glCopyTexSubImage1D (GLenum target, GLint level,
+ GLint xoffset, GLint x, GLint y,
+ GLsizei width)
+ {
+ ::glCopyTexSubImage1D(target, level, xoffset, x, y, width);
+ }
+
+ inline void glCopyTexSubImage2D (GLenum target, GLint level,
+ GLint xoffset, GLint yoffset,
+ GLint x, GLint y,
+ GLsizei width, GLsizei height)
+ {
+ ::glCopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height);
+ }
+
+};
+
+#endif // _OpenGl_GlCore11Fwd_Header
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#ifndef _OpenGl_GlCore12_H__
-#define _OpenGl_GlCore12_H__
+#ifndef _OpenGl_GlCore12_Header
+#define _OpenGl_GlCore12_Header
#include <OpenGl_GlCore11.hxx>
-// GL version can be defined by system gl.h header
-#undef GL_VERSION_1_2
-#undef GL_VERSION_1_3
-#undef GL_VERSION_1_4
-#undef GL_VERSION_1_5
-#undef GL_VERSION_2_0
-
-// include glext.h provided by Khronos group
-#include <glext.h>
-
-//! Function list for GL1.2 core functionality.
-struct OpenGl_GlCore12
+//! OpenGL 1.2 core based on 1.1 version.
+template<typename theBaseClass_t>
+struct OpenGl_TmplCore12 : public theBaseClass_t
{
- PFNGLBLENDCOLORPROC glBlendColor;
- PFNGLBLENDEQUATIONPROC glBlendEquation;
- PFNGLDRAWRANGEELEMENTSPROC glDrawRangeElements;
- PFNGLTEXIMAGE3DPROC glTexImage3D;
- PFNGLTEXSUBIMAGE3DPROC glTexSubImage3D;
- PFNGLCOPYTEXSUBIMAGE3DPROC glCopyTexSubImage3D;
+public: //! @name OpenGL 1.2 additives to 1.1
+
+ using theBaseClass_t::glBlendColor;
+ using theBaseClass_t::glBlendEquation;
+ using theBaseClass_t::glDrawRangeElements;
+ using theBaseClass_t::glTexImage3D;
+ using theBaseClass_t::glTexSubImage3D;
+ using theBaseClass_t::glCopyTexSubImage3D;
};
-#endif // _OpenGl_GlCore12_H__
+//! OpenGL 1.2 core based on 1.1 version.
+typedef OpenGl_TmplCore12<OpenGl_GlCore11> OpenGl_GlCore12;
+
+//! OpenGL 1.2 without deprecated entry points.
+typedef OpenGl_TmplCore12<OpenGl_GlCore11Fwd> OpenGl_GlCore12Fwd;
+
+#endif // _OpenGl_GlCore12_Header
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#ifndef _OpenGl_GlCore13_H__
-#define _OpenGl_GlCore13_H__
+#ifndef _OpenGl_GlCore13_Header
+#define _OpenGl_GlCore13_Header
#include <OpenGl_GlCore12.hxx>
-//! Function list for GL1.3 core functionality.
+//! OpenGL 1.3 without deprecated entry points.
+struct OpenGl_GlCore13Fwd : public OpenGl_GlCore12Fwd
+{
+
+public: //! @name OpenGL 1.3 additives to 1.2
+
+ using OpenGl_GlFunctions::glActiveTexture;
+ using OpenGl_GlFunctions::glSampleCoverage;
+ using OpenGl_GlFunctions::glCompressedTexImage3D;
+ using OpenGl_GlFunctions::glCompressedTexImage2D;
+ using OpenGl_GlFunctions::glCompressedTexImage1D;
+ using OpenGl_GlFunctions::glCompressedTexSubImage3D;
+ using OpenGl_GlFunctions::glCompressedTexSubImage2D;
+ using OpenGl_GlFunctions::glCompressedTexSubImage1D;
+ using OpenGl_GlFunctions::glGetCompressedTexImage;
+
+};
+
+//! OpenGL 1.3 core based on 1.2 version.
struct OpenGl_GlCore13 : public OpenGl_GlCore12
{
- PFNGLACTIVETEXTUREPROC glActiveTexture;
- PFNGLSAMPLECOVERAGEPROC glSampleCoverage;
- PFNGLCOMPRESSEDTEXIMAGE3DPROC glCompressedTexImage3D;
- PFNGLCOMPRESSEDTEXIMAGE2DPROC glCompressedTexImage2D;
- PFNGLCOMPRESSEDTEXIMAGE1DPROC glCompressedTexImage1D;
- PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC glCompressedTexSubImage3D;
- PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC glCompressedTexSubImage2D;
- PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC glCompressedTexSubImage1D;
- PFNGLGETCOMPRESSEDTEXIMAGEPROC glGetCompressedTexImage;
-
- // deprecated functions
-
- PFNGLCLIENTACTIVETEXTUREPROC glClientActiveTexture;
- PFNGLMULTITEXCOORD1DPROC glMultiTexCoord1d;
- PFNGLMULTITEXCOORD1DVPROC glMultiTexCoord1dv;
- PFNGLMULTITEXCOORD1FPROC glMultiTexCoord1f;
- PFNGLMULTITEXCOORD1FVPROC glMultiTexCoord1fv;
- PFNGLMULTITEXCOORD1IPROC glMultiTexCoord1i;
- PFNGLMULTITEXCOORD1IVPROC glMultiTexCoord1iv;
- PFNGLMULTITEXCOORD1SPROC glMultiTexCoord1s;
- PFNGLMULTITEXCOORD1SVPROC glMultiTexCoord1sv;
- PFNGLMULTITEXCOORD2DPROC glMultiTexCoord2d;
- PFNGLMULTITEXCOORD2DVPROC glMultiTexCoord2dv;
- PFNGLMULTITEXCOORD2FPROC glMultiTexCoord2f;
- PFNGLMULTITEXCOORD2FVPROC glMultiTexCoord2fv;
- PFNGLMULTITEXCOORD2IPROC glMultiTexCoord2i;
- PFNGLMULTITEXCOORD2IVPROC glMultiTexCoord2iv;
- PFNGLMULTITEXCOORD2SPROC glMultiTexCoord2s;
- PFNGLMULTITEXCOORD2SVPROC glMultiTexCoord2sv;
- PFNGLMULTITEXCOORD3DPROC glMultiTexCoord3d;
- PFNGLMULTITEXCOORD3DVPROC glMultiTexCoord3dv;
- PFNGLMULTITEXCOORD3FPROC glMultiTexCoord3f;
- PFNGLMULTITEXCOORD3FVPROC glMultiTexCoord3fv;
- PFNGLMULTITEXCOORD3IPROC glMultiTexCoord3i;
- PFNGLMULTITEXCOORD3IVPROC glMultiTexCoord3iv;
- PFNGLMULTITEXCOORD3SPROC glMultiTexCoord3s;
- PFNGLMULTITEXCOORD3SVPROC glMultiTexCoord3sv;
- PFNGLMULTITEXCOORD4DPROC glMultiTexCoord4d;
- PFNGLMULTITEXCOORD4DVPROC glMultiTexCoord4dv;
- PFNGLMULTITEXCOORD4FPROC glMultiTexCoord4f;
- PFNGLMULTITEXCOORD4FVPROC glMultiTexCoord4fv;
- PFNGLMULTITEXCOORD4IPROC glMultiTexCoord4i;
- PFNGLMULTITEXCOORD4IVPROC glMultiTexCoord4iv;
- PFNGLMULTITEXCOORD4SPROC glMultiTexCoord4s;
- PFNGLMULTITEXCOORD4SVPROC glMultiTexCoord4sv;
- PFNGLLOADTRANSPOSEMATRIXFPROC glLoadTransposeMatrixf;
- PFNGLLOADTRANSPOSEMATRIXDPROC glLoadTransposeMatrixd;
- PFNGLMULTTRANSPOSEMATRIXFPROC glMultTransposeMatrixf;
- PFNGLMULTTRANSPOSEMATRIXDPROC glMultTransposeMatrixd;
+public: //! @name OpenGL 1.3 additives to 1.2
+
+ using OpenGl_GlFunctions::glActiveTexture;
+ using OpenGl_GlFunctions::glSampleCoverage;
+ using OpenGl_GlFunctions::glCompressedTexImage3D;
+ using OpenGl_GlFunctions::glCompressedTexImage2D;
+ using OpenGl_GlFunctions::glCompressedTexImage1D;
+ using OpenGl_GlFunctions::glCompressedTexSubImage3D;
+ using OpenGl_GlFunctions::glCompressedTexSubImage2D;
+ using OpenGl_GlFunctions::glCompressedTexSubImage1D;
+ using OpenGl_GlFunctions::glGetCompressedTexImage;
+
+public: //! @name Begin/End primitive specification (removed since 3.1)
+
+ using OpenGl_GlFunctions::glMultiTexCoord1d;
+ using OpenGl_GlFunctions::glMultiTexCoord1dv;
+ using OpenGl_GlFunctions::glMultiTexCoord1f;
+ using OpenGl_GlFunctions::glMultiTexCoord1fv;
+ using OpenGl_GlFunctions::glMultiTexCoord1i;
+ using OpenGl_GlFunctions::glMultiTexCoord1iv;
+ using OpenGl_GlFunctions::glMultiTexCoord1s;
+ using OpenGl_GlFunctions::glMultiTexCoord1sv;
+ using OpenGl_GlFunctions::glMultiTexCoord2d;
+ using OpenGl_GlFunctions::glMultiTexCoord2dv;
+ using OpenGl_GlFunctions::glMultiTexCoord2f;
+ using OpenGl_GlFunctions::glMultiTexCoord2fv;
+ using OpenGl_GlFunctions::glMultiTexCoord2i;
+ using OpenGl_GlFunctions::glMultiTexCoord2iv;
+ using OpenGl_GlFunctions::glMultiTexCoord2s;
+ using OpenGl_GlFunctions::glMultiTexCoord2sv;
+ using OpenGl_GlFunctions::glMultiTexCoord3d;
+ using OpenGl_GlFunctions::glMultiTexCoord3dv;
+ using OpenGl_GlFunctions::glMultiTexCoord3f;
+ using OpenGl_GlFunctions::glMultiTexCoord3fv;
+ using OpenGl_GlFunctions::glMultiTexCoord3i;
+ using OpenGl_GlFunctions::glMultiTexCoord3iv;
+ using OpenGl_GlFunctions::glMultiTexCoord3s;
+ using OpenGl_GlFunctions::glMultiTexCoord3sv;
+ using OpenGl_GlFunctions::glMultiTexCoord4d;
+ using OpenGl_GlFunctions::glMultiTexCoord4dv;
+ using OpenGl_GlFunctions::glMultiTexCoord4f;
+ using OpenGl_GlFunctions::glMultiTexCoord4fv;
+ using OpenGl_GlFunctions::glMultiTexCoord4i;
+ using OpenGl_GlFunctions::glMultiTexCoord4iv;
+ using OpenGl_GlFunctions::glMultiTexCoord4s;
+ using OpenGl_GlFunctions::glMultiTexCoord4sv;
+
+ using OpenGl_GlFunctions::glClientActiveTexture;
+
+public: //! @name Matrix operations (removed since 3.1)
+
+ using OpenGl_GlFunctions::glLoadTransposeMatrixf;
+ using OpenGl_GlFunctions::glLoadTransposeMatrixd;
+ using OpenGl_GlFunctions::glMultTransposeMatrixf;
+ using OpenGl_GlFunctions::glMultTransposeMatrixd;
};
-#endif // _OpenGl_GlCore13_H__
+#endif // _OpenGl_GlCore13_Header
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#ifndef _OpenGl_GlCore14_H__
-#define _OpenGl_GlCore14_H__
+#ifndef _OpenGl_GlCore14_Header
+#define _OpenGl_GlCore14_Header
#include <OpenGl_GlCore13.hxx>
-//! Function list for GL1.4 core functionality.
-struct OpenGl_GlCore14 : public OpenGl_GlCore13
+//! OpenGL 1.4 core based on 1.3 version.
+template<typename theBaseClass_t>
+struct OpenGl_TmplCore14 : public theBaseClass_t
{
- PFNGLBLENDFUNCSEPARATEPROC glBlendFuncSeparate;
- PFNGLMULTIDRAWARRAYSPROC glMultiDrawArrays;
- PFNGLMULTIDRAWELEMENTSPROC glMultiDrawElements;
- PFNGLPOINTPARAMETERFPROC glPointParameterf;
- PFNGLPOINTPARAMETERFVPROC glPointParameterfv;
- PFNGLPOINTPARAMETERIPROC glPointParameteri;
- PFNGLPOINTPARAMETERIVPROC glPointParameteriv;
+public: //! @name OpenGL 1.4 additives to 1.3
+
+ using theBaseClass_t::glBlendFuncSeparate;
+ using theBaseClass_t::glMultiDrawArrays;
+ using theBaseClass_t::glMultiDrawElements;
+ using theBaseClass_t::glPointParameterf;
+ using theBaseClass_t::glPointParameterfv;
+ using theBaseClass_t::glPointParameteri;
+ using theBaseClass_t::glPointParameteriv;
};
-#endif // _OpenGl_GlCore14_H__
+//! OpenGL 1.4 core based on 1.3 version.
+typedef OpenGl_TmplCore14<OpenGl_GlCore13> OpenGl_GlCore14;
+
+//! OpenGL 1.4 without deprecated entry points.
+typedef OpenGl_TmplCore14<OpenGl_GlCore13Fwd> OpenGl_GlCore14Fwd;
+
+#endif // _OpenGl_GlCore14_Header
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#ifndef _OpenGl_GlCore15_H__
-#define _OpenGl_GlCore15_H__
+#ifndef _OpenGl_GlCore15_Header
+#define _OpenGl_GlCore15_Header
#include <OpenGl_GlCore14.hxx>
-//! Function list for GL1.5 core functionality.
-struct OpenGl_GlCore15 : public OpenGl_GlCore14
+/**
+ * OpenGL 1.5 core based on 1.4 version.
+ */
+template<typename theBaseClass_t>
+struct OpenGl_TmplCore15 : public theBaseClass_t
{
- PFNGLGENQUERIESPROC glGenQueries;
- PFNGLDELETEQUERIESPROC glDeleteQueries;
- PFNGLISQUERYPROC glIsQuery;
- PFNGLBEGINQUERYPROC glBeginQuery;
- PFNGLENDQUERYPROC glEndQuery;
- PFNGLGETQUERYIVPROC glGetQueryiv;
- PFNGLGETQUERYOBJECTIVPROC glGetQueryObjectiv;
- PFNGLGETQUERYOBJECTUIVPROC glGetQueryObjectuiv;
- PFNGLBINDBUFFERPROC glBindBuffer;
- PFNGLDELETEBUFFERSPROC glDeleteBuffers;
- PFNGLGENBUFFERSPROC glGenBuffers;
- PFNGLISBUFFERPROC glIsBuffer;
- PFNGLBUFFERDATAPROC glBufferData;
- PFNGLBUFFERSUBDATAPROC glBufferSubData;
- PFNGLGETBUFFERSUBDATAPROC glGetBufferSubData;
- PFNGLMAPBUFFERPROC glMapBuffer;
- PFNGLUNMAPBUFFERPROC glUnmapBuffer;
- PFNGLGETBUFFERPARAMETERIVPROC glGetBufferParameteriv;
- PFNGLGETBUFFERPOINTERVPROC glGetBufferPointerv;
+public: //! @name OpenGL 1.5 additives to 1.4
+
+ using theBaseClass_t::glGenQueries;
+ using theBaseClass_t::glDeleteQueries;
+ using theBaseClass_t::glIsQuery;
+ using theBaseClass_t::glBeginQuery;
+ using theBaseClass_t::glEndQuery;
+ using theBaseClass_t::glGetQueryiv;
+ using theBaseClass_t::glGetQueryObjectiv;
+ using theBaseClass_t::glGetQueryObjectuiv;
+ using theBaseClass_t::glBindBuffer;
+ using theBaseClass_t::glDeleteBuffers;
+ using theBaseClass_t::glGenBuffers;
+ using theBaseClass_t::glIsBuffer;
+ using theBaseClass_t::glBufferData;
+ using theBaseClass_t::glBufferSubData;
+ using theBaseClass_t::glGetBufferSubData;
+ using theBaseClass_t::glMapBuffer;
+ using theBaseClass_t::glUnmapBuffer;
+ using theBaseClass_t::glGetBufferParameteriv;
+ using theBaseClass_t::glGetBufferPointerv;
};
-#endif // _OpenGl_GlCore15_H__
+//! OpenGL 1.5 core based on 1.4 version.
+typedef OpenGl_TmplCore15<OpenGl_GlCore14> OpenGl_GlCore15;
+
+//! OpenGL 1.5 without deprecated entry points.
+typedef OpenGl_TmplCore15<OpenGl_GlCore14Fwd> OpenGl_GlCore15Fwd;
+
+#endif // _OpenGl_GlCore15_Header
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#ifndef _OpenGl_GlCore20_H__
-#define _OpenGl_GlCore20_H__
+#ifndef _OpenGl_GlCore20_Header
+#define _OpenGl_GlCore20_Header
#include <OpenGl_GlCore15.hxx>
-//! Function list for GL2.0 core functionality.
-struct OpenGl_GlCore20 : public OpenGl_GlCore15
+//! OpenGL 2.0 core based on 1.5 version.
+template<typename theBaseClass_t>
+struct OpenGl_TmplCore20 : public theBaseClass_t
{
- PFNGLBLENDEQUATIONSEPARATEPROC glBlendEquationSeparate;
- PFNGLDRAWBUFFERSPROC glDrawBuffers;
- PFNGLSTENCILOPSEPARATEPROC glStencilOpSeparate;
- PFNGLSTENCILFUNCSEPARATEPROC glStencilFuncSeparate;
- PFNGLSTENCILMASKSEPARATEPROC glStencilMaskSeparate;
- PFNGLATTACHSHADERPROC glAttachShader;
- PFNGLBINDATTRIBLOCATIONPROC glBindAttribLocation;
- PFNGLCOMPILESHADERPROC glCompileShader;
- PFNGLCREATEPROGRAMPROC glCreateProgram;
- PFNGLCREATESHADERPROC glCreateShader;
- PFNGLDELETEPROGRAMPROC glDeleteProgram;
- PFNGLDELETESHADERPROC glDeleteShader;
- PFNGLDETACHSHADERPROC glDetachShader;
- PFNGLDISABLEVERTEXATTRIBARRAYPROC glDisableVertexAttribArray;
- PFNGLENABLEVERTEXATTRIBARRAYPROC glEnableVertexAttribArray;
- PFNGLGETACTIVEATTRIBPROC glGetActiveAttrib;
- PFNGLGETACTIVEUNIFORMPROC glGetActiveUniform;
- PFNGLGETATTACHEDSHADERSPROC glGetAttachedShaders;
- PFNGLGETATTRIBLOCATIONPROC glGetAttribLocation;
- PFNGLGETPROGRAMIVPROC glGetProgramiv;
- PFNGLGETPROGRAMINFOLOGPROC glGetProgramInfoLog;
- PFNGLGETSHADERIVPROC glGetShaderiv;
- PFNGLGETSHADERINFOLOGPROC glGetShaderInfoLog;
- PFNGLGETSHADERSOURCEPROC glGetShaderSource;
- PFNGLGETUNIFORMLOCATIONPROC glGetUniformLocation;
- PFNGLGETUNIFORMFVPROC glGetUniformfv;
- PFNGLGETUNIFORMIVPROC glGetUniformiv;
- PFNGLGETVERTEXATTRIBDVPROC glGetVertexAttribdv;
- PFNGLGETVERTEXATTRIBFVPROC glGetVertexAttribfv;
- PFNGLGETVERTEXATTRIBIVPROC glGetVertexAttribiv;
- PFNGLGETVERTEXATTRIBPOINTERVPROC glGetVertexAttribPointerv;
- PFNGLISPROGRAMPROC glIsProgram;
- PFNGLISSHADERPROC glIsShader;
- PFNGLLINKPROGRAMPROC glLinkProgram;
- PFNGLSHADERSOURCEPROC glShaderSource;
- PFNGLUSEPROGRAMPROC glUseProgram;
- PFNGLUNIFORM1FPROC glUniform1f;
- PFNGLUNIFORM2FPROC glUniform2f;
- PFNGLUNIFORM3FPROC glUniform3f;
- PFNGLUNIFORM4FPROC glUniform4f;
- PFNGLUNIFORM1IPROC glUniform1i;
- PFNGLUNIFORM2IPROC glUniform2i;
- PFNGLUNIFORM3IPROC glUniform3i;
- PFNGLUNIFORM4IPROC glUniform4i;
- PFNGLUNIFORM1FVPROC glUniform1fv;
- PFNGLUNIFORM2FVPROC glUniform2fv;
- PFNGLUNIFORM3FVPROC glUniform3fv;
- PFNGLUNIFORM4FVPROC glUniform4fv;
- PFNGLUNIFORM1IVPROC glUniform1iv;
- PFNGLUNIFORM2IVPROC glUniform2iv;
- PFNGLUNIFORM3IVPROC glUniform3iv;
- PFNGLUNIFORM4IVPROC glUniform4iv;
- PFNGLUNIFORMMATRIX2FVPROC glUniformMatrix2fv;
- PFNGLUNIFORMMATRIX3FVPROC glUniformMatrix3fv;
- PFNGLUNIFORMMATRIX4FVPROC glUniformMatrix4fv;
- PFNGLVALIDATEPROGRAMPROC glValidateProgram;
- PFNGLVERTEXATTRIB1DPROC glVertexAttrib1d;
- PFNGLVERTEXATTRIB1DVPROC glVertexAttrib1dv;
- PFNGLVERTEXATTRIB1FPROC glVertexAttrib1f;
- PFNGLVERTEXATTRIB1FVPROC glVertexAttrib1fv;
- PFNGLVERTEXATTRIB1SPROC glVertexAttrib1s;
- PFNGLVERTEXATTRIB1SVPROC glVertexAttrib1sv;
- PFNGLVERTEXATTRIB2DPROC glVertexAttrib2d;
- PFNGLVERTEXATTRIB2DVPROC glVertexAttrib2dv;
- PFNGLVERTEXATTRIB2FPROC glVertexAttrib2f;
- PFNGLVERTEXATTRIB2FVPROC glVertexAttrib2fv;
- PFNGLVERTEXATTRIB2SPROC glVertexAttrib2s;
- PFNGLVERTEXATTRIB2SVPROC glVertexAttrib2sv;
- PFNGLVERTEXATTRIB3DPROC glVertexAttrib3d;
- PFNGLVERTEXATTRIB3DVPROC glVertexAttrib3dv;
- PFNGLVERTEXATTRIB3FPROC glVertexAttrib3f;
- PFNGLVERTEXATTRIB3FVPROC glVertexAttrib3fv;
- PFNGLVERTEXATTRIB3SPROC glVertexAttrib3s;
- PFNGLVERTEXATTRIB3SVPROC glVertexAttrib3sv;
- PFNGLVERTEXATTRIB4NBVPROC glVertexAttrib4Nbv;
- PFNGLVERTEXATTRIB4NIVPROC glVertexAttrib4Niv;
- PFNGLVERTEXATTRIB4NSVPROC glVertexAttrib4Nsv;
- PFNGLVERTEXATTRIB4NUBPROC glVertexAttrib4Nub;
- PFNGLVERTEXATTRIB4NUBVPROC glVertexAttrib4Nubv;
- PFNGLVERTEXATTRIB4NUIVPROC glVertexAttrib4Nuiv;
- PFNGLVERTEXATTRIB4NUSVPROC glVertexAttrib4Nusv;
- PFNGLVERTEXATTRIB4BVPROC glVertexAttrib4bv;
- PFNGLVERTEXATTRIB4DPROC glVertexAttrib4d;
- PFNGLVERTEXATTRIB4DVPROC glVertexAttrib4dv;
- PFNGLVERTEXATTRIB4FPROC glVertexAttrib4f;
- PFNGLVERTEXATTRIB4FVPROC glVertexAttrib4fv;
- PFNGLVERTEXATTRIB4IVPROC glVertexAttrib4iv;
- PFNGLVERTEXATTRIB4SPROC glVertexAttrib4s;
- PFNGLVERTEXATTRIB4SVPROC glVertexAttrib4sv;
- PFNGLVERTEXATTRIB4UBVPROC glVertexAttrib4ubv;
- PFNGLVERTEXATTRIB4UIVPROC glVertexAttrib4uiv;
- PFNGLVERTEXATTRIB4USVPROC glVertexAttrib4usv;
- PFNGLVERTEXATTRIBPOINTERPROC glVertexAttribPointer;
+public: //! @name OpenGL 2.0 additives to 1.5
+
+ using theBaseClass_t::glBlendEquationSeparate;
+ using theBaseClass_t::glDrawBuffers;
+ using theBaseClass_t::glStencilOpSeparate;
+ using theBaseClass_t::glStencilFuncSeparate;
+ using theBaseClass_t::glStencilMaskSeparate;
+ using theBaseClass_t::glAttachShader;
+ using theBaseClass_t::glBindAttribLocation;
+ using theBaseClass_t::glCompileShader;
+ using theBaseClass_t::glCreateProgram;
+ using theBaseClass_t::glCreateShader;
+ using theBaseClass_t::glDeleteProgram;
+ using theBaseClass_t::glDeleteShader;
+ using theBaseClass_t::glDetachShader;
+ using theBaseClass_t::glDisableVertexAttribArray;
+ using theBaseClass_t::glEnableVertexAttribArray;
+ using theBaseClass_t::glGetActiveAttrib;
+ using theBaseClass_t::glGetActiveUniform;
+ using theBaseClass_t::glGetAttachedShaders;
+ using theBaseClass_t::glGetAttribLocation;
+ using theBaseClass_t::glGetProgramiv;
+ using theBaseClass_t::glGetProgramInfoLog;
+ using theBaseClass_t::glGetShaderiv;
+ using theBaseClass_t::glGetShaderInfoLog;
+ using theBaseClass_t::glGetShaderSource;
+ using theBaseClass_t::glGetUniformLocation;
+ using theBaseClass_t::glGetUniformfv;
+ using theBaseClass_t::glGetUniformiv;
+ using theBaseClass_t::glGetVertexAttribdv;
+ using theBaseClass_t::glGetVertexAttribfv;
+ using theBaseClass_t::glGetVertexAttribiv;
+ using theBaseClass_t::glGetVertexAttribPointerv;
+ using theBaseClass_t::glIsProgram;
+ using theBaseClass_t::glIsShader;
+ using theBaseClass_t::glLinkProgram;
+ using theBaseClass_t::glShaderSource;
+ using theBaseClass_t::glUseProgram;
+ using theBaseClass_t::glUniform1f;
+ using theBaseClass_t::glUniform2f;
+ using theBaseClass_t::glUniform3f;
+ using theBaseClass_t::glUniform4f;
+ using theBaseClass_t::glUniform1i;
+ using theBaseClass_t::glUniform2i;
+ using theBaseClass_t::glUniform3i;
+ using theBaseClass_t::glUniform4i;
+ using theBaseClass_t::glUniform1fv;
+ using theBaseClass_t::glUniform2fv;
+ using theBaseClass_t::glUniform3fv;
+ using theBaseClass_t::glUniform4fv;
+ using theBaseClass_t::glUniform1iv;
+ using theBaseClass_t::glUniform2iv;
+ using theBaseClass_t::glUniform3iv;
+ using theBaseClass_t::glUniform4iv;
+ using theBaseClass_t::glUniformMatrix2fv;
+ using theBaseClass_t::glUniformMatrix3fv;
+ using theBaseClass_t::glUniformMatrix4fv;
+ using theBaseClass_t::glValidateProgram;
+ using theBaseClass_t::glVertexAttrib1d;
+ using theBaseClass_t::glVertexAttrib1dv;
+ using theBaseClass_t::glVertexAttrib1f;
+ using theBaseClass_t::glVertexAttrib1fv;
+ using theBaseClass_t::glVertexAttrib1s;
+ using theBaseClass_t::glVertexAttrib1sv;
+ using theBaseClass_t::glVertexAttrib2d;
+ using theBaseClass_t::glVertexAttrib2dv;
+ using theBaseClass_t::glVertexAttrib2f;
+ using theBaseClass_t::glVertexAttrib2fv;
+ using theBaseClass_t::glVertexAttrib2s;
+ using theBaseClass_t::glVertexAttrib2sv;
+ using theBaseClass_t::glVertexAttrib3d;
+ using theBaseClass_t::glVertexAttrib3dv;
+ using theBaseClass_t::glVertexAttrib3f;
+ using theBaseClass_t::glVertexAttrib3fv;
+ using theBaseClass_t::glVertexAttrib3s;
+ using theBaseClass_t::glVertexAttrib3sv;
+ using theBaseClass_t::glVertexAttrib4Nbv;
+ using theBaseClass_t::glVertexAttrib4Niv;
+ using theBaseClass_t::glVertexAttrib4Nsv;
+ using theBaseClass_t::glVertexAttrib4Nub;
+ using theBaseClass_t::glVertexAttrib4Nubv;
+ using theBaseClass_t::glVertexAttrib4Nuiv;
+ using theBaseClass_t::glVertexAttrib4Nusv;
+ using theBaseClass_t::glVertexAttrib4bv;
+ using theBaseClass_t::glVertexAttrib4d;
+ using theBaseClass_t::glVertexAttrib4dv;
+ using theBaseClass_t::glVertexAttrib4f;
+ using theBaseClass_t::glVertexAttrib4fv;
+ using theBaseClass_t::glVertexAttrib4iv;
+ using theBaseClass_t::glVertexAttrib4s;
+ using theBaseClass_t::glVertexAttrib4sv;
+ using theBaseClass_t::glVertexAttrib4ubv;
+ using theBaseClass_t::glVertexAttrib4uiv;
+ using theBaseClass_t::glVertexAttrib4usv;
+ using theBaseClass_t::glVertexAttribPointer;
};
-#endif // _OpenGl_GlCore20_H__
+//! OpenGL 2.0 core based on 1.5 version.
+typedef OpenGl_TmplCore20<OpenGl_GlCore15> OpenGl_GlCore20;
+
+//! OpenGL 2.0 without deprecated entry points.
+typedef OpenGl_TmplCore20<OpenGl_GlCore15Fwd> OpenGl_GlCore20Fwd;
+
+#endif // _OpenGl_GlCore20_Header
--- /dev/null
+// Created on: 2014-03-17
+// Created by: Kirill GAVRILOV
+// Copyright (c) 2014 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
+
+#ifndef _OpenGl_GlCore21_Header
+#define _OpenGl_GlCore21_Header
+
+#include <OpenGl_GlCore20.hxx>
+
+//! OpenGL 2.1 core based on 2.0 version.
+template<typename theBaseClass_t>
+struct OpenGl_TmplCore21 : public theBaseClass_t
+{
+
+public: //! @name OpenGL 2.1 additives to 2.0
+
+ using theBaseClass_t::glUniformMatrix2x3fv;
+ using theBaseClass_t::glUniformMatrix3x2fv;
+ using theBaseClass_t::glUniformMatrix2x4fv;
+ using theBaseClass_t::glUniformMatrix4x2fv;
+ using theBaseClass_t::glUniformMatrix3x4fv;
+ using theBaseClass_t::glUniformMatrix4x3fv;
+
+};
+
+//! OpenGL 2.1 core based on 2.0 version.
+typedef OpenGl_TmplCore21<OpenGl_GlCore20> OpenGl_GlCore21;
+
+//! OpenGL 2.1 without deprecated entry points.
+typedef OpenGl_TmplCore21<OpenGl_GlCore20Fwd> OpenGl_GlCore21Fwd;
+
+#endif // _OpenGl_GlCore21_Header
--- /dev/null
+// Created on: 2014-03-17
+// Created by: Kirill GAVRILOV
+// Copyright (c) 2014 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
+
+#ifndef _OpenGl_GlCore30_Header
+#define _OpenGl_GlCore30_Header
+
+#include <OpenGl_GlCore21.hxx>
+
+//! OpenGL 3.0 core.
+//! This is first version with deprecation model introduced
+//! - a lot of functionality regarding to fixed pipeline were marked deprecated.
+//! Notice that nothing were actually removed in this version (unless Forward context loaded)!
+template<typename theBaseClass_t>
+struct OpenGl_TmplCore30 : public theBaseClass_t
+{
+
+public: //! @name GL_ARB_framebuffer_object (added to OpenGL 3.0 core)
+
+ using theBaseClass_t::glIsRenderbuffer;
+ using theBaseClass_t::glBindRenderbuffer;
+ using theBaseClass_t::glDeleteRenderbuffers;
+ using theBaseClass_t::glGenRenderbuffers;
+ using theBaseClass_t::glRenderbufferStorage;
+ using theBaseClass_t::glGetRenderbufferParameteriv;
+ using theBaseClass_t::glIsFramebuffer;
+ using theBaseClass_t::glBindFramebuffer;
+ using theBaseClass_t::glDeleteFramebuffers;
+ using theBaseClass_t::glGenFramebuffers;
+ using theBaseClass_t::glCheckFramebufferStatus;
+ using theBaseClass_t::glFramebufferTexture1D;
+ using theBaseClass_t::glFramebufferTexture2D;
+ using theBaseClass_t::glFramebufferTexture3D;
+ using theBaseClass_t::glFramebufferRenderbuffer;
+ using theBaseClass_t::glGetFramebufferAttachmentParameteriv;
+ using theBaseClass_t::glGenerateMipmap;
+ using theBaseClass_t::glBlitFramebuffer;
+ using theBaseClass_t::glRenderbufferStorageMultisample;
+ using theBaseClass_t::glFramebufferTextureLayer;
+
+public: //! @name GL_ARB_vertex_array_object (added to OpenGL 3.0 core)
+
+ using theBaseClass_t::glBindVertexArray;
+ using theBaseClass_t::glDeleteVertexArrays;
+ using theBaseClass_t::glGenVertexArrays;
+ using theBaseClass_t::glIsVertexArray;
+
+public: //! @name GL_ARB_map_buffer_range (added to OpenGL 3.0 core)
+
+ using theBaseClass_t::glMapBufferRange;
+ using theBaseClass_t::glFlushMappedBufferRange;
+
+public: //! @name OpenGL 3.0 additives to 2.1
+
+ using theBaseClass_t::glColorMaski;
+ using theBaseClass_t::glGetBooleani_v;
+ using theBaseClass_t::glGetIntegeri_v;
+ using theBaseClass_t::glEnablei;
+ using theBaseClass_t::glDisablei;
+ using theBaseClass_t::glIsEnabledi;
+ using theBaseClass_t::glBeginTransformFeedback;
+ using theBaseClass_t::glEndTransformFeedback;
+ using theBaseClass_t::glBindBufferRange;
+ using theBaseClass_t::glBindBufferBase;
+ using theBaseClass_t::glTransformFeedbackVaryings;
+ using theBaseClass_t::glGetTransformFeedbackVarying;
+ using theBaseClass_t::glClampColor;
+ using theBaseClass_t::glBeginConditionalRender;
+ using theBaseClass_t::glEndConditionalRender;
+ using theBaseClass_t::glVertexAttribIPointer;
+ using theBaseClass_t::glGetVertexAttribIiv;
+ using theBaseClass_t::glGetVertexAttribIuiv;
+ using theBaseClass_t::glVertexAttribI1i;
+ using theBaseClass_t::glVertexAttribI2i;
+ using theBaseClass_t::glVertexAttribI3i;
+ using theBaseClass_t::glVertexAttribI4i;
+ using theBaseClass_t::glVertexAttribI1ui;
+ using theBaseClass_t::glVertexAttribI2ui;
+ using theBaseClass_t::glVertexAttribI3ui;
+ using theBaseClass_t::glVertexAttribI4ui;
+ using theBaseClass_t::glVertexAttribI1iv;
+ using theBaseClass_t::glVertexAttribI2iv;
+ using theBaseClass_t::glVertexAttribI3iv;
+ using theBaseClass_t::glVertexAttribI4iv;
+ using theBaseClass_t::glVertexAttribI1uiv;
+ using theBaseClass_t::glVertexAttribI2uiv;
+ using theBaseClass_t::glVertexAttribI3uiv;
+ using theBaseClass_t::glVertexAttribI4uiv;
+ using theBaseClass_t::glVertexAttribI4bv;
+ using theBaseClass_t::glVertexAttribI4sv;
+ using theBaseClass_t::glVertexAttribI4ubv;
+ using theBaseClass_t::glVertexAttribI4usv;
+ using theBaseClass_t::glGetUniformuiv;
+ using theBaseClass_t::glBindFragDataLocation;
+ using theBaseClass_t::glGetFragDataLocation;
+ using theBaseClass_t::glUniform1ui;
+ using theBaseClass_t::glUniform2ui;
+ using theBaseClass_t::glUniform3ui;
+ using theBaseClass_t::glUniform4ui;
+ using theBaseClass_t::glUniform1uiv;
+ using theBaseClass_t::glUniform2uiv;
+ using theBaseClass_t::glUniform3uiv;
+ using theBaseClass_t::glUniform4uiv;
+ using theBaseClass_t::glTexParameterIiv;
+ using theBaseClass_t::glTexParameterIuiv;
+ using theBaseClass_t::glGetTexParameterIiv;
+ using theBaseClass_t::glGetTexParameterIuiv;
+ using theBaseClass_t::glClearBufferiv;
+ using theBaseClass_t::glClearBufferuiv;
+ using theBaseClass_t::glClearBufferfv;
+ using theBaseClass_t::glClearBufferfi;
+ using theBaseClass_t::glGetStringi;
+
+};
+
+//! OpenGL 3.0 core based on 2.1 version.
+typedef OpenGl_TmplCore30<OpenGl_GlCore21> OpenGl_GlCore30;
+
+//! OpenGL 3.0 without deprecated entry points.
+//! Notice that this doesn't actually corresponds to GL3.0 forward profile!
+typedef OpenGl_TmplCore30<OpenGl_GlCore21Fwd> OpenGl_GlCore30Fwd;
+
+#endif // _OpenGl_GlCore30_Header
--- /dev/null
+// Created on: 2014-03-17
+// Created by: Kirill GAVRILOV
+// Copyright (c) 2014 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
+
+#ifndef _OpenGl_GlCore31_Header
+#define _OpenGl_GlCore31_Header
+
+#include <OpenGl_GlCore30.hxx>
+
+//! OpenGL 3.1 definition.
+template<typename theBaseClass_t>
+struct OpenGl_TmplCore31 : public theBaseClass_t
+{
+
+public: //! @name GL_ARB_uniform_buffer_object (added to OpenGL 3.1 core)
+
+ using theBaseClass_t::glGetUniformIndices;
+ using theBaseClass_t::glGetActiveUniformsiv;
+ using theBaseClass_t::glGetActiveUniformName;
+ using theBaseClass_t::glGetUniformBlockIndex;
+ using theBaseClass_t::glGetActiveUniformBlockiv;
+ using theBaseClass_t::glGetActiveUniformBlockName;
+ using theBaseClass_t::glUniformBlockBinding;
+
+public: //! @name GL_ARB_copy_buffer (added to OpenGL 3.1 core)
+
+ using theBaseClass_t::glCopyBufferSubData;
+
+public: //! @name OpenGL 3.1 additives to 3.0
+
+ using theBaseClass_t::glDrawArraysInstanced;
+ using theBaseClass_t::glDrawElementsInstanced;
+ using theBaseClass_t::glTexBuffer;
+ using theBaseClass_t::glPrimitiveRestartIndex;
+
+};
+
+//! OpenGL 3.1 compatibility profile.
+typedef OpenGl_TmplCore31<OpenGl_GlCore30> OpenGl_GlCore31Back;
+
+//! OpenGL 3.1 core profile (without removed entry points marked as deprecated in 3.0).
+//! Notice that GLSL versions 1.10 and 1.20 also removed in 3.1!
+typedef OpenGl_TmplCore31<OpenGl_GlCore30Fwd> OpenGl_GlCore31;
+
+#endif // _OpenGl_GlCore31_Header
--- /dev/null
+// Created on: 2014-03-17
+// Created by: Kirill GAVRILOV
+// Copyright (c) 2014 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
+
+#ifndef _OpenGl_GlCore32_Header
+#define _OpenGl_GlCore32_Header
+
+#include <OpenGl_GlCore31.hxx>
+
+//! OpenGL 3.2 definition.
+template<typename theBaseClass_t>
+struct OpenGl_TmplCore32 : public theBaseClass_t
+{
+
+public: //! @name GL_ARB_draw_elements_base_vertex (added to OpenGL 3.2 core)
+
+ using theBaseClass_t::glDrawElementsBaseVertex;
+ using theBaseClass_t::glDrawRangeElementsBaseVertex;
+ using theBaseClass_t::glDrawElementsInstancedBaseVertex;
+ using theBaseClass_t::glMultiDrawElementsBaseVertex;
+
+public: //! @name GL_ARB_provoking_vertex (added to OpenGL 3.2 core)
+
+ using theBaseClass_t::glProvokingVertex;
+
+public: //! @name GL_ARB_sync (added to OpenGL 3.2 core)
+
+ using theBaseClass_t::glFenceSync;
+ using theBaseClass_t::glIsSync;
+ using theBaseClass_t::glDeleteSync;
+ using theBaseClass_t::glClientWaitSync;
+ using theBaseClass_t::glWaitSync;
+ using theBaseClass_t::glGetInteger64v;
+ using theBaseClass_t::glGetSynciv;
+
+public: //! @name GL_ARB_texture_multisample (added to OpenGL 3.2 core)
+
+ using theBaseClass_t::glTexImage2DMultisample;
+ using theBaseClass_t::glTexImage3DMultisample;
+ using theBaseClass_t::glGetMultisamplefv;
+ using theBaseClass_t::glSampleMaski;
+
+public: //! @name OpenGL 3.2 additives to 3.1
+
+ using theBaseClass_t::glGetInteger64i_v;
+ using theBaseClass_t::glGetBufferParameteri64v;
+ using theBaseClass_t::glFramebufferTexture;
+
+};
+
+//! OpenGL 3.2 compatibility profile.
+typedef OpenGl_TmplCore32<OpenGl_GlCore31Back> OpenGl_GlCore32Back;
+
+//! OpenGL 3.2 core profile.
+typedef OpenGl_TmplCore32<OpenGl_GlCore31> OpenGl_GlCore32;
+
+#endif // _OpenGl_GlCore32_Header
--- /dev/null
+// Created on: 2014-03-17
+// Created by: Kirill GAVRILOV
+// Copyright (c) 2014 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
+
+#ifndef _OpenGl_GlCore33_Header
+#define _OpenGl_GlCore33_Header
+
+#include <OpenGl_GlCore32.hxx>
+
+//! OpenGL 3.3 definition.
+template<typename theBaseClass_t>
+struct OpenGl_TmplCore33 : public theBaseClass_t
+{
+
+public: //! @name GL_ARB_blend_func_extended (added to OpenGL 3.3 core)
+
+ using theBaseClass_t::glBindFragDataLocationIndexed;
+ using theBaseClass_t::glGetFragDataIndex;
+
+public: //! @name GL_ARB_sampler_objects (added to OpenGL 3.3 core)
+
+ using theBaseClass_t::glGenSamplers;
+ using theBaseClass_t::glDeleteSamplers;
+ using theBaseClass_t::glIsSampler;
+ using theBaseClass_t::glBindSampler;
+ using theBaseClass_t::glSamplerParameteri;
+ using theBaseClass_t::glSamplerParameteriv;
+ using theBaseClass_t::glSamplerParameterf;
+ using theBaseClass_t::glSamplerParameterfv;
+ using theBaseClass_t::glSamplerParameterIiv;
+ using theBaseClass_t::glSamplerParameterIuiv;
+ using theBaseClass_t::glGetSamplerParameteriv;
+ using theBaseClass_t::glGetSamplerParameterIiv;
+ using theBaseClass_t::glGetSamplerParameterfv;
+ using theBaseClass_t::glGetSamplerParameterIuiv;
+
+public: //! @name GL_ARB_timer_query (added to OpenGL 3.3 core)
+
+ using theBaseClass_t::glQueryCounter;
+ using theBaseClass_t::glGetQueryObjecti64v;
+ using theBaseClass_t::glGetQueryObjectui64v;
+
+public: //! @name GL_ARB_vertex_type_2_10_10_10_rev (added to OpenGL 3.3 core)
+
+ using theBaseClass_t::glVertexP2ui;
+ using theBaseClass_t::glVertexP2uiv;
+ using theBaseClass_t::glVertexP3ui;
+ using theBaseClass_t::glVertexP3uiv;
+ using theBaseClass_t::glVertexP4ui;
+ using theBaseClass_t::glVertexP4uiv;
+ using theBaseClass_t::glTexCoordP1ui;
+ using theBaseClass_t::glTexCoordP1uiv;
+ using theBaseClass_t::glTexCoordP2ui;
+ using theBaseClass_t::glTexCoordP2uiv;
+ using theBaseClass_t::glTexCoordP3ui;
+ using theBaseClass_t::glTexCoordP3uiv;
+ using theBaseClass_t::glTexCoordP4ui;
+ using theBaseClass_t::glTexCoordP4uiv;
+ using theBaseClass_t::glMultiTexCoordP1ui;
+ using theBaseClass_t::glMultiTexCoordP1uiv;
+ using theBaseClass_t::glMultiTexCoordP2ui;
+ using theBaseClass_t::glMultiTexCoordP2uiv;
+ using theBaseClass_t::glMultiTexCoordP3ui;
+ using theBaseClass_t::glMultiTexCoordP3uiv;
+ using theBaseClass_t::glMultiTexCoordP4ui;
+ using theBaseClass_t::glMultiTexCoordP4uiv;
+ using theBaseClass_t::glNormalP3ui;
+ using theBaseClass_t::glNormalP3uiv;
+ using theBaseClass_t::glColorP3ui;
+ using theBaseClass_t::glColorP3uiv;
+ using theBaseClass_t::glColorP4ui;
+ using theBaseClass_t::glColorP4uiv;
+ using theBaseClass_t::glSecondaryColorP3ui;
+ using theBaseClass_t::glSecondaryColorP3uiv;
+ using theBaseClass_t::glVertexAttribP1ui;
+ using theBaseClass_t::glVertexAttribP1uiv;
+ using theBaseClass_t::glVertexAttribP2ui;
+ using theBaseClass_t::glVertexAttribP2uiv;
+ using theBaseClass_t::glVertexAttribP3ui;
+ using theBaseClass_t::glVertexAttribP3uiv;
+ using theBaseClass_t::glVertexAttribP4ui;
+ using theBaseClass_t::glVertexAttribP4uiv;
+
+public: //! @name OpenGL 3.3 additives to 3.2
+
+ using theBaseClass_t::glVertexAttribDivisor;
+
+};
+
+//! OpenGL 3.3 compatibility profile.
+typedef OpenGl_TmplCore33<OpenGl_GlCore32Back> OpenGl_GlCore33Back;
+
+//! OpenGL 3.3 core profile.
+typedef OpenGl_TmplCore33<OpenGl_GlCore32> OpenGl_GlCore33;
+
+#endif // _OpenGl_GlCore33_Header
--- /dev/null
+// Created on: 2014-03-17
+// Created by: Kirill GAVRILOV
+// Copyright (c) 2014 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
+
+#ifndef _OpenGl_GlCore40_Header
+#define _OpenGl_GlCore40_Header
+
+#include <OpenGl_GlCore33.hxx>
+
+//! OpenGL 4.0 definition.
+template<typename theBaseClass_t>
+struct OpenGl_TmplCore40 : public theBaseClass_t
+{
+
+public: //! @name GL_ARB_draw_indirect (added to OpenGL 4.0 core)
+
+ using theBaseClass_t::glDrawArraysIndirect;
+ using theBaseClass_t::glDrawElementsIndirect;
+
+public: //! @name GL_ARB_gpu_shader_fp64 (added to OpenGL 4.0 core)
+
+ using theBaseClass_t::glUniform1d;
+ using theBaseClass_t::glUniform2d;
+ using theBaseClass_t::glUniform3d;
+ using theBaseClass_t::glUniform4d;
+ using theBaseClass_t::glUniform1dv;
+ using theBaseClass_t::glUniform2dv;
+ using theBaseClass_t::glUniform3dv;
+ using theBaseClass_t::glUniform4dv;
+ using theBaseClass_t::glUniformMatrix2dv;
+ using theBaseClass_t::glUniformMatrix3dv;
+ using theBaseClass_t::glUniformMatrix4dv;
+ using theBaseClass_t::glUniformMatrix2x3dv;
+ using theBaseClass_t::glUniformMatrix2x4dv;
+ using theBaseClass_t::glUniformMatrix3x2dv;
+ using theBaseClass_t::glUniformMatrix3x4dv;
+ using theBaseClass_t::glUniformMatrix4x2dv;
+ using theBaseClass_t::glUniformMatrix4x3dv;
+ using theBaseClass_t::glGetUniformdv;
+
+public: //! @name GL_ARB_shader_subroutine (added to OpenGL 4.0 core)
+
+ using theBaseClass_t::glGetSubroutineUniformLocation;
+ using theBaseClass_t::glGetSubroutineIndex;
+ using theBaseClass_t::glGetActiveSubroutineUniformiv;
+ using theBaseClass_t::glGetActiveSubroutineUniformName;
+ using theBaseClass_t::glGetActiveSubroutineName;
+ using theBaseClass_t::glUniformSubroutinesuiv;
+ using theBaseClass_t::glGetUniformSubroutineuiv;
+ using theBaseClass_t::glGetProgramStageiv;
+
+public: //! @name GL_ARB_tessellation_shader (added to OpenGL 4.0 core)
+
+ using theBaseClass_t::glPatchParameteri;
+ using theBaseClass_t::glPatchParameterfv;
+
+public: //! @name GL_ARB_transform_feedback2 (added to OpenGL 4.0 core)
+
+ using theBaseClass_t::glBindTransformFeedback;
+ using theBaseClass_t::glDeleteTransformFeedbacks;
+ using theBaseClass_t::glGenTransformFeedbacks;
+ using theBaseClass_t::glIsTransformFeedback;
+ using theBaseClass_t::glPauseTransformFeedback;
+ using theBaseClass_t::glResumeTransformFeedback;
+ using theBaseClass_t::glDrawTransformFeedback;
+
+public: //! @name GL_ARB_transform_feedback3 (added to OpenGL 4.0 core)
+
+ using theBaseClass_t::glDrawTransformFeedbackStream;
+ using theBaseClass_t::glBeginQueryIndexed;
+ using theBaseClass_t::glEndQueryIndexed;
+ using theBaseClass_t::glGetQueryIndexediv;
+
+public: //! @name OpenGL 4.0 additives to 3.3
+
+ using theBaseClass_t::glMinSampleShading;
+ using theBaseClass_t::glBlendEquationi;
+ using theBaseClass_t::glBlendEquationSeparatei;
+ using theBaseClass_t::glBlendFunci;
+ using theBaseClass_t::glBlendFuncSeparatei;
+
+};
+
+//! OpenGL 4.0 compatibility profile.
+typedef OpenGl_TmplCore40<OpenGl_GlCore33Back> OpenGl_GlCore40Back;
+
+//! OpenGL 4.0 core profile.
+typedef OpenGl_TmplCore40<OpenGl_GlCore33> OpenGl_GlCore40;
+
+#endif // _OpenGl_GlCore40_Header
--- /dev/null
+// Created on: 2014-03-17
+// Created by: Kirill GAVRILOV
+// Copyright (c) 2014 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
+
+#ifndef _OpenGl_GlCore41_Header
+#define _OpenGl_GlCore41_Header
+
+#include <OpenGl_GlCore40.hxx>
+
+//! OpenGL 4.1 definition.
+template<typename theBaseClass_t>
+struct OpenGl_TmplCore41 : public theBaseClass_t
+{
+
+public: //! @name GL_ARB_ES2_compatibility (added to OpenGL 4.1 core)
+
+ using theBaseClass_t::glReleaseShaderCompiler;
+ using theBaseClass_t::glShaderBinary;
+ using theBaseClass_t::glGetShaderPrecisionFormat;
+ using theBaseClass_t::glDepthRangef;
+ using theBaseClass_t::glClearDepthf;
+
+public: //! @name GL_ARB_get_program_binary (added to OpenGL 4.1 core)
+
+ using theBaseClass_t::glGetProgramBinary;
+ using theBaseClass_t::glProgramBinary;
+ using theBaseClass_t::glProgramParameteri;
+
+public: //! @name GL_ARB_separate_shader_objects (added to OpenGL 4.1 core)
+
+ using theBaseClass_t::glUseProgramStages;
+ using theBaseClass_t::glActiveShaderProgram;
+ using theBaseClass_t::glCreateShaderProgramv;
+ using theBaseClass_t::glBindProgramPipeline;
+ using theBaseClass_t::glDeleteProgramPipelines;
+ using theBaseClass_t::glGenProgramPipelines;
+ using theBaseClass_t::glIsProgramPipeline;
+ using theBaseClass_t::glGetProgramPipelineiv;
+ using theBaseClass_t::glProgramUniform1i;
+ using theBaseClass_t::glProgramUniform1iv;
+ using theBaseClass_t::glProgramUniform1f;
+ using theBaseClass_t::glProgramUniform1fv;
+ using theBaseClass_t::glProgramUniform1d;
+ using theBaseClass_t::glProgramUniform1dv;
+ using theBaseClass_t::glProgramUniform1ui;
+ using theBaseClass_t::glProgramUniform1uiv;
+ using theBaseClass_t::glProgramUniform2i;
+ using theBaseClass_t::glProgramUniform2iv;
+ using theBaseClass_t::glProgramUniform2f;
+ using theBaseClass_t::glProgramUniform2fv;
+ using theBaseClass_t::glProgramUniform2d;
+ using theBaseClass_t::glProgramUniform2dv;
+ using theBaseClass_t::glProgramUniform2ui;
+ using theBaseClass_t::glProgramUniform2uiv;
+ using theBaseClass_t::glProgramUniform3i;
+ using theBaseClass_t::glProgramUniform3iv;
+ using theBaseClass_t::glProgramUniform3f;
+ using theBaseClass_t::glProgramUniform3fv;
+ using theBaseClass_t::glProgramUniform3d;
+ using theBaseClass_t::glProgramUniform3dv;
+ using theBaseClass_t::glProgramUniform3ui;
+ using theBaseClass_t::glProgramUniform3uiv;
+ using theBaseClass_t::glProgramUniform4i;
+ using theBaseClass_t::glProgramUniform4iv;
+ using theBaseClass_t::glProgramUniform4f;
+ using theBaseClass_t::glProgramUniform4fv;
+ using theBaseClass_t::glProgramUniform4d;
+ using theBaseClass_t::glProgramUniform4dv;
+ using theBaseClass_t::glProgramUniform4ui;
+ using theBaseClass_t::glProgramUniform4uiv;
+ using theBaseClass_t::glProgramUniformMatrix2fv;
+ using theBaseClass_t::glProgramUniformMatrix3fv;
+ using theBaseClass_t::glProgramUniformMatrix4fv;
+ using theBaseClass_t::glProgramUniformMatrix2dv;
+ using theBaseClass_t::glProgramUniformMatrix3dv;
+ using theBaseClass_t::glProgramUniformMatrix4dv;
+ using theBaseClass_t::glProgramUniformMatrix2x3fv;
+ using theBaseClass_t::glProgramUniformMatrix3x2fv;
+ using theBaseClass_t::glProgramUniformMatrix2x4fv;
+ using theBaseClass_t::glProgramUniformMatrix4x2fv;
+ using theBaseClass_t::glProgramUniformMatrix3x4fv;
+ using theBaseClass_t::glProgramUniformMatrix4x3fv;
+ using theBaseClass_t::glProgramUniformMatrix2x3dv;
+ using theBaseClass_t::glProgramUniformMatrix3x2dv;
+ using theBaseClass_t::glProgramUniformMatrix2x4dv;
+ using theBaseClass_t::glProgramUniformMatrix4x2dv;
+ using theBaseClass_t::glProgramUniformMatrix3x4dv;
+ using theBaseClass_t::glProgramUniformMatrix4x3dv;
+ using theBaseClass_t::glValidateProgramPipeline;
+ using theBaseClass_t::glGetProgramPipelineInfoLog;
+
+public: //! @name GL_ARB_vertex_attrib_64bit (added to OpenGL 4.1 core)
+
+ using theBaseClass_t::glVertexAttribL1d;
+ using theBaseClass_t::glVertexAttribL2d;
+ using theBaseClass_t::glVertexAttribL3d;
+ using theBaseClass_t::glVertexAttribL4d;
+ using theBaseClass_t::glVertexAttribL1dv;
+ using theBaseClass_t::glVertexAttribL2dv;
+ using theBaseClass_t::glVertexAttribL3dv;
+ using theBaseClass_t::glVertexAttribL4dv;
+ using theBaseClass_t::glVertexAttribLPointer;
+ using theBaseClass_t::glGetVertexAttribLdv;
+
+public: //! @name GL_ARB_viewport_array (added to OpenGL 4.1 core)
+
+ using theBaseClass_t::glViewportArrayv;
+ using theBaseClass_t::glViewportIndexedf;
+ using theBaseClass_t::glViewportIndexedfv;
+ using theBaseClass_t::glScissorArrayv;
+ using theBaseClass_t::glScissorIndexed;
+ using theBaseClass_t::glScissorIndexedv;
+ using theBaseClass_t::glDepthRangeArrayv;
+ using theBaseClass_t::glDepthRangeIndexed;
+ using theBaseClass_t::glGetFloati_v;
+ using theBaseClass_t::glGetDoublei_v;
+
+public: //! @name OpenGL 4.1 additives to 4.0
+
+};
+
+//! OpenGL 4.1 compatibility profile.
+typedef OpenGl_TmplCore41<OpenGl_GlCore40Back> OpenGl_GlCore41Back;
+
+//! OpenGL 4.1 core profile.
+typedef OpenGl_TmplCore41<OpenGl_GlCore40> OpenGl_GlCore41;
+
+#endif // _OpenGl_GlCore41_Header
--- /dev/null
+// Created on: 2014-03-17
+// Created by: Kirill GAVRILOV
+// Copyright (c) 2014 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
+
+#ifndef _OpenGl_GlCore42_Header
+#define _OpenGl_GlCore42_Header
+
+#include <OpenGl_GlCore41.hxx>
+
+//! OpenGL 4.2 definition.
+template<typename theBaseClass_t>
+struct OpenGl_TmplCore42 : public theBaseClass_t
+{
+
+public: //! @name GL_ARB_base_instance (added to OpenGL 4.2 core)
+
+ using theBaseClass_t::glDrawArraysInstancedBaseInstance;
+ using theBaseClass_t::glDrawElementsInstancedBaseInstance;
+ using theBaseClass_t::glDrawElementsInstancedBaseVertexBaseInstance;
+
+public: //! @name GL_ARB_transform_feedback_instanced (added to OpenGL 4.2 core)
+
+ using theBaseClass_t::glDrawTransformFeedbackInstanced;
+ using theBaseClass_t::glDrawTransformFeedbackStreamInstanced;
+
+public: //! @name GL_ARB_internalformat_query (added to OpenGL 4.2 core)
+
+ using theBaseClass_t::glGetInternalformativ;
+
+public: //! @name GL_ARB_shader_atomic_counters (added to OpenGL 4.2 core)
+
+ using theBaseClass_t::glGetActiveAtomicCounterBufferiv;
+
+public: //! @name GL_ARB_shader_image_load_store (added to OpenGL 4.2 core)
+
+ using theBaseClass_t::glBindImageTexture;
+ using theBaseClass_t::glMemoryBarrier;
+
+public: //! @name GL_ARB_texture_storage (added to OpenGL 4.2 core)
+
+ using theBaseClass_t::glTexStorage1D;
+ using theBaseClass_t::glTexStorage2D;
+ using theBaseClass_t::glTexStorage3D;
+ using theBaseClass_t::glTextureStorage1DEXT;
+ using theBaseClass_t::glTextureStorage2DEXT;
+ using theBaseClass_t::glTextureStorage3DEXT;
+
+};
+
+//! OpenGL 4.2 compatibility profile.
+typedef OpenGl_TmplCore42<OpenGl_GlCore41Back> OpenGl_GlCore42Back;
+
+//! OpenGL 4.2 core profile.
+typedef OpenGl_TmplCore42<OpenGl_GlCore41> OpenGl_GlCore42;
+
+
+#endif // _OpenGl_GlCore42_Header
--- /dev/null
+// Created on: 2014-03-17
+// Created by: Kirill GAVRILOV
+// Copyright (c) 2014 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
+
+#ifndef _OpenGl_GlCore43_Header
+#define _OpenGl_GlCore43_Header
+
+#include <OpenGl_GlCore42.hxx>
+
+//! OpenGL 4.3 definition.
+template<typename theBaseClass_t>
+struct OpenGl_TmplCore43 : public theBaseClass_t
+{
+
+public: //! @name OpenGL 4.3 additives to 4.2
+
+ using theBaseClass_t::glClearBufferData;
+ using theBaseClass_t::glClearBufferSubData;
+ using theBaseClass_t::glDispatchCompute;
+ using theBaseClass_t::glDispatchComputeIndirect;
+ using theBaseClass_t::glCopyImageSubData;
+ using theBaseClass_t::glFramebufferParameteri;
+ using theBaseClass_t::glGetFramebufferParameteriv;
+ using theBaseClass_t::glGetInternalformati64v;
+ using theBaseClass_t::glInvalidateTexSubImage;
+ using theBaseClass_t::glInvalidateTexImage;
+ using theBaseClass_t::glInvalidateBufferSubData;
+ using theBaseClass_t::glInvalidateBufferData;
+ using theBaseClass_t::glInvalidateFramebuffer;
+ using theBaseClass_t::glInvalidateSubFramebuffer;
+ using theBaseClass_t::glMultiDrawArraysIndirect;
+ using theBaseClass_t::glMultiDrawElementsIndirect;
+ using theBaseClass_t::glGetProgramInterfaceiv;
+ using theBaseClass_t::glGetProgramResourceIndex;
+ using theBaseClass_t::glGetProgramResourceName;
+ using theBaseClass_t::glGetProgramResourceiv;
+ using theBaseClass_t::glGetProgramResourceLocation;
+ using theBaseClass_t::glGetProgramResourceLocationIndex;
+ using theBaseClass_t::glShaderStorageBlockBinding;
+ using theBaseClass_t::glTexBufferRange;
+ using theBaseClass_t::glTexStorage2DMultisample;
+ using theBaseClass_t::glTexStorage3DMultisample;
+ using theBaseClass_t::glTextureView;
+ using theBaseClass_t::glBindVertexBuffer;
+ using theBaseClass_t::glVertexAttribFormat;
+ using theBaseClass_t::glVertexAttribIFormat;
+ using theBaseClass_t::glVertexAttribLFormat;
+ using theBaseClass_t::glVertexAttribBinding;
+ using theBaseClass_t::glVertexBindingDivisor;
+ using theBaseClass_t::glDebugMessageControl;
+ using theBaseClass_t::glDebugMessageInsert;
+ using theBaseClass_t::glDebugMessageCallback;
+ using theBaseClass_t::glGetDebugMessageLog;
+ using theBaseClass_t::glPushDebugGroup;
+ using theBaseClass_t::glPopDebugGroup;
+ using theBaseClass_t::glObjectLabel;
+ using theBaseClass_t::glGetObjectLabel;
+ using theBaseClass_t::glObjectPtrLabel;
+ using theBaseClass_t::glGetObjectPtrLabel;
+
+};
+
+//! OpenGL 4.3 compatibility profile.
+typedef OpenGl_TmplCore43<OpenGl_GlCore42Back> OpenGl_GlCore43Back;
+
+//! OpenGL 4.3 core profile.
+typedef OpenGl_TmplCore43<OpenGl_GlCore42> OpenGl_GlCore43;
+
+#endif // _OpenGl_GlCore43_Header
--- /dev/null
+// Created on: 2014-03-17
+// Created by: Kirill GAVRILOV
+// Copyright (c) 2014 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
+
+#ifndef _OpenGl_GlCore44_Header
+#define _OpenGl_GlCore44_Header
+
+#include <OpenGl_GlCore43.hxx>
+
+//! OpenGL 4.4 definition.
+template<typename theBaseClass_t>
+struct OpenGl_TmplCore44 : public theBaseClass_t
+{
+
+public: //! @name OpenGL 4.4 additives to 4.3
+
+ using theBaseClass_t::glBufferStorage;
+ using theBaseClass_t::glClearTexImage;
+ using theBaseClass_t::glClearTexSubImage;
+ using theBaseClass_t::glBindBuffersBase;
+ using theBaseClass_t::glBindBuffersRange;
+ using theBaseClass_t::glBindTextures;
+ using theBaseClass_t::glBindSamplers;
+ using theBaseClass_t::glBindImageTextures;
+ using theBaseClass_t::glBindVertexBuffers;
+
+};
+
+//! OpenGL 4.4 compatibility profile.
+typedef OpenGl_TmplCore44<OpenGl_GlCore43Back> OpenGl_GlCore44Back;
+
+//! OpenGL 4.4 core profile.
+typedef OpenGl_TmplCore44<OpenGl_GlCore43> OpenGl_GlCore44;
+
+#endif // _OpenGl_GlCore44_Header
--- /dev/null
+// Created on: 2014-03-17
+// Created by: Kirill GAVRILOV
+// Copyright (c) 2014 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
+
+#ifndef _OpenGl_GlFunctions_Header
+#define _OpenGl_GlFunctions_Header
+
+// required for correct APIENTRY definition
+#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
+ #define WIN32_LEAN_AND_MEAN
+ #include <windows.h>
+#endif
+
+#ifndef APIENTRY
+ #define APIENTRY
+#endif
+#ifndef APIENTRYP
+ #define APIENTRYP APIENTRY *
+#endif
+#ifndef GLAPI
+ #define GLAPI extern
+#endif
+
+// exclude modern definitions and system-provided glext.h, should be defined before gl.h inclusion
+#define GL_GLEXT_LEGACY
+
+// include main OpenGL header provided with system
+#if defined(__APPLE__)
+ #include <OpenGL/gl.h>
+ #include <OpenGL/glu.h>
+ #define __X_GL_H // prevent chaotic gl.h inclusions to avoid compile errors
+#else
+ #include <GL/gl.h>
+ #include <GL/glu.h>
+#endif
+
+#include <InterfaceGraphic.hxx>
+#include <InterfaceGraphic_tgl_all.hxx>
+#include <InterfaceGraphic_telem.hxx>
+
+// GL version can be defined by system gl.h header
+#undef GL_VERSION_1_2
+#undef GL_VERSION_1_3
+#undef GL_VERSION_1_4
+#undef GL_VERSION_1_5
+#undef GL_VERSION_2_0
+#undef GL_VERSION_2_1
+#undef GL_VERSION_3_0
+#undef GL_VERSION_3_1
+#undef GL_VERSION_3_2
+#undef GL_VERSION_3_3
+#undef GL_VERSION_4_0
+#undef GL_VERSION_4_1
+#undef GL_VERSION_4_2
+#undef GL_VERSION_4_3
+#undef GL_VERSION_4_4
+
+// include glext.h provided by Khronos group
+#include <glext.h>
+
+//! Mega structure defines the complete list of OpenGL functions.
+struct OpenGl_GlFunctions
+{
+
+public: //! @name OpenGL 1.2
+
+ PFNGLBLENDCOLORPROC glBlendColor;
+ PFNGLBLENDEQUATIONPROC glBlendEquation;
+ PFNGLDRAWRANGEELEMENTSPROC glDrawRangeElements;
+ PFNGLTEXIMAGE3DPROC glTexImage3D;
+ PFNGLTEXSUBIMAGE3DPROC glTexSubImage3D;
+ PFNGLCOPYTEXSUBIMAGE3DPROC glCopyTexSubImage3D;
+
+public: //! @name OpenGL 1.3
+
+ PFNGLACTIVETEXTUREPROC glActiveTexture;
+ PFNGLSAMPLECOVERAGEPROC glSampleCoverage;
+ PFNGLCOMPRESSEDTEXIMAGE3DPROC glCompressedTexImage3D;
+ PFNGLCOMPRESSEDTEXIMAGE2DPROC glCompressedTexImage2D;
+ PFNGLCOMPRESSEDTEXIMAGE1DPROC glCompressedTexImage1D;
+ PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC glCompressedTexSubImage3D;
+ PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC glCompressedTexSubImage2D;
+ PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC glCompressedTexSubImage1D;
+ PFNGLGETCOMPRESSEDTEXIMAGEPROC glGetCompressedTexImage;
+
+ PFNGLCLIENTACTIVETEXTUREPROC glClientActiveTexture;
+ PFNGLMULTITEXCOORD1DPROC glMultiTexCoord1d;
+ PFNGLMULTITEXCOORD1DVPROC glMultiTexCoord1dv;
+ PFNGLMULTITEXCOORD1FPROC glMultiTexCoord1f;
+ PFNGLMULTITEXCOORD1FVPROC glMultiTexCoord1fv;
+ PFNGLMULTITEXCOORD1IPROC glMultiTexCoord1i;
+ PFNGLMULTITEXCOORD1IVPROC glMultiTexCoord1iv;
+ PFNGLMULTITEXCOORD1SPROC glMultiTexCoord1s;
+ PFNGLMULTITEXCOORD1SVPROC glMultiTexCoord1sv;
+ PFNGLMULTITEXCOORD2DPROC glMultiTexCoord2d;
+ PFNGLMULTITEXCOORD2DVPROC glMultiTexCoord2dv;
+ PFNGLMULTITEXCOORD2FPROC glMultiTexCoord2f;
+ PFNGLMULTITEXCOORD2FVPROC glMultiTexCoord2fv;
+ PFNGLMULTITEXCOORD2IPROC glMultiTexCoord2i;
+ PFNGLMULTITEXCOORD2IVPROC glMultiTexCoord2iv;
+ PFNGLMULTITEXCOORD2SPROC glMultiTexCoord2s;
+ PFNGLMULTITEXCOORD2SVPROC glMultiTexCoord2sv;
+ PFNGLMULTITEXCOORD3DPROC glMultiTexCoord3d;
+ PFNGLMULTITEXCOORD3DVPROC glMultiTexCoord3dv;
+ PFNGLMULTITEXCOORD3FPROC glMultiTexCoord3f;
+ PFNGLMULTITEXCOORD3FVPROC glMultiTexCoord3fv;
+ PFNGLMULTITEXCOORD3IPROC glMultiTexCoord3i;
+ PFNGLMULTITEXCOORD3IVPROC glMultiTexCoord3iv;
+ PFNGLMULTITEXCOORD3SPROC glMultiTexCoord3s;
+ PFNGLMULTITEXCOORD3SVPROC glMultiTexCoord3sv;
+ PFNGLMULTITEXCOORD4DPROC glMultiTexCoord4d;
+ PFNGLMULTITEXCOORD4DVPROC glMultiTexCoord4dv;
+ PFNGLMULTITEXCOORD4FPROC glMultiTexCoord4f;
+ PFNGLMULTITEXCOORD4FVPROC glMultiTexCoord4fv;
+ PFNGLMULTITEXCOORD4IPROC glMultiTexCoord4i;
+ PFNGLMULTITEXCOORD4IVPROC glMultiTexCoord4iv;
+ PFNGLMULTITEXCOORD4SPROC glMultiTexCoord4s;
+ PFNGLMULTITEXCOORD4SVPROC glMultiTexCoord4sv;
+ PFNGLLOADTRANSPOSEMATRIXFPROC glLoadTransposeMatrixf;
+ PFNGLLOADTRANSPOSEMATRIXDPROC glLoadTransposeMatrixd;
+ PFNGLMULTTRANSPOSEMATRIXFPROC glMultTransposeMatrixf;
+ PFNGLMULTTRANSPOSEMATRIXDPROC glMultTransposeMatrixd;
+
+public: //! @name OpenGL 1.4
+
+ PFNGLBLENDFUNCSEPARATEPROC glBlendFuncSeparate;
+ PFNGLMULTIDRAWARRAYSPROC glMultiDrawArrays;
+ PFNGLMULTIDRAWELEMENTSPROC glMultiDrawElements;
+ PFNGLPOINTPARAMETERFPROC glPointParameterf;
+ PFNGLPOINTPARAMETERFVPROC glPointParameterfv;
+ PFNGLPOINTPARAMETERIPROC glPointParameteri;
+ PFNGLPOINTPARAMETERIVPROC glPointParameteriv;
+
+public: //! @name OpenGL 1.5
+
+ PFNGLGENQUERIESPROC glGenQueries;
+ PFNGLDELETEQUERIESPROC glDeleteQueries;
+ PFNGLISQUERYPROC glIsQuery;
+ PFNGLBEGINQUERYPROC glBeginQuery;
+ PFNGLENDQUERYPROC glEndQuery;
+ PFNGLGETQUERYIVPROC glGetQueryiv;
+ PFNGLGETQUERYOBJECTIVPROC glGetQueryObjectiv;
+ PFNGLGETQUERYOBJECTUIVPROC glGetQueryObjectuiv;
+ PFNGLBINDBUFFERPROC glBindBuffer;
+ PFNGLDELETEBUFFERSPROC glDeleteBuffers;
+ PFNGLGENBUFFERSPROC glGenBuffers;
+ PFNGLISBUFFERPROC glIsBuffer;
+ PFNGLBUFFERDATAPROC glBufferData;
+ PFNGLBUFFERSUBDATAPROC glBufferSubData;
+ PFNGLGETBUFFERSUBDATAPROC glGetBufferSubData;
+ PFNGLMAPBUFFERPROC glMapBuffer;
+ PFNGLUNMAPBUFFERPROC glUnmapBuffer;
+ PFNGLGETBUFFERPARAMETERIVPROC glGetBufferParameteriv;
+ PFNGLGETBUFFERPOINTERVPROC glGetBufferPointerv;
+
+public: //! @name OpenGL 2.0
+
+ PFNGLBLENDEQUATIONSEPARATEPROC glBlendEquationSeparate;
+ PFNGLDRAWBUFFERSPROC glDrawBuffers;
+ PFNGLSTENCILOPSEPARATEPROC glStencilOpSeparate;
+ PFNGLSTENCILFUNCSEPARATEPROC glStencilFuncSeparate;
+ PFNGLSTENCILMASKSEPARATEPROC glStencilMaskSeparate;
+ PFNGLATTACHSHADERPROC glAttachShader;
+ PFNGLBINDATTRIBLOCATIONPROC glBindAttribLocation;
+ PFNGLCOMPILESHADERPROC glCompileShader;
+ PFNGLCREATEPROGRAMPROC glCreateProgram;
+ PFNGLCREATESHADERPROC glCreateShader;
+ PFNGLDELETEPROGRAMPROC glDeleteProgram;
+ PFNGLDELETESHADERPROC glDeleteShader;
+ PFNGLDETACHSHADERPROC glDetachShader;
+ PFNGLDISABLEVERTEXATTRIBARRAYPROC glDisableVertexAttribArray;
+ PFNGLENABLEVERTEXATTRIBARRAYPROC glEnableVertexAttribArray;
+ PFNGLGETACTIVEATTRIBPROC glGetActiveAttrib;
+ PFNGLGETACTIVEUNIFORMPROC glGetActiveUniform;
+ PFNGLGETATTACHEDSHADERSPROC glGetAttachedShaders;
+ PFNGLGETATTRIBLOCATIONPROC glGetAttribLocation;
+ PFNGLGETPROGRAMIVPROC glGetProgramiv;
+ PFNGLGETPROGRAMINFOLOGPROC glGetProgramInfoLog;
+ PFNGLGETSHADERIVPROC glGetShaderiv;
+ PFNGLGETSHADERINFOLOGPROC glGetShaderInfoLog;
+ PFNGLGETSHADERSOURCEPROC glGetShaderSource;
+ PFNGLGETUNIFORMLOCATIONPROC glGetUniformLocation;
+ PFNGLGETUNIFORMFVPROC glGetUniformfv;
+ PFNGLGETUNIFORMIVPROC glGetUniformiv;
+ PFNGLGETVERTEXATTRIBDVPROC glGetVertexAttribdv;
+ PFNGLGETVERTEXATTRIBFVPROC glGetVertexAttribfv;
+ PFNGLGETVERTEXATTRIBIVPROC glGetVertexAttribiv;
+ PFNGLGETVERTEXATTRIBPOINTERVPROC glGetVertexAttribPointerv;
+ PFNGLISPROGRAMPROC glIsProgram;
+ PFNGLISSHADERPROC glIsShader;
+ PFNGLLINKPROGRAMPROC glLinkProgram;
+ PFNGLSHADERSOURCEPROC glShaderSource;
+ PFNGLUSEPROGRAMPROC glUseProgram;
+ PFNGLUNIFORM1FPROC glUniform1f;
+ PFNGLUNIFORM2FPROC glUniform2f;
+ PFNGLUNIFORM3FPROC glUniform3f;
+ PFNGLUNIFORM4FPROC glUniform4f;
+ PFNGLUNIFORM1IPROC glUniform1i;
+ PFNGLUNIFORM2IPROC glUniform2i;
+ PFNGLUNIFORM3IPROC glUniform3i;
+ PFNGLUNIFORM4IPROC glUniform4i;
+ PFNGLUNIFORM1FVPROC glUniform1fv;
+ PFNGLUNIFORM2FVPROC glUniform2fv;
+ PFNGLUNIFORM3FVPROC glUniform3fv;
+ PFNGLUNIFORM4FVPROC glUniform4fv;
+ PFNGLUNIFORM1IVPROC glUniform1iv;
+ PFNGLUNIFORM2IVPROC glUniform2iv;
+ PFNGLUNIFORM3IVPROC glUniform3iv;
+ PFNGLUNIFORM4IVPROC glUniform4iv;
+ PFNGLUNIFORMMATRIX2FVPROC glUniformMatrix2fv;
+ PFNGLUNIFORMMATRIX3FVPROC glUniformMatrix3fv;
+ PFNGLUNIFORMMATRIX4FVPROC glUniformMatrix4fv;
+ PFNGLVALIDATEPROGRAMPROC glValidateProgram;
+ PFNGLVERTEXATTRIB1DPROC glVertexAttrib1d;
+ PFNGLVERTEXATTRIB1DVPROC glVertexAttrib1dv;
+ PFNGLVERTEXATTRIB1FPROC glVertexAttrib1f;
+ PFNGLVERTEXATTRIB1FVPROC glVertexAttrib1fv;
+ PFNGLVERTEXATTRIB1SPROC glVertexAttrib1s;
+ PFNGLVERTEXATTRIB1SVPROC glVertexAttrib1sv;
+ PFNGLVERTEXATTRIB2DPROC glVertexAttrib2d;
+ PFNGLVERTEXATTRIB2DVPROC glVertexAttrib2dv;
+ PFNGLVERTEXATTRIB2FPROC glVertexAttrib2f;
+ PFNGLVERTEXATTRIB2FVPROC glVertexAttrib2fv;
+ PFNGLVERTEXATTRIB2SPROC glVertexAttrib2s;
+ PFNGLVERTEXATTRIB2SVPROC glVertexAttrib2sv;
+ PFNGLVERTEXATTRIB3DPROC glVertexAttrib3d;
+ PFNGLVERTEXATTRIB3DVPROC glVertexAttrib3dv;
+ PFNGLVERTEXATTRIB3FPROC glVertexAttrib3f;
+ PFNGLVERTEXATTRIB3FVPROC glVertexAttrib3fv;
+ PFNGLVERTEXATTRIB3SPROC glVertexAttrib3s;
+ PFNGLVERTEXATTRIB3SVPROC glVertexAttrib3sv;
+ PFNGLVERTEXATTRIB4NBVPROC glVertexAttrib4Nbv;
+ PFNGLVERTEXATTRIB4NIVPROC glVertexAttrib4Niv;
+ PFNGLVERTEXATTRIB4NSVPROC glVertexAttrib4Nsv;
+ PFNGLVERTEXATTRIB4NUBPROC glVertexAttrib4Nub;
+ PFNGLVERTEXATTRIB4NUBVPROC glVertexAttrib4Nubv;
+ PFNGLVERTEXATTRIB4NUIVPROC glVertexAttrib4Nuiv;
+ PFNGLVERTEXATTRIB4NUSVPROC glVertexAttrib4Nusv;
+ PFNGLVERTEXATTRIB4BVPROC glVertexAttrib4bv;
+ PFNGLVERTEXATTRIB4DPROC glVertexAttrib4d;
+ PFNGLVERTEXATTRIB4DVPROC glVertexAttrib4dv;
+ PFNGLVERTEXATTRIB4FPROC glVertexAttrib4f;
+ PFNGLVERTEXATTRIB4FVPROC glVertexAttrib4fv;
+ PFNGLVERTEXATTRIB4IVPROC glVertexAttrib4iv;
+ PFNGLVERTEXATTRIB4SPROC glVertexAttrib4s;
+ PFNGLVERTEXATTRIB4SVPROC glVertexAttrib4sv;
+ PFNGLVERTEXATTRIB4UBVPROC glVertexAttrib4ubv;
+ PFNGLVERTEXATTRIB4UIVPROC glVertexAttrib4uiv;
+ PFNGLVERTEXATTRIB4USVPROC glVertexAttrib4usv;
+ PFNGLVERTEXATTRIBPOINTERPROC glVertexAttribPointer;
+
+public: //! @name OpenGL 2.1
+
+ PFNGLUNIFORMMATRIX2X3FVPROC glUniformMatrix2x3fv;
+ PFNGLUNIFORMMATRIX3X2FVPROC glUniformMatrix3x2fv;
+ PFNGLUNIFORMMATRIX2X4FVPROC glUniformMatrix2x4fv;
+ PFNGLUNIFORMMATRIX4X2FVPROC glUniformMatrix4x2fv;
+ PFNGLUNIFORMMATRIX3X4FVPROC glUniformMatrix3x4fv;
+ PFNGLUNIFORMMATRIX4X3FVPROC glUniformMatrix4x3fv;
+
+public: //! @name GL_ARB_framebuffer_object (added to OpenGL 3.0 core)
+
+ PFNGLISRENDERBUFFERPROC glIsRenderbuffer;
+ PFNGLBINDRENDERBUFFERPROC glBindRenderbuffer;
+ PFNGLDELETERENDERBUFFERSPROC glDeleteRenderbuffers;
+ PFNGLGENRENDERBUFFERSPROC glGenRenderbuffers;
+ PFNGLRENDERBUFFERSTORAGEPROC glRenderbufferStorage;
+ PFNGLGETRENDERBUFFERPARAMETERIVPROC glGetRenderbufferParameteriv;
+ PFNGLISFRAMEBUFFERPROC glIsFramebuffer;
+ PFNGLBINDFRAMEBUFFERPROC glBindFramebuffer;
+ PFNGLDELETEFRAMEBUFFERSPROC glDeleteFramebuffers;
+ PFNGLGENFRAMEBUFFERSPROC glGenFramebuffers;
+ PFNGLCHECKFRAMEBUFFERSTATUSPROC glCheckFramebufferStatus;
+ PFNGLFRAMEBUFFERTEXTURE1DPROC glFramebufferTexture1D;
+ PFNGLFRAMEBUFFERTEXTURE2DPROC glFramebufferTexture2D;
+ PFNGLFRAMEBUFFERTEXTURE3DPROC glFramebufferTexture3D;
+ PFNGLFRAMEBUFFERRENDERBUFFERPROC glFramebufferRenderbuffer;
+ PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC glGetFramebufferAttachmentParameteriv;
+ PFNGLGENERATEMIPMAPPROC glGenerateMipmap;
+ PFNGLBLITFRAMEBUFFERPROC glBlitFramebuffer;
+ PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC glRenderbufferStorageMultisample;
+ PFNGLFRAMEBUFFERTEXTURELAYERPROC glFramebufferTextureLayer;
+
+public: //! @name GL_ARB_vertex_array_object (added to OpenGL 3.0 core)
+
+ PFNGLBINDVERTEXARRAYPROC glBindVertexArray;
+ PFNGLDELETEVERTEXARRAYSPROC glDeleteVertexArrays;
+ PFNGLGENVERTEXARRAYSPROC glGenVertexArrays;
+ PFNGLISVERTEXARRAYPROC glIsVertexArray;
+
+public: //! @name GL_ARB_map_buffer_range (added to OpenGL 3.0 core)
+
+ PFNGLMAPBUFFERRANGEPROC glMapBufferRange;
+ PFNGLFLUSHMAPPEDBUFFERRANGEPROC glFlushMappedBufferRange;
+
+public: //! @name OpenGL 3.0
+
+ PFNGLCOLORMASKIPROC glColorMaski;
+ PFNGLGETBOOLEANI_VPROC glGetBooleani_v;
+ PFNGLGETINTEGERI_VPROC glGetIntegeri_v;
+ PFNGLENABLEIPROC glEnablei;
+ PFNGLDISABLEIPROC glDisablei;
+ PFNGLISENABLEDIPROC glIsEnabledi;
+ PFNGLBEGINTRANSFORMFEEDBACKPROC glBeginTransformFeedback;
+ PFNGLENDTRANSFORMFEEDBACKPROC glEndTransformFeedback;
+ PFNGLBINDBUFFERRANGEPROC glBindBufferRange;
+ PFNGLBINDBUFFERBASEPROC glBindBufferBase;
+ PFNGLTRANSFORMFEEDBACKVARYINGSPROC glTransformFeedbackVaryings;
+ PFNGLGETTRANSFORMFEEDBACKVARYINGPROC glGetTransformFeedbackVarying;
+ PFNGLCLAMPCOLORPROC glClampColor;
+ PFNGLBEGINCONDITIONALRENDERPROC glBeginConditionalRender;
+ PFNGLENDCONDITIONALRENDERPROC glEndConditionalRender;
+ PFNGLVERTEXATTRIBIPOINTERPROC glVertexAttribIPointer;
+ PFNGLGETVERTEXATTRIBIIVPROC glGetVertexAttribIiv;
+ PFNGLGETVERTEXATTRIBIUIVPROC glGetVertexAttribIuiv;
+ PFNGLVERTEXATTRIBI1IPROC glVertexAttribI1i;
+ PFNGLVERTEXATTRIBI2IPROC glVertexAttribI2i;
+ PFNGLVERTEXATTRIBI3IPROC glVertexAttribI3i;
+ PFNGLVERTEXATTRIBI4IPROC glVertexAttribI4i;
+ PFNGLVERTEXATTRIBI1UIPROC glVertexAttribI1ui;
+ PFNGLVERTEXATTRIBI2UIPROC glVertexAttribI2ui;
+ PFNGLVERTEXATTRIBI3UIPROC glVertexAttribI3ui;
+ PFNGLVERTEXATTRIBI4UIPROC glVertexAttribI4ui;
+ PFNGLVERTEXATTRIBI1IVPROC glVertexAttribI1iv;
+ PFNGLVERTEXATTRIBI2IVPROC glVertexAttribI2iv;
+ PFNGLVERTEXATTRIBI3IVPROC glVertexAttribI3iv;
+ PFNGLVERTEXATTRIBI4IVPROC glVertexAttribI4iv;
+ PFNGLVERTEXATTRIBI1UIVPROC glVertexAttribI1uiv;
+ PFNGLVERTEXATTRIBI2UIVPROC glVertexAttribI2uiv;
+ PFNGLVERTEXATTRIBI3UIVPROC glVertexAttribI3uiv;
+ PFNGLVERTEXATTRIBI4UIVPROC glVertexAttribI4uiv;
+ PFNGLVERTEXATTRIBI4BVPROC glVertexAttribI4bv;
+ PFNGLVERTEXATTRIBI4SVPROC glVertexAttribI4sv;
+ PFNGLVERTEXATTRIBI4UBVPROC glVertexAttribI4ubv;
+ PFNGLVERTEXATTRIBI4USVPROC glVertexAttribI4usv;
+ PFNGLGETUNIFORMUIVPROC glGetUniformuiv;
+ PFNGLBINDFRAGDATALOCATIONPROC glBindFragDataLocation;
+ PFNGLGETFRAGDATALOCATIONPROC glGetFragDataLocation;
+ PFNGLUNIFORM1UIPROC glUniform1ui;
+ PFNGLUNIFORM2UIPROC glUniform2ui;
+ PFNGLUNIFORM3UIPROC glUniform3ui;
+ PFNGLUNIFORM4UIPROC glUniform4ui;
+ PFNGLUNIFORM1UIVPROC glUniform1uiv;
+ PFNGLUNIFORM2UIVPROC glUniform2uiv;
+ PFNGLUNIFORM3UIVPROC glUniform3uiv;
+ PFNGLUNIFORM4UIVPROC glUniform4uiv;
+ PFNGLTEXPARAMETERIIVPROC glTexParameterIiv;
+ PFNGLTEXPARAMETERIUIVPROC glTexParameterIuiv;
+ PFNGLGETTEXPARAMETERIIVPROC glGetTexParameterIiv;
+ PFNGLGETTEXPARAMETERIUIVPROC glGetTexParameterIuiv;
+ PFNGLCLEARBUFFERIVPROC glClearBufferiv;
+ PFNGLCLEARBUFFERUIVPROC glClearBufferuiv;
+ PFNGLCLEARBUFFERFVPROC glClearBufferfv;
+ PFNGLCLEARBUFFERFIPROC glClearBufferfi;
+ PFNGLGETSTRINGIPROC glGetStringi;
+
+public: //! @name GL_ARB_uniform_buffer_object (added to OpenGL 3.1 core)
+
+ PFNGLGETUNIFORMINDICESPROC glGetUniformIndices;
+ PFNGLGETACTIVEUNIFORMSIVPROC glGetActiveUniformsiv;
+ PFNGLGETACTIVEUNIFORMNAMEPROC glGetActiveUniformName;
+ PFNGLGETUNIFORMBLOCKINDEXPROC glGetUniformBlockIndex;
+ PFNGLGETACTIVEUNIFORMBLOCKIVPROC glGetActiveUniformBlockiv;
+ PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC glGetActiveUniformBlockName;
+ PFNGLUNIFORMBLOCKBINDINGPROC glUniformBlockBinding;
+
+public: //! @name GL_ARB_copy_buffer (added to OpenGL 3.1 core)
+
+ PFNGLCOPYBUFFERSUBDATAPROC glCopyBufferSubData;
+
+public: //! @name OpenGL 3.1
+
+ PFNGLDRAWARRAYSINSTANCEDPROC glDrawArraysInstanced;
+ PFNGLDRAWELEMENTSINSTANCEDPROC glDrawElementsInstanced;
+ PFNGLTEXBUFFERPROC glTexBuffer;
+ PFNGLPRIMITIVERESTARTINDEXPROC glPrimitiveRestartIndex;
+
+public: //! @name GL_ARB_draw_elements_base_vertex (added to OpenGL 3.2 core)
+
+ PFNGLDRAWELEMENTSBASEVERTEXPROC glDrawElementsBaseVertex;
+ PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC glDrawRangeElementsBaseVertex;
+ PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC glDrawElementsInstancedBaseVertex;
+ PFNGLMULTIDRAWELEMENTSBASEVERTEXPROC glMultiDrawElementsBaseVertex;
+
+public: //! @name GL_ARB_provoking_vertex (added to OpenGL 3.2 core)
+
+ PFNGLPROVOKINGVERTEXPROC glProvokingVertex;
+
+public: //! @name GL_ARB_sync (added to OpenGL 3.2 core)
+
+ PFNGLFENCESYNCPROC glFenceSync;
+ PFNGLISSYNCPROC glIsSync;
+ PFNGLDELETESYNCPROC glDeleteSync;
+ PFNGLCLIENTWAITSYNCPROC glClientWaitSync;
+ PFNGLWAITSYNCPROC glWaitSync;
+ PFNGLGETINTEGER64VPROC glGetInteger64v;
+ PFNGLGETSYNCIVPROC glGetSynciv;
+
+public: //! @name GL_ARB_texture_multisample (added to OpenGL 3.2 core)
+
+ PFNGLTEXIMAGE2DMULTISAMPLEPROC glTexImage2DMultisample;
+ PFNGLTEXIMAGE3DMULTISAMPLEPROC glTexImage3DMultisample;
+ PFNGLGETMULTISAMPLEFVPROC glGetMultisamplefv;
+ PFNGLSAMPLEMASKIPROC glSampleMaski;
+
+public: //! @name OpenGL 3.2
+
+ PFNGLGETINTEGER64I_VPROC glGetInteger64i_v;
+ PFNGLGETBUFFERPARAMETERI64VPROC glGetBufferParameteri64v;
+ PFNGLFRAMEBUFFERTEXTUREPROC glFramebufferTexture;
+
+public: //! @name GL_ARB_blend_func_extended (added to OpenGL 3.3 core)
+
+ PFNGLBINDFRAGDATALOCATIONINDEXEDPROC glBindFragDataLocationIndexed;
+ PFNGLGETFRAGDATAINDEXPROC glGetFragDataIndex;
+
+public: //! @name GL_ARB_sampler_objects (added to OpenGL 3.3 core)
+
+ PFNGLGENSAMPLERSPROC glGenSamplers;
+ PFNGLDELETESAMPLERSPROC glDeleteSamplers;
+ PFNGLISSAMPLERPROC glIsSampler;
+ PFNGLBINDSAMPLERPROC glBindSampler;
+ PFNGLSAMPLERPARAMETERIPROC glSamplerParameteri;
+ PFNGLSAMPLERPARAMETERIVPROC glSamplerParameteriv;
+ PFNGLSAMPLERPARAMETERFPROC glSamplerParameterf;
+ PFNGLSAMPLERPARAMETERFVPROC glSamplerParameterfv;
+ PFNGLSAMPLERPARAMETERIIVPROC glSamplerParameterIiv;
+ PFNGLSAMPLERPARAMETERIUIVPROC glSamplerParameterIuiv;
+ PFNGLGETSAMPLERPARAMETERIVPROC glGetSamplerParameteriv;
+ PFNGLGETSAMPLERPARAMETERIIVPROC glGetSamplerParameterIiv;
+ PFNGLGETSAMPLERPARAMETERFVPROC glGetSamplerParameterfv;
+ PFNGLGETSAMPLERPARAMETERIUIVPROC glGetSamplerParameterIuiv;
+
+public: //! @name GL_ARB_timer_query (added to OpenGL 3.3 core)
+
+ PFNGLQUERYCOUNTERPROC glQueryCounter;
+ PFNGLGETQUERYOBJECTI64VPROC glGetQueryObjecti64v;
+ PFNGLGETQUERYOBJECTUI64VPROC glGetQueryObjectui64v;
+
+public: //! @name GL_ARB_vertex_type_2_10_10_10_rev (added to OpenGL 3.3 core)
+
+ PFNGLVERTEXP2UIPROC glVertexP2ui;
+ PFNGLVERTEXP2UIVPROC glVertexP2uiv;
+ PFNGLVERTEXP3UIPROC glVertexP3ui;
+ PFNGLVERTEXP3UIVPROC glVertexP3uiv;
+ PFNGLVERTEXP4UIPROC glVertexP4ui;
+ PFNGLVERTEXP4UIVPROC glVertexP4uiv;
+ PFNGLTEXCOORDP1UIPROC glTexCoordP1ui;
+ PFNGLTEXCOORDP1UIVPROC glTexCoordP1uiv;
+ PFNGLTEXCOORDP2UIPROC glTexCoordP2ui;
+ PFNGLTEXCOORDP2UIVPROC glTexCoordP2uiv;
+ PFNGLTEXCOORDP3UIPROC glTexCoordP3ui;
+ PFNGLTEXCOORDP3UIVPROC glTexCoordP3uiv;
+ PFNGLTEXCOORDP4UIPROC glTexCoordP4ui;
+ PFNGLTEXCOORDP4UIVPROC glTexCoordP4uiv;
+ PFNGLMULTITEXCOORDP1UIPROC glMultiTexCoordP1ui;
+ PFNGLMULTITEXCOORDP1UIVPROC glMultiTexCoordP1uiv;
+ PFNGLMULTITEXCOORDP2UIPROC glMultiTexCoordP2ui;
+ PFNGLMULTITEXCOORDP2UIVPROC glMultiTexCoordP2uiv;
+ PFNGLMULTITEXCOORDP3UIPROC glMultiTexCoordP3ui;
+ PFNGLMULTITEXCOORDP3UIVPROC glMultiTexCoordP3uiv;
+ PFNGLMULTITEXCOORDP4UIPROC glMultiTexCoordP4ui;
+ PFNGLMULTITEXCOORDP4UIVPROC glMultiTexCoordP4uiv;
+ PFNGLNORMALP3UIPROC glNormalP3ui;
+ PFNGLNORMALP3UIVPROC glNormalP3uiv;
+ PFNGLCOLORP3UIPROC glColorP3ui;
+ PFNGLCOLORP3UIVPROC glColorP3uiv;
+ PFNGLCOLORP4UIPROC glColorP4ui;
+ PFNGLCOLORP4UIVPROC glColorP4uiv;
+ PFNGLSECONDARYCOLORP3UIPROC glSecondaryColorP3ui;
+ PFNGLSECONDARYCOLORP3UIVPROC glSecondaryColorP3uiv;
+ PFNGLVERTEXATTRIBP1UIPROC glVertexAttribP1ui;
+ PFNGLVERTEXATTRIBP1UIVPROC glVertexAttribP1uiv;
+ PFNGLVERTEXATTRIBP2UIPROC glVertexAttribP2ui;
+ PFNGLVERTEXATTRIBP2UIVPROC glVertexAttribP2uiv;
+ PFNGLVERTEXATTRIBP3UIPROC glVertexAttribP3ui;
+ PFNGLVERTEXATTRIBP3UIVPROC glVertexAttribP3uiv;
+ PFNGLVERTEXATTRIBP4UIPROC glVertexAttribP4ui;
+ PFNGLVERTEXATTRIBP4UIVPROC glVertexAttribP4uiv;
+
+public: //! @name OpenGL 3.3
+
+ PFNGLVERTEXATTRIBDIVISORPROC glVertexAttribDivisor;
+
+public: //! @name GL_ARB_draw_indirect (added to OpenGL 4.0 core)
+
+ PFNGLDRAWARRAYSINDIRECTPROC glDrawArraysIndirect;
+ PFNGLDRAWELEMENTSINDIRECTPROC glDrawElementsIndirect;
+
+public: //! @name GL_ARB_gpu_shader_fp64 (added to OpenGL 4.0 core)
+
+ PFNGLUNIFORM1DPROC glUniform1d;
+ PFNGLUNIFORM2DPROC glUniform2d;
+ PFNGLUNIFORM3DPROC glUniform3d;
+ PFNGLUNIFORM4DPROC glUniform4d;
+ PFNGLUNIFORM1DVPROC glUniform1dv;
+ PFNGLUNIFORM2DVPROC glUniform2dv;
+ PFNGLUNIFORM3DVPROC glUniform3dv;
+ PFNGLUNIFORM4DVPROC glUniform4dv;
+ PFNGLUNIFORMMATRIX2DVPROC glUniformMatrix2dv;
+ PFNGLUNIFORMMATRIX3DVPROC glUniformMatrix3dv;
+ PFNGLUNIFORMMATRIX4DVPROC glUniformMatrix4dv;
+ PFNGLUNIFORMMATRIX2X3DVPROC glUniformMatrix2x3dv;
+ PFNGLUNIFORMMATRIX2X4DVPROC glUniformMatrix2x4dv;
+ PFNGLUNIFORMMATRIX3X2DVPROC glUniformMatrix3x2dv;
+ PFNGLUNIFORMMATRIX3X4DVPROC glUniformMatrix3x4dv;
+ PFNGLUNIFORMMATRIX4X2DVPROC glUniformMatrix4x2dv;
+ PFNGLUNIFORMMATRIX4X3DVPROC glUniformMatrix4x3dv;
+ PFNGLGETUNIFORMDVPROC glGetUniformdv;
+
+public: //! @name GL_ARB_shader_subroutine (added to OpenGL 4.0 core)
+
+ PFNGLGETSUBROUTINEUNIFORMLOCATIONPROC glGetSubroutineUniformLocation;
+ PFNGLGETSUBROUTINEINDEXPROC glGetSubroutineIndex;
+ PFNGLGETACTIVESUBROUTINEUNIFORMIVPROC glGetActiveSubroutineUniformiv;
+ PFNGLGETACTIVESUBROUTINEUNIFORMNAMEPROC glGetActiveSubroutineUniformName;
+ PFNGLGETACTIVESUBROUTINENAMEPROC glGetActiveSubroutineName;
+ PFNGLUNIFORMSUBROUTINESUIVPROC glUniformSubroutinesuiv;
+ PFNGLGETUNIFORMSUBROUTINEUIVPROC glGetUniformSubroutineuiv;
+ PFNGLGETPROGRAMSTAGEIVPROC glGetProgramStageiv;
+
+public: //! @name GL_ARB_tessellation_shader (added to OpenGL 4.0 core)
+
+ PFNGLPATCHPARAMETERIPROC glPatchParameteri;
+ PFNGLPATCHPARAMETERFVPROC glPatchParameterfv;
+
+public: //! @name GL_ARB_transform_feedback2 (added to OpenGL 4.0 core)
+
+ PFNGLBINDTRANSFORMFEEDBACKPROC glBindTransformFeedback;
+ PFNGLDELETETRANSFORMFEEDBACKSPROC glDeleteTransformFeedbacks;
+ PFNGLGENTRANSFORMFEEDBACKSPROC glGenTransformFeedbacks;
+ PFNGLISTRANSFORMFEEDBACKPROC glIsTransformFeedback;
+ PFNGLPAUSETRANSFORMFEEDBACKPROC glPauseTransformFeedback;
+ PFNGLRESUMETRANSFORMFEEDBACKPROC glResumeTransformFeedback;
+ PFNGLDRAWTRANSFORMFEEDBACKPROC glDrawTransformFeedback;
+
+public: //! @name GL_ARB_transform_feedback3 (added to OpenGL 4.0 core)
+
+ PFNGLDRAWTRANSFORMFEEDBACKSTREAMPROC glDrawTransformFeedbackStream;
+ PFNGLBEGINQUERYINDEXEDPROC glBeginQueryIndexed;
+ PFNGLENDQUERYINDEXEDPROC glEndQueryIndexed;
+ PFNGLGETQUERYINDEXEDIVPROC glGetQueryIndexediv;
+
+public: //! @name OpenGL 4.0
+
+ PFNGLMINSAMPLESHADINGPROC glMinSampleShading;
+ PFNGLBLENDEQUATIONIPROC glBlendEquationi;
+ PFNGLBLENDEQUATIONSEPARATEIPROC glBlendEquationSeparatei;
+ PFNGLBLENDFUNCIPROC glBlendFunci;
+ PFNGLBLENDFUNCSEPARATEIPROC glBlendFuncSeparatei;
+
+public: //! @name GL_ARB_ES2_compatibility (added to OpenGL 4.1 core)
+
+ PFNGLRELEASESHADERCOMPILERPROC glReleaseShaderCompiler;
+ PFNGLSHADERBINARYPROC glShaderBinary;
+ PFNGLGETSHADERPRECISIONFORMATPROC glGetShaderPrecisionFormat;
+ PFNGLDEPTHRANGEFPROC glDepthRangef;
+ PFNGLCLEARDEPTHFPROC glClearDepthf;
+
+public: //! @name GL_ARB_get_program_binary (added to OpenGL 4.1 core)
+
+ PFNGLGETPROGRAMBINARYPROC glGetProgramBinary;
+ PFNGLPROGRAMBINARYPROC glProgramBinary;
+ PFNGLPROGRAMPARAMETERIPROC glProgramParameteri;
+
+public: //! @name GL_ARB_separate_shader_objects (added to OpenGL 4.1 core)
+
+ PFNGLUSEPROGRAMSTAGESPROC glUseProgramStages;
+ PFNGLACTIVESHADERPROGRAMPROC glActiveShaderProgram;
+ PFNGLCREATESHADERPROGRAMVPROC glCreateShaderProgramv;
+ PFNGLBINDPROGRAMPIPELINEPROC glBindProgramPipeline;
+ PFNGLDELETEPROGRAMPIPELINESPROC glDeleteProgramPipelines;
+ PFNGLGENPROGRAMPIPELINESPROC glGenProgramPipelines;
+ PFNGLISPROGRAMPIPELINEPROC glIsProgramPipeline;
+ PFNGLGETPROGRAMPIPELINEIVPROC glGetProgramPipelineiv;
+ PFNGLPROGRAMUNIFORM1IPROC glProgramUniform1i;
+ PFNGLPROGRAMUNIFORM1IVPROC glProgramUniform1iv;
+ PFNGLPROGRAMUNIFORM1FPROC glProgramUniform1f;
+ PFNGLPROGRAMUNIFORM1FVPROC glProgramUniform1fv;
+ PFNGLPROGRAMUNIFORM1DPROC glProgramUniform1d;
+ PFNGLPROGRAMUNIFORM1DVPROC glProgramUniform1dv;
+ PFNGLPROGRAMUNIFORM1UIPROC glProgramUniform1ui;
+ PFNGLPROGRAMUNIFORM1UIVPROC glProgramUniform1uiv;
+ PFNGLPROGRAMUNIFORM2IPROC glProgramUniform2i;
+ PFNGLPROGRAMUNIFORM2IVPROC glProgramUniform2iv;
+ PFNGLPROGRAMUNIFORM2FPROC glProgramUniform2f;
+ PFNGLPROGRAMUNIFORM2FVPROC glProgramUniform2fv;
+ PFNGLPROGRAMUNIFORM2DPROC glProgramUniform2d;
+ PFNGLPROGRAMUNIFORM2DVPROC glProgramUniform2dv;
+ PFNGLPROGRAMUNIFORM2UIPROC glProgramUniform2ui;
+ PFNGLPROGRAMUNIFORM2UIVPROC glProgramUniform2uiv;
+ PFNGLPROGRAMUNIFORM3IPROC glProgramUniform3i;
+ PFNGLPROGRAMUNIFORM3IVPROC glProgramUniform3iv;
+ PFNGLPROGRAMUNIFORM3FPROC glProgramUniform3f;
+ PFNGLPROGRAMUNIFORM3FVPROC glProgramUniform3fv;
+ PFNGLPROGRAMUNIFORM3DPROC glProgramUniform3d;
+ PFNGLPROGRAMUNIFORM3DVPROC glProgramUniform3dv;
+ PFNGLPROGRAMUNIFORM3UIPROC glProgramUniform3ui;
+ PFNGLPROGRAMUNIFORM3UIVPROC glProgramUniform3uiv;
+ PFNGLPROGRAMUNIFORM4IPROC glProgramUniform4i;
+ PFNGLPROGRAMUNIFORM4IVPROC glProgramUniform4iv;
+ PFNGLPROGRAMUNIFORM4FPROC glProgramUniform4f;
+ PFNGLPROGRAMUNIFORM4FVPROC glProgramUniform4fv;
+ PFNGLPROGRAMUNIFORM4DPROC glProgramUniform4d;
+ PFNGLPROGRAMUNIFORM4DVPROC glProgramUniform4dv;
+ PFNGLPROGRAMUNIFORM4UIPROC glProgramUniform4ui;
+ PFNGLPROGRAMUNIFORM4UIVPROC glProgramUniform4uiv;
+ PFNGLPROGRAMUNIFORMMATRIX2FVPROC glProgramUniformMatrix2fv;
+ PFNGLPROGRAMUNIFORMMATRIX3FVPROC glProgramUniformMatrix3fv;
+ PFNGLPROGRAMUNIFORMMATRIX4FVPROC glProgramUniformMatrix4fv;
+ PFNGLPROGRAMUNIFORMMATRIX2DVPROC glProgramUniformMatrix2dv;
+ PFNGLPROGRAMUNIFORMMATRIX3DVPROC glProgramUniformMatrix3dv;
+ PFNGLPROGRAMUNIFORMMATRIX4DVPROC glProgramUniformMatrix4dv;
+ PFNGLPROGRAMUNIFORMMATRIX2X3FVPROC glProgramUniformMatrix2x3fv;
+ PFNGLPROGRAMUNIFORMMATRIX3X2FVPROC glProgramUniformMatrix3x2fv;
+ PFNGLPROGRAMUNIFORMMATRIX2X4FVPROC glProgramUniformMatrix2x4fv;
+ PFNGLPROGRAMUNIFORMMATRIX4X2FVPROC glProgramUniformMatrix4x2fv;
+ PFNGLPROGRAMUNIFORMMATRIX3X4FVPROC glProgramUniformMatrix3x4fv;
+ PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC glProgramUniformMatrix4x3fv;
+ PFNGLPROGRAMUNIFORMMATRIX2X3DVPROC glProgramUniformMatrix2x3dv;
+ PFNGLPROGRAMUNIFORMMATRIX3X2DVPROC glProgramUniformMatrix3x2dv;
+ PFNGLPROGRAMUNIFORMMATRIX2X4DVPROC glProgramUniformMatrix2x4dv;
+ PFNGLPROGRAMUNIFORMMATRIX4X2DVPROC glProgramUniformMatrix4x2dv;
+ PFNGLPROGRAMUNIFORMMATRIX3X4DVPROC glProgramUniformMatrix3x4dv;
+ PFNGLPROGRAMUNIFORMMATRIX4X3DVPROC glProgramUniformMatrix4x3dv;
+ PFNGLVALIDATEPROGRAMPIPELINEPROC glValidateProgramPipeline;
+ PFNGLGETPROGRAMPIPELINEINFOLOGPROC glGetProgramPipelineInfoLog;
+
+public: //! @name GL_ARB_vertex_attrib_64bit (added to OpenGL 4.1 core)
+
+ PFNGLVERTEXATTRIBL1DPROC glVertexAttribL1d;
+ PFNGLVERTEXATTRIBL2DPROC glVertexAttribL2d;
+ PFNGLVERTEXATTRIBL3DPROC glVertexAttribL3d;
+ PFNGLVERTEXATTRIBL4DPROC glVertexAttribL4d;
+ PFNGLVERTEXATTRIBL1DVPROC glVertexAttribL1dv;
+ PFNGLVERTEXATTRIBL2DVPROC glVertexAttribL2dv;
+ PFNGLVERTEXATTRIBL3DVPROC glVertexAttribL3dv;
+ PFNGLVERTEXATTRIBL4DVPROC glVertexAttribL4dv;
+ PFNGLVERTEXATTRIBLPOINTERPROC glVertexAttribLPointer;
+ PFNGLGETVERTEXATTRIBLDVPROC glGetVertexAttribLdv;
+
+public: //! @name GL_ARB_viewport_array (added to OpenGL 4.1 core)
+
+ PFNGLVIEWPORTARRAYVPROC glViewportArrayv;
+ PFNGLVIEWPORTINDEXEDFPROC glViewportIndexedf;
+ PFNGLVIEWPORTINDEXEDFVPROC glViewportIndexedfv;
+ PFNGLSCISSORARRAYVPROC glScissorArrayv;
+ PFNGLSCISSORINDEXEDPROC glScissorIndexed;
+ PFNGLSCISSORINDEXEDVPROC glScissorIndexedv;
+ PFNGLDEPTHRANGEARRAYVPROC glDepthRangeArrayv;
+ PFNGLDEPTHRANGEINDEXEDPROC glDepthRangeIndexed;
+ PFNGLGETFLOATI_VPROC glGetFloati_v;
+ PFNGLGETDOUBLEI_VPROC glGetDoublei_v;
+
+public: //! @name OpenGL 4.1
+
+ //
+
+public: //! @name GL_ARB_base_instance (added to OpenGL 4.2 core)
+
+ PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEPROC glDrawArraysInstancedBaseInstance;
+ PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEPROC glDrawElementsInstancedBaseInstance;
+ PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEPROC glDrawElementsInstancedBaseVertexBaseInstance;
+
+public: //! @name GL_ARB_transform_feedback_instanced (added to OpenGL 4.2 core)
+
+ PFNGLDRAWTRANSFORMFEEDBACKINSTANCEDPROC glDrawTransformFeedbackInstanced;
+ PFNGLDRAWTRANSFORMFEEDBACKSTREAMINSTANCEDPROC glDrawTransformFeedbackStreamInstanced;
+
+public: //! @name GL_ARB_internalformat_query (added to OpenGL 4.2 core)
+
+ PFNGLGETINTERNALFORMATIVPROC glGetInternalformativ;
+
+public: //! @name GL_ARB_shader_atomic_counters (added to OpenGL 4.2 core)
+
+ PFNGLGETACTIVEATOMICCOUNTERBUFFERIVPROC glGetActiveAtomicCounterBufferiv;
+
+public: //! @name GL_ARB_shader_image_load_store (added to OpenGL 4.2 core)
+
+ PFNGLBINDIMAGETEXTUREPROC glBindImageTexture;
+ PFNGLMEMORYBARRIERPROC glMemoryBarrier;
+
+public: //! @name GL_ARB_texture_storage (added to OpenGL 4.2 core)
+
+ PFNGLTEXSTORAGE1DPROC glTexStorage1D;
+ PFNGLTEXSTORAGE2DPROC glTexStorage2D;
+ PFNGLTEXSTORAGE3DPROC glTexStorage3D;
+ PFNGLTEXTURESTORAGE1DEXTPROC glTextureStorage1DEXT;
+ PFNGLTEXTURESTORAGE2DEXTPROC glTextureStorage2DEXT;
+ PFNGLTEXTURESTORAGE3DEXTPROC glTextureStorage3DEXT;
+
+public: //! @name OpenGL 4.2
+
+public: //! @name OpenGL 4.3
+
+ PFNGLCLEARBUFFERDATAPROC glClearBufferData;
+ PFNGLCLEARBUFFERSUBDATAPROC glClearBufferSubData;
+ PFNGLDISPATCHCOMPUTEPROC glDispatchCompute;
+ PFNGLDISPATCHCOMPUTEINDIRECTPROC glDispatchComputeIndirect;
+ PFNGLCOPYIMAGESUBDATAPROC glCopyImageSubData;
+ PFNGLFRAMEBUFFERPARAMETERIPROC glFramebufferParameteri;
+ PFNGLGETFRAMEBUFFERPARAMETERIVPROC glGetFramebufferParameteriv;
+ PFNGLGETINTERNALFORMATI64VPROC glGetInternalformati64v;
+ PFNGLINVALIDATETEXSUBIMAGEPROC glInvalidateTexSubImage;
+ PFNGLINVALIDATETEXIMAGEPROC glInvalidateTexImage;
+ PFNGLINVALIDATEBUFFERSUBDATAPROC glInvalidateBufferSubData;
+ PFNGLINVALIDATEBUFFERDATAPROC glInvalidateBufferData;
+ PFNGLINVALIDATEFRAMEBUFFERPROC glInvalidateFramebuffer;
+ PFNGLINVALIDATESUBFRAMEBUFFERPROC glInvalidateSubFramebuffer;
+ PFNGLMULTIDRAWARRAYSINDIRECTPROC glMultiDrawArraysIndirect;
+ PFNGLMULTIDRAWELEMENTSINDIRECTPROC glMultiDrawElementsIndirect;
+ PFNGLGETPROGRAMINTERFACEIVPROC glGetProgramInterfaceiv;
+ PFNGLGETPROGRAMRESOURCEINDEXPROC glGetProgramResourceIndex;
+ PFNGLGETPROGRAMRESOURCENAMEPROC glGetProgramResourceName;
+ PFNGLGETPROGRAMRESOURCEIVPROC glGetProgramResourceiv;
+ PFNGLGETPROGRAMRESOURCELOCATIONPROC glGetProgramResourceLocation;
+ PFNGLGETPROGRAMRESOURCELOCATIONINDEXPROC glGetProgramResourceLocationIndex;
+ PFNGLSHADERSTORAGEBLOCKBINDINGPROC glShaderStorageBlockBinding;
+ PFNGLTEXBUFFERRANGEPROC glTexBufferRange;
+ PFNGLTEXSTORAGE2DMULTISAMPLEPROC glTexStorage2DMultisample;
+ PFNGLTEXSTORAGE3DMULTISAMPLEPROC glTexStorage3DMultisample;
+ PFNGLTEXTUREVIEWPROC glTextureView;
+ PFNGLBINDVERTEXBUFFERPROC glBindVertexBuffer;
+ PFNGLVERTEXATTRIBFORMATPROC glVertexAttribFormat;
+ PFNGLVERTEXATTRIBIFORMATPROC glVertexAttribIFormat;
+ PFNGLVERTEXATTRIBLFORMATPROC glVertexAttribLFormat;
+ PFNGLVERTEXATTRIBBINDINGPROC glVertexAttribBinding;
+ PFNGLVERTEXBINDINGDIVISORPROC glVertexBindingDivisor;
+ PFNGLDEBUGMESSAGECONTROLPROC glDebugMessageControl;
+ PFNGLDEBUGMESSAGEINSERTPROC glDebugMessageInsert;
+ PFNGLDEBUGMESSAGECALLBACKPROC glDebugMessageCallback;
+ PFNGLGETDEBUGMESSAGELOGPROC glGetDebugMessageLog;
+ PFNGLPUSHDEBUGGROUPPROC glPushDebugGroup;
+ PFNGLPOPDEBUGGROUPPROC glPopDebugGroup;
+ PFNGLOBJECTLABELPROC glObjectLabel;
+ PFNGLGETOBJECTLABELPROC glGetObjectLabel;
+ PFNGLOBJECTPTRLABELPROC glObjectPtrLabel;
+ PFNGLGETOBJECTPTRLABELPROC glGetObjectPtrLabel;
+
+public: //! @name OpenGL 4.4
+
+ PFNGLBUFFERSTORAGEPROC glBufferStorage;
+ PFNGLCLEARTEXIMAGEPROC glClearTexImage;
+ PFNGLCLEARTEXSUBIMAGEPROC glClearTexSubImage;
+ PFNGLBINDBUFFERSBASEPROC glBindBuffersBase;
+ PFNGLBINDBUFFERSRANGEPROC glBindBuffersRange;
+ PFNGLBINDTEXTURESPROC glBindTextures;
+ PFNGLBINDSAMPLERSPROC glBindSamplers;
+ PFNGLBINDIMAGETEXTURESPROC glBindImageTextures;
+ PFNGLBINDVERTEXBUFFERSPROC glBindVertexBuffers;
+
+public: //! @name GL_ARB_debug_output (optional)
+
+ PFNGLDEBUGMESSAGECONTROLARBPROC glDebugMessageControlARB;
+ PFNGLDEBUGMESSAGEINSERTARBPROC glDebugMessageInsertARB;
+ PFNGLDEBUGMESSAGECALLBACKARBPROC glDebugMessageCallbackARB;
+ PFNGLGETDEBUGMESSAGELOGARBPROC glGetDebugMessageLogARB;
+
+public: //! @name GL_EXT_geometry_shader4
+
+ PFNGLPROGRAMPARAMETERIEXTPROC glProgramParameteriEXT;
+
+#if defined(_WIN32)
+public: //! @name wgl extensions
+
+ typedef const char* (WINAPI *wglGetExtensionsStringARB_t)(HDC theDeviceContext);
+ wglGetExtensionsStringARB_t wglGetExtensionsStringARB;
+
+ typedef BOOL (WINAPI *wglSwapIntervalEXT_t)(int theInterval);
+ wglSwapIntervalEXT_t wglSwapIntervalEXT;
+
+ // WGL_ARB_pixel_format
+
+#ifndef WGL_NUMBER_PIXEL_FORMATS_ARB
+ #define WGL_NUMBER_PIXEL_FORMATS_ARB 0x2000
+ #define WGL_DRAW_TO_WINDOW_ARB 0x2001
+ #define WGL_DRAW_TO_BITMAP_ARB 0x2002
+ #define WGL_ACCELERATION_ARB 0x2003
+ #define WGL_NEED_PALETTE_ARB 0x2004
+ #define WGL_NEED_SYSTEM_PALETTE_ARB 0x2005
+ #define WGL_SWAP_LAYER_BUFFERS_ARB 0x2006
+ #define WGL_SWAP_METHOD_ARB 0x2007
+ #define WGL_NUMBER_OVERLAYS_ARB 0x2008
+ #define WGL_NUMBER_UNDERLAYS_ARB 0x2009
+ #define WGL_TRANSPARENT_ARB 0x200A
+ #define WGL_TRANSPARENT_RED_VALUE_ARB 0x2037
+ #define WGL_TRANSPARENT_GREEN_VALUE_ARB 0x2038
+ #define WGL_TRANSPARENT_BLUE_VALUE_ARB 0x2039
+ #define WGL_TRANSPARENT_ALPHA_VALUE_ARB 0x203A
+ #define WGL_TRANSPARENT_INDEX_VALUE_ARB 0x203B
+ #define WGL_SHARE_DEPTH_ARB 0x200C
+ #define WGL_SHARE_STENCIL_ARB 0x200D
+ #define WGL_SHARE_ACCUM_ARB 0x200E
+ #define WGL_SUPPORT_GDI_ARB 0x200F
+ #define WGL_SUPPORT_OPENGL_ARB 0x2010
+ #define WGL_DOUBLE_BUFFER_ARB 0x2011
+ #define WGL_STEREO_ARB 0x2012
+ #define WGL_PIXEL_TYPE_ARB 0x2013
+ #define WGL_COLOR_BITS_ARB 0x2014
+ #define WGL_RED_BITS_ARB 0x2015
+ #define WGL_RED_SHIFT_ARB 0x2016
+ #define WGL_GREEN_BITS_ARB 0x2017
+ #define WGL_GREEN_SHIFT_ARB 0x2018
+ #define WGL_BLUE_BITS_ARB 0x2019
+ #define WGL_BLUE_SHIFT_ARB 0x201A
+ #define WGL_ALPHA_BITS_ARB 0x201B
+ #define WGL_ALPHA_SHIFT_ARB 0x201C
+ #define WGL_ACCUM_BITS_ARB 0x201D
+ #define WGL_ACCUM_RED_BITS_ARB 0x201E
+ #define WGL_ACCUM_GREEN_BITS_ARB 0x201F
+ #define WGL_ACCUM_BLUE_BITS_ARB 0x2020
+ #define WGL_ACCUM_ALPHA_BITS_ARB 0x2021
+ #define WGL_DEPTH_BITS_ARB 0x2022
+ #define WGL_STENCIL_BITS_ARB 0x2023
+ #define WGL_AUX_BUFFERS_ARB 0x2024
+
+ #define WGL_NO_ACCELERATION_ARB 0x2025
+ #define WGL_GENERIC_ACCELERATION_ARB 0x2026
+ #define WGL_FULL_ACCELERATION_ARB 0x2027
+
+ #define WGL_SWAP_EXCHANGE_ARB 0x2028
+ #define WGL_SWAP_COPY_ARB 0x2029
+ #define WGL_SWAP_UNDEFINED_ARB 0x202A
+
+ #define WGL_TYPE_RGBA_ARB 0x202B
+ #define WGL_TYPE_COLORINDEX_ARB 0x202C
+
+#endif // WGL_NUMBER_PIXEL_FORMATS_ARB
+
+ // WGL_ARB_multisample
+#ifndef WGL_SAMPLE_BUFFERS_ARB
+ #define WGL_SAMPLE_BUFFERS_ARB 0x2041
+ #define WGL_SAMPLES_ARB 0x2042
+#endif
+
+ // WGL_ARB_create_context_robustness
+#ifndef WGL_CONTEXT_ROBUST_ACCESS_BIT_ARB
+ #define WGL_CONTEXT_ROBUST_ACCESS_BIT_ARB 0x00000004
+ #define WGL_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB 0x8256
+ #define WGL_NO_RESET_NOTIFICATION_ARB 0x8261
+ #define WGL_LOSE_CONTEXT_ON_RESET_ARB 0x8252
+#endif
+
+ typedef BOOL (WINAPI *wglChoosePixelFormatARB_t)
+ (HDC theDevCtx,
+ const int* theIntAttribs,
+ const float* theFloatAttribs,
+ unsigned int theMaxFormats,
+ int* theFormatsOut,
+ unsigned int* theNumFormatsOut);
+ wglChoosePixelFormatARB_t wglChoosePixelFormatARB;
+
+ // WGL_ARB_create_context_profile
+
+#ifndef WGL_CONTEXT_MAJOR_VERSION_ARB
+ #define WGL_CONTEXT_MAJOR_VERSION_ARB 0x2091
+ #define WGL_CONTEXT_MINOR_VERSION_ARB 0x2092
+ #define WGL_CONTEXT_LAYER_PLANE_ARB 0x2093
+ #define WGL_CONTEXT_FLAGS_ARB 0x2094
+ #define WGL_CONTEXT_PROFILE_MASK_ARB 0x9126
+
+ // WGL_CONTEXT_FLAGS bits
+ #define WGL_CONTEXT_DEBUG_BIT_ARB 0x0001
+ #define WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x0002
+
+ // WGL_CONTEXT_PROFILE_MASK_ARB bits
+ #define WGL_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001
+ #define WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002
+#endif // WGL_CONTEXT_MAJOR_VERSION_ARB
+
+ typedef HGLRC (WINAPI *wglCreateContextAttribsARB_t)(HDC theDevCtx,
+ HGLRC theShareContext,
+ const int* theAttribs);
+ wglCreateContextAttribsARB_t wglCreateContextAttribsARB;
+
+ // WGL_NV_DX_interop
+
+ typedef BOOL (WINAPI *wglDXSetResourceShareHandleNV_t)(void* theObjectD3d, HANDLE theShareHandle);
+ typedef HANDLE (WINAPI *wglDXOpenDeviceNV_t )(void* theDeviceD3d);
+ typedef BOOL (WINAPI *wglDXCloseDeviceNV_t )(HANDLE theDeviceIOP);
+ typedef HANDLE (WINAPI *wglDXRegisterObjectNV_t )(HANDLE theDeviceIOP,
+ void* theObjectD3d,
+ GLuint theName,
+ GLenum theType,
+ GLenum theAccess);
+ typedef BOOL (WINAPI *wglDXUnregisterObjectNV_t)(HANDLE theDeviceIOP,
+ HANDLE theObject);
+ typedef BOOL (WINAPI *wglDXObjectAccessNV_t )(HANDLE theObject,
+ GLenum theAccess);
+ typedef BOOL (WINAPI *wglDXLockObjectsNV_t )(HANDLE theDeviceIOP,
+ GLint theCount,
+ HANDLE* theObjects);
+ typedef BOOL (WINAPI *wglDXUnlockObjectsNV_t )(HANDLE theDeviceIOP,
+ GLint theCount,
+ HANDLE* theObjects);
+
+ wglDXSetResourceShareHandleNV_t wglDXSetResourceShareHandleNV;
+ wglDXOpenDeviceNV_t wglDXOpenDeviceNV;
+ wglDXCloseDeviceNV_t wglDXCloseDeviceNV;
+ wglDXRegisterObjectNV_t wglDXRegisterObjectNV;
+ wglDXUnregisterObjectNV_t wglDXUnregisterObjectNV;
+ wglDXObjectAccessNV_t wglDXObjectAccessNV;
+ wglDXLockObjectsNV_t wglDXLockObjectsNV;
+ wglDXUnlockObjectsNV_t wglDXUnlockObjectsNV;
+
+#ifndef WGL_ACCESS_READ_WRITE_NV
+ #define WGL_ACCESS_READ_ONLY_NV 0x0000
+ #define WGL_ACCESS_READ_WRITE_NV 0x0001
+ #define WGL_ACCESS_WRITE_DISCARD_NV 0x0002
+#endif
+
+#elif defined(__APPLE__)
+public: //! @name CGL extensions
+
+#else
+public: //! @name glX extensions
+
+ // GLX_EXT_swap_control
+ //typedef int (*glXSwapIntervalEXT_t)(Display* theDisplay, GLXDrawable theDrawable, int theInterval);
+ typedef int (*glXSwapIntervalEXT_t)();
+ glXSwapIntervalEXT_t glXSwapIntervalEXT;
+
+ typedef int (*glXSwapIntervalSGI_t)(int theInterval);
+ glXSwapIntervalSGI_t glXSwapIntervalSGI;
+#endif
+
+};
+
+#endif // _OpenGl_GlFunctions_Header
// activate texture unit
glDisable (GL_TEXTURE_1D);
glEnable (GL_TEXTURE_2D);
- if (theCtx->core13 != NULL)
+ if (theCtx->core15fwd != NULL)
{
- theCtx->core13->glActiveTexture (GL_TEXTURE0);
+ theCtx->core15fwd->glActiveTexture (GL_TEXTURE0);
}
// extra drawings
#include <OpenGl_Texture.hxx>
-#include <OpenGl_ExtFBO.hxx>
+#include <OpenGl_ArbFBO.hxx>
#include <OpenGl_Context.hxx>
+#include <OpenGl_GlCore15.hxx>
#include <Graphic3d_TextureParams.hxx>
#include <Standard_Assert.hxx>
#include <Image_PixMap.hxx>
void OpenGl_Texture::Bind (const Handle(OpenGl_Context)& theCtx,
const GLenum theTextureUnit) const
{
- if (theCtx->IsGlGreaterEqual (1, 3))
+ if (theCtx->IsGlGreaterEqual (1, 5))
{
- theCtx->core13->glActiveTexture (theTextureUnit);
+ theCtx->core15fwd->glActiveTexture (theTextureUnit);
}
glBindTexture (myTarget, myTextureId);
}
void OpenGl_Texture::Unbind (const Handle(OpenGl_Context)& theCtx,
const GLenum theTextureUnit) const
{
- if (theCtx->IsGlGreaterEqual (1, 3))
+ if (theCtx->IsGlGreaterEqual (1, 5))
{
- theCtx->core13->glActiveTexture (theTextureUnit);
+ theCtx->core15fwd->glActiveTexture (theTextureUnit);
}
glBindTexture (myTarget, NO_TEXTURE);
}
glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
- if (theCtx->extFBO != NULL
+ if (theCtx->arbFBO != NULL
&& aWidth == aWidthOut && aHeight == aHeightOut)
{
// use proxy to check texture could be created or not
// generate mipmaps
//glHint (GL_GENERATE_MIPMAP_HINT, GL_NICEST);
- theCtx->extFBO->glGenerateMipmapEXT (GL_TEXTURE_2D);
+ theCtx->arbFBO->glGenerateMipmap (GL_TEXTURE_2D);
Unbind (theCtx);
return true;
Bind (theGlCtx);
BindTexture (theGlCtx);
- theGlCtx->arbTBO->glTexBufferARB (GetTarget(), myTexFormat, myBufferId);
+ theGlCtx->arbTBO->glTexBuffer (GetTarget(), myTexFormat, myBufferId);
UnbindTexture (theGlCtx);
Unbind (theGlCtx);
return true;
#include <Graphic3d_Group.hxx>
#include <Graphic3d_ShaderObject.hxx>
#include <Graphic3d_ShaderProgram.hxx>
-#include <OpenGl_ArbVBO.hxx>
#include <OpenGl_AspectFace.hxx>
#include <OpenGl_AspectLine.hxx>
#include <OpenGl_AspectMarker.hxx>
#include <OpenGl_AspectText.hxx>
#include <OpenGl_Context.hxx>
#include <OpenGl_Element.hxx>
-#include <OpenGl_ExtFBO.hxx>
#include <OpenGl_GlCore20.hxx>
#include <OpenGl_GraphicDriver.hxx>
#include <OpenGl_Workspace.hxx>