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 _OSGPARALLELCOMPOSER_H_
40 #define _OSGPARALLELCOMPOSER_H_
45 #include "OSGParallelComposerBase.h"
48 #ifdef OSG_WITH_PARALLEL
60 /*! \brief ParallelComposer class. See \ref
61 PageSystemParallelComposer for a description.
63 \ingroup GrpClusterWindowComposer
64 \ingroup GrpLibOSGCluster
68 class OSG_CLUSTER_DLLMAPPING ParallelComposer
: public ParallelComposerBase
72 typedef ParallelComposerBase Inherited
;
74 /*========================== PUBLIC =================================*/
78 /*---------------------------------------------------------------------*/
82 virtual void changed(ConstFieldMaskArg whichField
,
87 /*---------------------------------------------------------------------*/
91 virtual void dump( UInt32 uiIndent
= 0,
92 const BitVector bvFlags
= 0) const;
94 /*---------------------------------------------------------------------*/
98 virtual bool clientRendering (void);
101 /*---------------------------------------------------------------------*/
102 /*! \name composition */
105 virtual void open ( );
106 virtual void composeViewport(Viewport
*port
);
107 virtual void close (void );
110 /*---------------------------------------------------------------------*/
111 /*! \name features */
114 virtual bool getClientRendering(void);
115 virtual UInt32
getUsableServers (void);
118 /*========================= PROTECTED ===============================*/
122 UInt32 _usableServers
;
125 Real64 _fRenderRequest
[6];
127 char _serviceAddr
[256];
132 #ifdef OSG_WITH_PARALLEL
137 /*---------------------------------------------------------------------*/
138 /*! \name Constructors */
141 ParallelComposer(void);
142 ParallelComposer(const ParallelComposer
&source
);
145 /*---------------------------------------------------------------------*/
146 /*! \name Destructors */
149 virtual ~ParallelComposer(void);
152 /*---------------------------------------------------------------------*/
160 /*---------------------------------------------------------------------*/
164 static void initMethod(InitPhase ePhase
);
167 /*========================== PRIVATE ================================*/
172 void createCtx (Viewport
*port
);
173 void endFrame (UInt32 id
);
174 UInt32
beginFrame(void );
175 void drawFrame (void );
176 void renderRead(void );
178 friend class FieldContainer
;
179 friend class ParallelComposerBase
;
182 // prohibit default functions (move to 'public' if you need one)
183 void operator =(const ParallelComposer
&source
);
187 typedef ParallelComposer
*ParallelComposerP
;
191 #include "OSGParallelComposerBase.inl"
192 #include "OSGParallelComposer.inl"
194 #endif /* _OSGPARALLELCOMPOSER_H_ */