ROOT
v6-24
Reference Guide
Loading...
Searching...
No Matches
TGLFormat.h
Go to the documentation of this file.
1
// @(#)root/gl:$Id$
2
// Author: Timur Pocheptsov, Jun 2007
3
4
/*************************************************************************
5
* Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. *
6
* All rights reserved. *
7
* *
8
* For the licensing terms see $ROOTSYS/LICENSE. *
9
* For the list of contributors see $ROOTSYS/README/CREDITS. *
10
*************************************************************************/
11
12
#ifndef ROOT_TGLFormat
13
#define ROOT_TGLFormat
14
15
#include "
TVirtualGL.h
"
16
#include "
Rtypes.h
"
17
18
#include <vector>
19
20
/*
21
TGLFormat class describes the pixel format of a drawing surface.
22
It's a generic analog of PIXELFORMATDESCRIPTOR (win32) or
23
array of integer constants array for glXChooseVisual (X11).
24
This class is in a very preliminary state, different
25
options have not been tested yet, only defaults.
26
27
Surface can be:
28
-RGBA
29
-with/without depth buffer
30
-with/without stencil buffer
31
-with/without accum buffer
32
-double/single buffered
33
*/
34
35
class
TGLFormat
36
{
37
private
:
38
Bool_t
fDoubleBuffered
;
39
Bool_t
fStereo
;
40
Int_t
fDepthSize
;
41
Int_t
fAccumSize
;
42
Int_t
fStencilSize
;
43
Int_t
fSamples
;
44
45
static
std::vector<Int_t>
fgAvailableSamples
;
46
47
static
Int_t
GetDefaultSamples
();
48
static
void
InitAvailableSamples
();
49
50
public
:
51
TGLFormat
();
52
TGLFormat
(
Rgl::EFormatOptions
options);
53
54
//Virtual dtor only to supress warnings from g++ -
55
//ClassDef adds virtual functions, so g++ wants virtual dtor.
56
virtual
~TGLFormat
();
57
58
Bool_t
operator ==
(
const
TGLFormat
&rhs)
const
;
59
Bool_t
operator !=
(
const
TGLFormat
&rhs)
const
;
60
61
Int_t
GetDepthSize
()
const
;
62
void
SetDepthSize
(
Int_t
depth);
63
Bool_t
HasDepth
()
const
;
64
65
Int_t
GetStencilSize
()
const
;
66
void
SetStencilSize
(
Int_t
stencil);
67
Bool_t
HasStencil
()
const
;
68
69
Int_t
GetAccumSize
()
const
;
70
void
SetAccumSize
(
Int_t
accum
);
71
Bool_t
HasAccumBuffer
()
const
;
72
73
Bool_t
IsDoubleBuffered
()
const
;
74
void
SetDoubleBuffered
(
Bool_t
db);
75
76
Bool_t
IsStereo
()
const
;
77
void
SetStereo
(
Bool_t
db);
78
79
Int_t
GetSamples
()
const
;
80
void
SetSamples
(
Int_t
samples);
81
Bool_t
HasMultiSampling
()
const
;
82
83
ClassDef
(
TGLFormat
, 0);
// Describes GL buffer format.
84
};
85
86
#endif
Rtypes.h
ClassDef
#define ClassDef(name, id)
Definition
Rtypes.h:325
TVirtualGL.h
TGLFormat
Encapsulation of format / contents of an OpenGL buffer.
Definition
TGLFormat.h:36
TGLFormat::SetStereo
void SetStereo(Bool_t db)
Set the surface as stereo/non-stereo buffered.
Definition
TGLFormat.cxx:203
TGLFormat::IsStereo
Bool_t IsStereo() const
Check, if the surface is stereo buffered.
Definition
TGLFormat.cxx:195
TGLFormat::GetDepthSize
Int_t GetDepthSize() const
Get the size of depth buffer.
Definition
TGLFormat.cxx:104
TGLFormat::GetDefaultSamples
static Int_t GetDefaultSamples()
Return default number of samples for multi-sampling.
Definition
TGLFormat.cxx:235
TGLFormat::InitAvailableSamples
static void InitAvailableSamples()
Definition
TGLFormat.cxx:263
TGLFormat::fDoubleBuffered
Bool_t fDoubleBuffered
Definition
TGLFormat.h:38
TGLFormat::~TGLFormat
virtual ~TGLFormat()
Destructor.
Definition
TGLFormat.cxx:80
TGLFormat::operator!=
Bool_t operator!=(const TGLFormat &rhs) const
Check for non-equality.
Definition
TGLFormat.cxx:96
TGLFormat::fStencilSize
Int_t fStencilSize
Definition
TGLFormat.h:42
TGLFormat::GetStencilSize
Int_t GetStencilSize() const
Get the size of stencil buffer.
Definition
TGLFormat.cxx:129
TGLFormat::fStereo
Bool_t fStereo
Definition
TGLFormat.h:39
TGLFormat::fDepthSize
Int_t fDepthSize
Definition
TGLFormat.h:40
TGLFormat::SetAccumSize
void SetAccumSize(Int_t accum)
Set the size of accum buffer.
Definition
TGLFormat.cxx:162
TGLFormat::SetSamples
void SetSamples(Int_t samples)
Set the number of samples for multi-sampling.
Definition
TGLFormat.cxx:219
TGLFormat::fAccumSize
Int_t fAccumSize
Definition
TGLFormat.h:41
TGLFormat::SetDoubleBuffered
void SetDoubleBuffered(Bool_t db)
Set the surface as double/single buffered.
Definition
TGLFormat.cxx:187
TGLFormat::fgAvailableSamples
static std::vector< Int_t > fgAvailableSamples
Definition
TGLFormat.h:45
TGLFormat::HasMultiSampling
Bool_t HasMultiSampling() const
Check, if multi-sampling is required.
Definition
TGLFormat.cxx:227
TGLFormat::GetSamples
Int_t GetSamples() const
Get the number of samples for multi-sampling.
Definition
TGLFormat.cxx:211
TGLFormat::HasStencil
Bool_t HasStencil() const
Check, if this surface has stencil buffer.
Definition
TGLFormat.cxx:146
TGLFormat::SetStencilSize
void SetStencilSize(Int_t stencil)
Set the size of stencil buffer.
Definition
TGLFormat.cxx:137
TGLFormat::HasDepth
Bool_t HasDepth() const
Check, if this surface has depth buffer.
Definition
TGLFormat.cxx:121
TGLFormat::IsDoubleBuffered
Bool_t IsDoubleBuffered() const
Check, if the surface is double buffered.
Definition
TGLFormat.cxx:179
TGLFormat::GetAccumSize
Int_t GetAccumSize() const
Get the size of accum buffer.
Definition
TGLFormat.cxx:154
TGLFormat::operator==
Bool_t operator==(const TGLFormat &rhs) const
Check if two formats are equal.
Definition
TGLFormat.cxx:87
TGLFormat::HasAccumBuffer
Bool_t HasAccumBuffer() const
Check, if this surface has accumulation buffer.
Definition
TGLFormat.cxx:171
TGLFormat::SetDepthSize
void SetDepthSize(Int_t depth)
Set the size of color buffer.
Definition
TGLFormat.cxx:112
TGLFormat::fSamples
Int_t fSamples
Definition
TGLFormat.h:43
TGLFormat::TGLFormat
TGLFormat()
Definition
TGLFormat.cxx:36
bool
int
Rgl::EFormatOptions
EFormatOptions
Definition
TVirtualGL.h:129
accum
static char accum[256]
Definition
gifencode.c:210
graf3d
gl
inc
TGLFormat.h
ROOT v6-24 - Reference Guide Generated on Tue Aug 22 2023 03:06:25 (GVA Time) using Doxygen 1.9.8