1 // Created on: 2013-08-25
2 // Created by: Kirill GAVRILOV
3 // Copyright (c) 2013-2014 OPEN CASCADE SAS
5 // This file is part of Open CASCADE Technology software library.
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.
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
16 #include <OpenGl_Caps.hxx>
18 #include <OpenGl_GlCore20.hxx>
20 IMPLEMENT_STANDARD_RTTIEXT(OpenGl_Caps,Standard_Transient)
22 // =======================================================================
23 // function : OpenGl_Caps
25 // =======================================================================
26 OpenGl_Caps::OpenGl_Caps()
27 : sRGBDisable (Standard_False),
28 compressedTexturesDisable (Standard_False),
29 vboDisable (Standard_False),
30 pntSpritesDisable (Standard_False),
31 keepArrayData (Standard_False),
32 ffpEnable (Standard_False),
33 usePolygonMode (Standard_False),
34 #if !defined(GL_ES_VERSION_2_0)
35 useSystemBuffer (Standard_False),
37 useSystemBuffer (Standard_True),
40 useZeroToOneDepth (Standard_False),
41 buffersNoSwap (Standard_False),
42 buffersOpaqueAlpha(Standard_False),
43 contextStereo (Standard_False),
45 contextDebug (Standard_True),
46 contextSyncDebug (Standard_True),
48 contextDebug (Standard_False),
49 contextSyncDebug (Standard_False),
51 contextNoAccel (Standard_False),
52 #if !defined(GL_ES_VERSION_2_0)
53 contextCompatible (Standard_True),
55 contextCompatible (Standard_False),
57 contextNoExtensions (Standard_False),
58 contextMajorVersionUpper (-1),
59 contextMinorVersionUpper (-1),
60 isTopDownTextureUV(Standard_False),
61 glslWarnings (Standard_False),
62 suppressExtraMsg (Standard_True),
63 glslDumpLevel (OpenGl_ShaderProgramDumpLevel_Off)
68 // =======================================================================
69 // function : operator=
71 // =======================================================================
72 OpenGl_Caps& OpenGl_Caps::operator= (const OpenGl_Caps& theCopy)
74 sRGBDisable = theCopy.sRGBDisable;
75 compressedTexturesDisable = theCopy.compressedTexturesDisable;
76 vboDisable = theCopy.vboDisable;
77 pntSpritesDisable = theCopy.pntSpritesDisable;
78 keepArrayData = theCopy.keepArrayData;
79 ffpEnable = theCopy.ffpEnable;
80 useSystemBuffer = theCopy.useSystemBuffer;
81 swapInterval = theCopy.swapInterval;
82 useZeroToOneDepth = theCopy.useZeroToOneDepth;
83 buffersNoSwap = theCopy.buffersNoSwap;
84 buffersOpaqueAlpha= theCopy.buffersOpaqueAlpha;
85 contextStereo = theCopy.contextStereo;
86 contextDebug = theCopy.contextDebug;
87 contextSyncDebug = theCopy.contextSyncDebug;
88 contextNoAccel = theCopy.contextNoAccel;
89 contextCompatible = theCopy.contextCompatible;
90 contextNoExtensions = theCopy.contextNoExtensions;
91 contextMajorVersionUpper = theCopy.contextMajorVersionUpper;
92 contextMinorVersionUpper = theCopy.contextMinorVersionUpper;
93 isTopDownTextureUV = theCopy.isTopDownTextureUV;
94 glslWarnings = theCopy.glslWarnings;
95 suppressExtraMsg = theCopy.suppressExtraMsg;
96 glslDumpLevel = theCopy.glslDumpLevel;
100 // =======================================================================
101 // function : ~OpenGl_Caps
103 // =======================================================================
104 OpenGl_Caps::~OpenGl_Caps()