1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-10 18:51:21 +03:00
occt/src/OpenGl/OpenGl_GlCore12.hxx
kgv 5f8b738ea5 0023022: This is desirable to access OpenGl extensions and core API (1.2+) in one place
Extend OpenGl_Context to provide GL2.0 core functionality

Added 'glext.h' header provided by Khronos group with definitions
and GL functions' types.
Added OpenGl_GlCoreXX structures with function list
to appropriate GL core functionality.
Fixed memory leak in OpenGl_Context destructor.
Eliminate inclusions of gl.h header
Use OpenGl_GlCore11.hxx instead.
Removed obsolote M_PI redefinitions.
Slightly cleaned up included headers.
Reuse definitions from glext.h
OpenGl_ArbVBO and OpenGl_ExtFBO originally provide own definitions
for OpenGL extensions.
2012-03-15 13:58:13 +04:00

35 lines
831 B
C++

// File: OpenGl_GlCore12.hxx
// Created: 06 March 2012
// Author: Kirill GAVRILOV
// Copyright: OPEN CASCADE 2012
#ifndef _OpenGl_GlCore12_H__
#define _OpenGl_GlCore12_H__
#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
{
PFNGLBLENDCOLORPROC glBlendColor;
PFNGLBLENDEQUATIONPROC glBlendEquation;
PFNGLDRAWRANGEELEMENTSPROC glDrawRangeElements;
PFNGLTEXIMAGE3DPROC glTexImage3D;
PFNGLTEXSUBIMAGE3DPROC glTexSubImage3D;
PFNGLCOPYTEXSUBIMAGE3DPROC glCopyTexSubImage3D;
};
#endif // _OpenGl_GlCore12_H__