1 /*---------------------------------------------------------------------------*\
5 * Copyright (C) 2000-2002 by the OpenSG Forum *
9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de *
11 \*---------------------------------------------------------------------------*/
12 /*---------------------------------------------------------------------------*\
15 * This library is free software; you can redistribute it and/or modify it *
16 * under the terms of the GNU Library General Public License as published *
17 * by the Free Software Foundation, version 2. *
19 * This library is distributed in the hope that it will be useful, but *
20 * WITHOUT ANY WARRANTY; without even the implied warranty of *
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
22 * Library General Public License for more details. *
24 * You should have received a copy of the GNU Library General Public *
25 * License along with this library; if not, write to the Free Software *
26 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
28 \*---------------------------------------------------------------------------*/
29 /*---------------------------------------------------------------------------*\
37 \*---------------------------------------------------------------------------*/
39 #ifndef _OSGIMAGECOMPOSER_H_
40 #define _OSGIMAGECOMPOSER_H_
46 #include "OSGImageComposerBase.h"
47 #include "OSGWindow.h"
48 #include "OSGClusterWindow.h"
49 #include "OSGViewport.h"
53 /*! \ingroup GrpClusterWindowComposer
54 \ingroup GrpLibOSGCluster
58 class OSG_CLUSTER_DLLMAPPING ImageComposer
: public ImageComposerBase
62 /*========================== PUBLIC =================================*/
66 typedef ImageComposerBase Inherited
;
68 /*---------------------------------------------------------------------*/
72 virtual void changed(ConstFieldMaskArg whichField
,
77 /*---------------------------------------------------------------------*/
81 virtual void dump( UInt32 uiIndent
= 0,
82 const BitVector bvFlags
= 0) const;
85 /*---------------------------------------------------------------------*/
89 void setup(bool bIsClient
,
92 ClusterWindow
*pClusterWindow
);
95 /*---------------------------------------------------------------------*/
96 /*! \name composition */
99 virtual void open (void );
100 virtual void startFrame (void );
101 virtual void startViewport (Viewport
*port
);
102 virtual void composeViewport(Viewport
*port
);
103 virtual void composeWindow (void );
104 virtual void close (void );
107 /*---------------------------------------------------------------------*/
108 /*! \name features */
111 virtual bool getClientRendering(void);
112 virtual UInt32
getUsableServers (void);
115 /*========================= PROTECTED ===============================*/
119 /*---------------------------------------------------------------------*/
120 /*! \name protected variables */
127 Window
*_localWindow
;
128 ClusterWindow
*_clusterWindow
;
131 /*---------------------------------------------------------------------*/
135 bool isClient (void);
136 UInt32
clusterId (void);
137 UInt32
clusterSize (void);
138 UInt32
serverCount (void);
139 Window
*localWindow (void);
140 ClusterWindow
*clusterWindow(void);
143 /*---------------------------------------------------------------------*/
147 bool getScreenAlignedBBox(Node
*root
,
157 /*---------------------------------------------------------------------*/
158 /*! \name Constructors */
162 ImageComposer(const ImageComposer
&source
);
165 /*---------------------------------------------------------------------*/
166 /*! \name Destructors */
169 virtual ~ImageComposer(void);
172 /*---------------------------------------------------------------------*/
176 static void initMethod(InitPhase ePhase
);
177 static void exitMethod(InitPhase ePhase
);
180 /*========================== PRIVATE ================================*/
184 friend class FieldContainer
;
185 friend class ImageComposerBase
;
187 // prohibit default functions (move to 'public' if you need one)
188 void operator =(const ImageComposer
&source
);
191 typedef ImageComposer
*ImageComposerP
;
195 #include "OSGImageComposerBase.inl"
196 #include "OSGImageComposer.inl"
198 #endif /* _OSGIMAGECOMPOSER_H_ */