0024023: Revamp the OCCT Handle -- automatic
[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
21 // =======================================================================
22 // function : OpenGl_Caps
23 // purpose  :
24 // =======================================================================
25 OpenGl_Caps::OpenGl_Caps()
26 : vboDisable        (Standard_False),
27   pntSpritesDisable (Standard_False),
28   keepArrayData     (Standard_False),
29 #if !defined(GL_ES_VERSION_2_0)
30   ffpEnable         (Standard_True),
31 #else
32   ffpEnable         (Standard_False),
33 #endif
34   swapInterval      (1),
35   buffersNoSwap     (Standard_False),
36   contextStereo     (Standard_False),
37 #ifdef OCCT_DEBUG
38   contextDebug      (Standard_True),
39   contextSyncDebug  (Standard_True),
40 #else
41   contextDebug      (Standard_False),
42   contextSyncDebug  (Standard_False),
43 #endif
44   contextNoAccel    (Standard_False),
45 #if !defined(GL_ES_VERSION_2_0)
46   contextCompatible (Standard_True),
47 #else
48   contextCompatible (Standard_False),
49 #endif
50   glslWarnings      (Standard_False),
51   suppressExtraMsg  (Standard_True)
52 {
53   //
54 }
55
56 // =======================================================================
57 // function : operator=
58 // purpose  :
59 // =======================================================================
60 OpenGl_Caps& OpenGl_Caps::operator= (const OpenGl_Caps& theCopy)
61 {
62   vboDisable        = theCopy.vboDisable;
63   pntSpritesDisable = theCopy.pntSpritesDisable;
64   keepArrayData     = theCopy.keepArrayData;
65   ffpEnable         = theCopy.ffpEnable;
66   swapInterval      = theCopy.swapInterval;
67   buffersNoSwap     = theCopy.buffersNoSwap;
68   contextStereo     = theCopy.contextStereo;
69   contextDebug      = theCopy.contextDebug;
70   contextSyncDebug  = theCopy.contextSyncDebug;
71   contextNoAccel    = theCopy.contextNoAccel;
72   contextCompatible = theCopy.contextCompatible;
73   glslWarnings      = theCopy.glslWarnings;
74   suppressExtraMsg  = theCopy.suppressExtraMsg;
75   return *this;
76 }
77
78 // =======================================================================
79 // function : ~OpenGl_Caps
80 // purpose  :
81 // =======================================================================
82 OpenGl_Caps::~OpenGl_Caps()
83 {
84   //
85 }