58655684 |
1 | // Created on: 2013-08-25 |
2 | // Created by: Kirill GAVRILOV |
3 | // Copyright (c) 2013 OPEN CASCADE SAS |
4 | // |
5 | // The content of this file is subject to the Open CASCADE Technology Public |
6 | // License Version 6.5 (the "License"). You may not use the content of this file |
7 | // except in compliance with the License. Please obtain a copy of the License |
8 | // at http://www.opencascade.org and read it completely before using this file. |
9 | // |
10 | // The Initial Developer of the Original Code is Open CASCADE S.A.S., having its |
11 | // main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France. |
12 | // |
13 | // The Original Code and all software distributed under the License is |
14 | // distributed on an "AS IS" basis, without warranty of any kind, and the |
15 | // Initial Developer hereby disclaims all such warranties, including without |
16 | // limitation, any warranties of merchantability, fitness for a particular |
17 | // purpose or non-infringement. Please see the License for the specific terms |
18 | // and conditions governing the rights and limitations under the License. |
19 | |
20 | #ifndef _OpenGl_Caps_H__ |
21 | #define _OpenGl_Caps_H__ |
22 | |
23 | #include <Standard_DefineHandle.hxx> |
24 | #include <Standard_Transient.hxx> |
25 | #include <Handle_Standard_Transient.hxx> |
26 | |
27 | //! Class to define graphich driver capabilities. |
28 | //! Notice that these options will be ignored if particular functionality does not provided by GL driver |
29 | class OpenGl_Caps : public Standard_Transient |
30 | { |
31 | |
abe46077 |
32 | public: //! @name flags to disable particular functionality, should be used only for testing purposes! |
58655684 |
33 | |
a577aaab |
34 | Standard_Boolean vboDisable; //!< flag permits VBO usage, will significantly affect performance (OFF by default) |
35 | Standard_Boolean pntSpritesDisable; //!< flag permits Point Sprites usage, will significantly affect performance (OFF by default) |
58655684 |
36 | |
37 | public: //! @name context creation parameters |
38 | |
abe46077 |
39 | /** |
40 | * Request stereoscopic context (with Quad Buffer). This flag requires support in OpenGL driver. |
41 | * |
42 | * OFF by default. |
43 | */ |
44 | Standard_Boolean contextStereo; |
45 | |
46 | /** |
47 | * Request debug GL context. This flag requires support in OpenGL driver. |
48 | * |
49 | * When turned on OpenGL driver emits error and warning messages to provided callback |
50 | * (see OpenGl_Context - messages will be printed to standard output). |
51 | * Affects performance - thus should not be turned on by products in released state. |
52 | * |
53 | * OFF by default. Currently implemented only for Windows (WGL). |
54 | */ |
55 | Standard_Boolean contextDebug; |
56 | |
57 | /** |
58 | * Disable hardware acceleration. |
59 | * |
60 | * This flag overrides default behavior, when accelerated context always preferred over software ones: |
61 | * - on Windows will force Microsoft software implementation; |
62 | * - on Mac OS X, forces Apple software implementation. |
63 | * |
64 | * Software implementations are dramatically slower - should never be used. |
65 | * |
66 | * OFF by default. Currently implemented only for Windows (WGL) and Mac OS X (Cocoa). |
67 | */ |
68 | Standard_Boolean contextNoAccel; |
58655684 |
69 | |
70 | public: //! @name class methods |
71 | |
72 | //! Default constructor - initialize with most optimal values. |
73 | Standard_EXPORT OpenGl_Caps(); |
74 | |
75 | //! Destructor. |
76 | Standard_EXPORT virtual ~OpenGl_Caps(); |
77 | |
78 | //! Copy maker. |
79 | Standard_EXPORT OpenGl_Caps& operator= (const OpenGl_Caps& theCopy); |
80 | |
81 | private: |
82 | |
83 | //! Not implemented |
84 | OpenGl_Caps (const OpenGl_Caps& ); |
85 | |
86 | public: |
87 | |
88 | DEFINE_STANDARD_RTTI(OpenGl_Caps) // Type definition |
89 | |
90 | }; |
91 | |
92 | DEFINE_STANDARD_HANDLE(OpenGl_Caps, Standard_Transient) |
93 | |
94 | #endif // _OpenGl_Caps_H__ |