1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-09-08 14:17:06 +03:00

0024732: OpenGl_Context - retrieve functions up to GL4.4

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
This commit is contained in:
kgv
2014-03-20 13:50:28 +04:00
committed by bugmaster
parent 228de226a1
commit 01ca42b2c1
34 changed files with 4992 additions and 684 deletions

View File

@@ -13,32 +13,31 @@
// 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