0025854: Visualization, TKOpenGl - add option to request Core profile 3.2+
[occt.git] / src / OpenGl / OpenGl_Caps.cxx
1 // Created on: 2013-08-25
2 // Created by: Kirill GAVRILOV
3 // Copyright (c) 2013-2014 OPEN CASCADE SAS
4 //
5 // This file is part of Open CASCADE Technology software library.
6 //
7 // This library is free software; you can redistribute it and/or modify it under
8 // the terms of the GNU Lesser General Public License version 2.1 as published
9 // by the Free Software Foundation, with special exception defined in the file
10 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 // distribution for complete text of the license and disclaimer of any warranty.
12 //
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
15
16 #include <OpenGl_Caps.hxx>
17
18 #include <OpenGl_GlCore20.hxx>
19
20 IMPLEMENT_STANDARD_HANDLE (OpenGl_Caps, Standard_Transient)
21 IMPLEMENT_STANDARD_RTTIEXT(OpenGl_Caps, Standard_Transient)
22
23 // =======================================================================
24 // function : OpenGl_Caps
25 // purpose  :
26 // =======================================================================
27 OpenGl_Caps::OpenGl_Caps()
28 : vboDisable        (Standard_False),
29   pntSpritesDisable (Standard_False),
30   keepArrayData     (Standard_False),
31 #if !defined(GL_ES_VERSION_2_0)
32   ffpEnable         (Standard_True),
33 #else
34   ffpEnable         (Standard_False),
35 #endif
36   buffersNoSwap     (Standard_False),
37   contextStereo     (Standard_False),
38 #ifdef OCCT_DEBUG
39   contextDebug      (Standard_True),
40 #else
41   contextDebug      (Standard_False),
42 #endif
43   contextNoAccel    (Standard_False),
44 #if !defined(GL_ES_VERSION_2_0)
45   contextCompatible (Standard_True),
46 #else
47   contextCompatible (Standard_False),
48 #endif
49   glslWarnings      (Standard_False)
50 {
51   //
52 }
53
54 // =======================================================================
55 // function : operator=
56 // purpose  :
57 // =======================================================================
58 OpenGl_Caps& OpenGl_Caps::operator= (const OpenGl_Caps& theCopy)
59 {
60   vboDisable        = theCopy.vboDisable;
61   pntSpritesDisable = theCopy.pntSpritesDisable;
62   keepArrayData     = theCopy.keepArrayData;
63   ffpEnable         = theCopy.ffpEnable;
64   buffersNoSwap     = theCopy.buffersNoSwap;
65   contextStereo     = theCopy.contextStereo;
66   contextDebug      = theCopy.contextDebug;
67   contextNoAccel    = theCopy.contextNoAccel;
68   contextCompatible = theCopy.contextCompatible;
69   glslWarnings      = theCopy.glslWarnings;
70   return *this;
71 }
72
73 // =======================================================================
74 // function : ~OpenGl_Caps
75 // purpose  :
76 // =======================================================================
77 OpenGl_Caps::~OpenGl_Caps()
78 {
79   //
80 }