0024732: OpenGl_Context - retrieve functions up to GL4.4
[occt.git] / src / OpenGl / OpenGl_GlCore12.hxx
index 9d46460..406b541 100644 (file)
@@ -1,50 +1,43 @@
 // Created on: 2012-03-06
 // Created by: Kirill GAVRILOV
-// Copyright (c) -1999 Matra Datavision
-// Copyright (c) 2012-2012 OPEN CASCADE SAS
+// Copyright (c) 2012-2014 OPEN CASCADE SAS
 //
-// The content of this file is subject to the Open CASCADE Technology Public
-// License Version 6.5 (the "License"). You may not use the content of this file
-// except in compliance with the License. Please obtain a copy of the License
-// at http://www.opencascade.org and read it completely before using this file.
+// This file is part of Open CASCADE Technology software library.
 //
-// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
-// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
+// 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.
 //
-// The Original Code and all software distributed under the License is
-// distributed on an "AS IS" basis, without warranty of any kind, and the
-// Initial Developer hereby disclaims all such warranties, including without
-// limitation, any warranties of merchantability, fitness for a particular
-// purpose or non-infringement. Please see the License for the specific terms
-// and conditions governing the rights and limitations under the License.
+// 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