0024428: Implementation of LGPL license
[occt.git] / src / OpenGl / OpenGl_Caps.hxx
CommitLineData
58655684 1// Created on: 2013-08-25
2// Created by: Kirill GAVRILOV
3// Copyright (c) 2013 OPEN CASCADE SAS
4//
973c2be1 5// This file is part of Open CASCADE Technology software library.
58655684 6//
973c2be1 7// This library is free software; you can redistribute it and / or modify it
8// under the terms of the GNU Lesser General Public 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.
58655684 12//
973c2be1 13// Alternatively, this file may be used under the terms of Open CASCADE
14// commercial license or contractual agreement.
58655684 15
16#ifndef _OpenGl_Caps_H__
17#define _OpenGl_Caps_H__
18
19#include <Standard_DefineHandle.hxx>
20#include <Standard_Transient.hxx>
21#include <Handle_Standard_Transient.hxx>
22
23//! Class to define graphich driver capabilities.
24//! Notice that these options will be ignored if particular functionality does not provided by GL driver
25class OpenGl_Caps : public Standard_Transient
26{
27
abe46077 28public: //! @name flags to disable particular functionality, should be used only for testing purposes!
58655684 29
a577aaab 30 Standard_Boolean vboDisable; //!< flag permits VBO usage, will significantly affect performance (OFF by default)
31 Standard_Boolean pntSpritesDisable; //!< flag permits Point Sprites usage, will significantly affect performance (OFF by default)
392ac980 32 Standard_Boolean keepArrayData; //!< Disables freeing CPU memory after building VBOs (OFF by default)
58655684 33
34public: //! @name context creation parameters
35
abe46077 36 /**
37 * Request stereoscopic context (with Quad Buffer). This flag requires support in OpenGL driver.
38 *
39 * OFF by default.
40 */
41 Standard_Boolean contextStereo;
42
43 /**
44 * Request debug GL context. This flag requires support in OpenGL driver.
45 *
46 * When turned on OpenGL driver emits error and warning messages to provided callback
47 * (see OpenGl_Context - messages will be printed to standard output).
48 * Affects performance - thus should not be turned on by products in released state.
49 *
50 * OFF by default. Currently implemented only for Windows (WGL).
51 */
52 Standard_Boolean contextDebug;
53
54 /**
55 * Disable hardware acceleration.
56 *
57 * This flag overrides default behavior, when accelerated context always preferred over software ones:
58 * - on Windows will force Microsoft software implementation;
59 * - on Mac OS X, forces Apple software implementation.
60 *
61 * Software implementations are dramatically slower - should never be used.
62 *
63 * OFF by default. Currently implemented only for Windows (WGL) and Mac OS X (Cocoa).
64 */
65 Standard_Boolean contextNoAccel;
58655684 66
392ac980 67public: //! @name flags to activate verbose output
68
69 //! Print GLSL program compilation/linkage warnings, if any. OFF by default.
70 Standard_Boolean glslWarnings;
e276548b 71
58655684 72public: //! @name class methods
73
74 //! Default constructor - initialize with most optimal values.
75 Standard_EXPORT OpenGl_Caps();
76
77 //! Destructor.
78 Standard_EXPORT virtual ~OpenGl_Caps();
79
80 //! Copy maker.
81 Standard_EXPORT OpenGl_Caps& operator= (const OpenGl_Caps& theCopy);
82
83private:
84
85 //! Not implemented
86 OpenGl_Caps (const OpenGl_Caps& );
87
88public:
89
90 DEFINE_STANDARD_RTTI(OpenGl_Caps) // Type definition
91
92};
93
94DEFINE_STANDARD_HANDLE(OpenGl_Caps, Standard_Transient)
95
96#endif // _OpenGl_Caps_H__