0031505: Point Cloud Rendering - fix on-screen statistics about number of visible...
[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_RTTIEXT(OpenGl_Caps,Standard_Transient)
21
22 // =======================================================================
23 // function : OpenGl_Caps
24 // purpose  :
25 // =======================================================================
26 OpenGl_Caps::OpenGl_Caps()
27 : sRGBDisable       (Standard_False),
28   vboDisable        (Standard_False),
29   pntSpritesDisable (Standard_False),
30   keepArrayData     (Standard_False),
31   ffpEnable         (Standard_False),
32   usePolygonMode    (Standard_False),
33 #if !defined(GL_ES_VERSION_2_0)
34   useSystemBuffer   (Standard_False),
35 #else
36   useSystemBuffer   (Standard_True),
37 #endif
38   swapInterval      (1),
39   buffersNoSwap     (Standard_False),
40   contextStereo     (Standard_False),
41 #ifdef OCCT_DEBUG
42   contextDebug      (Standard_True),
43   contextSyncDebug  (Standard_True),
44 #else
45   contextDebug      (Standard_False),
46   contextSyncDebug  (Standard_False),
47 #endif
48   contextNoAccel    (Standard_False),
49 #if !defined(GL_ES_VERSION_2_0)
50   contextCompatible (Standard_True),
51 #else
52   contextCompatible (Standard_False),
53 #endif
54   contextNoExtensions (Standard_False),
55   contextMajorVersionUpper (-1),
56   contextMinorVersionUpper (-1),
57   glslWarnings      (Standard_False),
58   suppressExtraMsg  (Standard_True),
59   glslDumpLevel     (OpenGl_ShaderProgramDumpLevel_Off)
60 {
61   //
62 }
63
64 // =======================================================================
65 // function : operator=
66 // purpose  :
67 // =======================================================================
68 OpenGl_Caps& OpenGl_Caps::operator= (const OpenGl_Caps& theCopy)
69 {
70   sRGBDisable       = theCopy.sRGBDisable;
71   vboDisable        = theCopy.vboDisable;
72   pntSpritesDisable = theCopy.pntSpritesDisable;
73   keepArrayData     = theCopy.keepArrayData;
74   ffpEnable         = theCopy.ffpEnable;
75   useSystemBuffer   = theCopy.useSystemBuffer;
76   swapInterval      = theCopy.swapInterval;
77   buffersNoSwap     = theCopy.buffersNoSwap;
78   contextStereo     = theCopy.contextStereo;
79   contextDebug      = theCopy.contextDebug;
80   contextSyncDebug  = theCopy.contextSyncDebug;
81   contextNoAccel    = theCopy.contextNoAccel;
82   contextCompatible = theCopy.contextCompatible;
83   contextNoExtensions = theCopy.contextNoExtensions;
84   contextMajorVersionUpper = theCopy.contextMajorVersionUpper;
85   contextMinorVersionUpper = theCopy.contextMinorVersionUpper;
86   glslWarnings      = theCopy.glslWarnings;
87   suppressExtraMsg  = theCopy.suppressExtraMsg;
88   glslDumpLevel     = theCopy.glslDumpLevel;
89   return *this;
90 }
91
92 // =======================================================================
93 // function : ~OpenGl_Caps
94 // purpose  :
95 // =======================================================================
96 OpenGl_Caps::~OpenGl_Caps()
97 {
98   //
99 }