Open Inventor
Release 2023.2.3
Loading...
Searching...
No Matches
SoGLFormat.h
Go to the documentation of this file.
1
/*=======================================================================
2
*** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), ***
3
*** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. ***
4
*** ***
5
*** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS ***
6
*** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR ***
7
*** WRITTEN AUTHORIZATION OF FEI S.A.S. ***
8
*** ***
9
*** RESTRICTED RIGHTS LEGEND ***
10
*** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS ***
11
*** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN ***
12
*** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT ***
13
*** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN ***
14
*** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. ***
15
*** ***
16
*** COPYRIGHT (C) 1996-2021 BY FEI S.A.S, ***
17
*** BORDEAUX, FRANCE ***
18
*** ALL RIGHTS RESERVED ***
19
**=======================================================================*/
20
/*=======================================================================
21
** Author : VSG (MMM YYYY)
22
**=======================================================================*/
23
#if !defined( SO_GLFORMAT_H )
24
#define SO_GLFORMAT_H
25
26
27
#include <
Inventor/sys/port.h
>
28
#include <
Inventor/SbBase.h
>
29
#include <
Inventor/helpers/SbGlContextHelper.h
>
30
32
namespace
renderengine
33
{
34
namespace
utils
35
{
36
namespace
GL
37
{
38
class
Format;
39
}
40
}
41
}
54
class
SoGLFormat
55
{
56
public
:
57
61
SoGLFormat
();
62
67
SoGLFormat
(
const
SbGlContextHelper::Display
& display );
68
72
SoGLFormat
(
const
SoGLFormat
& refFormat );
73
77
virtual
~SoGLFormat
();
78
82
void
setDoubleBuffersEnabled
(
const
bool
enabled );
83
87
bool
hasDoubleBuffers
()
const
;
88
92
bool
hasDepth
()
const
;
93
97
void
setDepthEnabled
(
const
bool
enable
);
98
102
void
setDepthBits
(
const
int
bits );
103
107
int
getDepthBits
()
const
;
108
112
bool
hasAlpha
()
const
;
113
117
void
setAlphaEnabled
(
const
bool
enable
);
118
122
void
setSampleBuffersEnabled
(
const
bool
enable
);
123
127
bool
hasSampleBuffers
()
const
;
128
132
void
setSamplesCount
(
const
int
countSamples );
133
137
int
getSamplesCount
()
const
;
138
142
void
setStereoEnabled
(
const
bool
enable
);
143
147
bool
hasStereo
()
const
;
148
152
void
setRgbEnabled
(
const
bool
enabled );
153
157
bool
hasRgb
()
const
;
158
159
void
setRedBits
(
int
bits);
160
161
int
getRedBits
()
const
;
162
163
void
setGreenBits
(
int
bits);
164
165
int
getGreenBits
()
const
;
166
167
void
setBlueBits
(
int
bits);
168
169
int
getBlueBits
()
const
;
170
171
void
setAlphaBits
(
int
bits);
172
173
int
getAlphaBits
()
const
;
174
178
void
setFloatColorBufferEnabled
(
const
bool
enable
);
179
183
bool
hasFloatColorBuffer
()
const
;
184
188
void
setStencilBufferEnabled
(
const
bool
enabled );
189
193
bool
hasStencilBuffer
()
const
;
194
198
void
setStencilBufferBits
(
const
int
size
);
199
203
int
getStencilBufferBits
()
const
;
204
208
void
setAccumBufferEnabled
(
const
bool
enabled );
209
213
bool
hasAccumBuffer
()
const
;
214
218
void
setAccumBufferBits
(
const
int
size
);
219
223
int
getAccumBufferBits
()
const
;
224
229
bool
isAvailable
()
const
;
230
236
SoGLFormat
getNearest
()
const
;
237
242
bool
activate
();
243
247
const
SbGlContextHelper::Display
&
getDisplay
()
const
;
248
253
const
SbGlContextHelper::VisualInfo
&
getVisualInfo
()
const
;
254
269
void
setCompositionRequired
(
const
bool
required );
270
274
bool
isCompositionRequired
()
const
;
275
287
void
setGDISupportRequired
(
const
bool
required );
288
292
bool
isGDISupportRequired
()
const
;
293
297
void
setAccelerationRequired
(
const
bool
enable
);
298
302
bool
isAccelerationRequired
()
const
;
303
307
static
SoGLFormat
getDefaultFormat
();
308
312
void
setDisplay
(
const
SbGlContextHelper::Display
& display );
313
321
void
setVisualInfo
(
const
SbGlContextHelper::VisualInfo
& visualInfo );
322
326
void
setVisualInfoId
(
const
int
viId );
327
331
int
getVisualInfoId
()
const
;
332
336
void
setOpenglAttributes
(
const
SbGlContextHelper::Display
& display,
int
pfd,
int
* attributes,
337
int
* results );
338
342
SoGLFormat
&
operator=
(
const
SoGLFormat
& ref );
343
353
void
setSoftwareRendererRequired
(
const
bool
enable
);
354
358
bool
isSoftwareRendererRequired
()
const
;
359
360
private
:
361
367
bool
isGDIAvailable()
const
;
368
374
bool
isRDPMode()
const
;
375
376
#if defined(_WIN32)
381
SoGLFormat
(
const
SbGlContextHelper::Display
& display,
bool
copyDC);
382
387
void
setDisplay
(
const
SbGlContextHelper::Display
& display,
bool
copyDC);
388
#endif
//_WIN32
389
390
private
:
391
395
void
init();
396
397
void
resetDetectedData();
398
399
private
:
400
renderengine::utils::GL::Format* m_format;
401
};
402
403
#endif
// SO_GLFORMAT_H
404
405
SbBase.h
SbGlContextHelper.h
enable
virtual void enable(QWidget *w, XtEventHandler f, XtPointer data, void *unused=NULL)
SoGLFormat
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> OpenGL pixel for...
Definition
SoGLFormat.h:55
SoGLFormat::getGreenBits
int getGreenBits() const
SoGLFormat::setVisualInfo
void setVisualInfo(const SbGlContextHelper::VisualInfo &visualInfo)
Sets the visual info associated with this format.
SoGLFormat::setAlphaBits
void setAlphaBits(int bits)
SoGLFormat::hasStencilBuffer
bool hasStencilBuffer() const
Returns true if this format has a stencil buffer.
SoGLFormat::getAlphaBits
int getAlphaBits() const
SoGLFormat::getDisplay
const SbGlContextHelper::Display & getDisplay() const
Returns the display on which this format is attached.
SoGLFormat::isCompositionRequired
bool isCompositionRequired() const
Returns true if composition is required for this pixel format.
SoGLFormat::getRedBits
int getRedBits() const
SoGLFormat::setStencilBufferEnabled
void setStencilBufferEnabled(const bool enabled)
Sets the stencil buffer state of this format.
SoGLFormat::SoGLFormat
SoGLFormat(const SbGlContextHelper::Display &display)
Constructor that uses the default format and stores the specified display.
SoGLFormat::setGDISupportRequired
void setGDISupportRequired(const bool required)
Sets the GDI support requirement of the pixel format.
SoGLFormat::hasSampleBuffers
bool hasSampleBuffers() const
Returns true if this format has sample buffers.
SoGLFormat::setDepthBits
void setDepthBits(const int bits)
Sets the depth buffer bits of this format.
SoGLFormat::setDoubleBuffersEnabled
void setDoubleBuffersEnabled(const bool enabled)
Sets the double buffering state of this format.
SoGLFormat::setDisplay
void setDisplay(const SbGlContextHelper::Display &display)
Sets the display associated with this format.
SoGLFormat::setVisualInfoId
void setVisualInfoId(const int viId)
Sets the PFD id associated with this visualInfo.
SoGLFormat::setDepthEnabled
void setDepthEnabled(const bool enable)
Sets the depth buffer state of this format.
SoGLFormat::setAccumBufferEnabled
void setAccumBufferEnabled(const bool enabled)
Sets the accumulation buffer state of this format.
SoGLFormat::SoGLFormat
SoGLFormat(const SoGLFormat &refFormat)
Constructor that initializes the format from the specified one.
SoGLFormat::hasDepth
bool hasDepth() const
Returns true if this format has a depth buffer.
SoGLFormat::~SoGLFormat
virtual ~SoGLFormat()
Destructor.
SoGLFormat::hasAccumBuffer
bool hasAccumBuffer() const
Returns true if this format has an accumulation buffer.
SoGLFormat::setBlueBits
void setBlueBits(int bits)
SoGLFormat::isSoftwareRendererRequired
bool isSoftwareRendererRequired() const
Returns true if the software renderer is required for this format.
SoGLFormat::getDefaultFormat
static SoGLFormat getDefaultFormat()
Returns the default format used.
SoGLFormat::getSamplesCount
int getSamplesCount() const
Returns the samples count of this format.
SoGLFormat::setStereoEnabled
void setStereoEnabled(const bool enable)
Sets the stereo state of this format.
SoGLFormat::hasFloatColorBuffer
bool hasFloatColorBuffer() const
Returns true if this format has a float color buffer.
SoGLFormat::getVisualInfoId
int getVisualInfoId() const
Returns the PFD associated with this visualInfo.
SoGLFormat::hasStereo
bool hasStereo() const
Returns true if this format has stereo.
SoGLFormat::setSoftwareRendererRequired
void setSoftwareRendererRequired(const bool enable)
Specified that a software renderer is required for this format.
SoGLFormat::activate
bool activate()
Tries to activate the format for the current display.
SoGLFormat::isAccelerationRequired
bool isAccelerationRequired() const
Returns TRUE if hardware acceleration support is required for this pixel format.
SoGLFormat::getVisualInfo
const SbGlContextHelper::VisualInfo & getVisualInfo() const
Returns the visual info of the format.
SoGLFormat::setAccumBufferBits
void setAccumBufferBits(const int size)
Sets the accumulation buffer bits of this format.
SoGLFormat::setCompositionRequired
void setCompositionRequired(const bool required)
Sets the composition requirement of the pixel format.
SoGLFormat::hasAlpha
bool hasAlpha() const
Returns true if this format has an alpha channel.
SoGLFormat::setStencilBufferBits
void setStencilBufferBits(const int size)
Sets the stencil buffer bits of this format.
SoGLFormat::setSampleBuffersEnabled
void setSampleBuffersEnabled(const bool enable)
Sets the sample buffers state of this format.
SoGLFormat::getDepthBits
int getDepthBits() const
Returns the depth buffer bits of this format.
SoGLFormat::setGreenBits
void setGreenBits(int bits)
SoGLFormat::setAccelerationRequired
void setAccelerationRequired(const bool enable)
Sets the hardware acceleration support requirement of this pixel format.
SoGLFormat::getBlueBits
int getBlueBits() const
SoGLFormat::getAccumBufferBits
int getAccumBufferBits() const
Returns the accumulation buffer bits of this format.
SoGLFormat::getStencilBufferBits
int getStencilBufferBits() const
Returns the stencil buffer bits of this format.
SoGLFormat::getNearest
SoGLFormat getNearest() const
Returns the supported format which is the nearest available on this system.
SoGLFormat::hasRgb
bool hasRgb() const
Returns true if this format is RGB.
SoGLFormat::operator=
SoGLFormat & operator=(const SoGLFormat &ref)
Operator = to copy the data.
SoGLFormat::setFloatColorBufferEnabled
void setFloatColorBufferEnabled(const bool enable)
Sets the Float color buffer state of this format.
SoGLFormat::isAvailable
bool isAvailable() const
Returns true if this format is available on the system.
SoGLFormat::SoGLFormat
SoGLFormat()
Default constructor -> we set the default format.
SoGLFormat::setSamplesCount
void setSamplesCount(const int countSamples)
Sets the samples count of this format.
SoGLFormat::setOpenglAttributes
void setOpenglAttributes(const SbGlContextHelper::Display &display, int pfd, int *attributes, int *results)
Sets the format according to the openGL attributes.
SoGLFormat::isGDISupportRequired
bool isGDISupportRequired() const
Returns true if GDI support is required for this pixel format.
SoGLFormat::hasDoubleBuffers
bool hasDoubleBuffers() const
Returns true if this format is double buffered.
SoGLFormat::setRedBits
void setRedBits(int bits)
SoGLFormat::setAlphaEnabled
void setAlphaEnabled(const bool enable)
Sets the alpha channel state of this format.
SoGLFormat::setRgbEnabled
void setRgbEnabled(const bool enabled)
Sets the RGB state of this format.
size
size_t size() const
SbGlContextHelper::Display
::Display * Display
Definition
SbGlContextHelper.h:146
SbGlContextHelper::VisualInfo
void * VisualInfo
Definition
SbGlContextHelper.h:148
port.h
Inventor
devices
SoGLFormat.h
Generated by
1.9.8