1 /*---------------------------------------------------------------------------*\
5 * Copyright (C) 2000-2013 by the OpenSG Forum *
9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, carsten_neumann@gmx.net *
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 /*****************************************************************************\
40 *****************************************************************************
42 ** This file is automatically generated. **
44 ** Any changes made to this file WILL be lost when it is **
45 ** regenerated, which can become necessary at any time. **
47 ** Do not change this file, changes should be done in the derived **
48 ** class ClusterShadingStage
50 *****************************************************************************
51 \*****************************************************************************/
54 #ifndef _OSGCLUSTERSHADINGSTAGEBASE_H_
55 #define _OSGCLUSTERSHADINGSTAGEBASE_H_
61 #include "OSGConfig.h"
62 #include "OSGContribTechniquesDef.h"
64 //#include "OSGBaseTypes.h"
66 #include "OSGStage.h" // Parent
68 #include "OSGSysFields.h" // BlockSize type
69 #include "OSGBaseFields.h" // AffectedLightIndexListBlockName type
70 #include "OSGNodeFields.h" // FrustNode type
71 #include "OSGAlgorithmComputeElementFields.h" // FrustAlgoElement type
72 #include "OSGComputeShaderAlgorithmFields.h" // FrustCompShaderAlgo type
73 #include "OSGMultiLightChunkFields.h" // MultiLightChunk type
74 #include "OSGShaderProgramChunkFields.h" // ShaderProgChunk type
76 #include "OSGClusterShadingStageFields.h"
81 class ClusterShadingStage
;
83 //! \brief ClusterShadingStage Base Class.
85 class OSG_CONTRIBTECHNIQUES_DLLMAPPING ClusterShadingStageBase
: public Stage
89 typedef Stage Inherited
;
90 typedef Stage ParentContainer
;
92 typedef Inherited::TypeObject TypeObject
;
93 typedef TypeObject::InitPhase InitPhase
;
95 OSG_GEN_INTERNALPTR(ClusterShadingStage
);
97 /*========================== PUBLIC =================================*/
103 BlockSizeFieldId
= Inherited::NextFieldId
,
104 TileSizeFieldId
= BlockSizeFieldId
+ 1,
105 NumClusterZFieldId
= TileSizeFieldId
+ 1,
106 NearPlaneOffsetFieldId
= NumClusterZFieldId
+ 1,
107 DispatchDataBindingPntFieldId
= NearPlaneOffsetFieldId
+ 1,
108 ClusterDataBindingPntFieldId
= DispatchDataBindingPntFieldId
+ 1,
109 LightBindingPntFieldId
= ClusterDataBindingPntFieldId
+ 1,
110 AffectedLightIndexListBindingPntFieldId
= LightBindingPntFieldId
+ 1,
111 FrustumBindingPntFieldId
= AffectedLightIndexListBindingPntFieldId
+ 1,
112 LightIndexListBindingPntFieldId
= FrustumBindingPntFieldId
+ 1,
113 LightIndexCounterBindingPntFieldId
= LightIndexListBindingPntFieldId
+ 1,
114 LightGridBindingPntFieldId
= LightIndexCounterBindingPntFieldId
+ 1,
115 AffectedLightIndexListBlockNameFieldId
= LightGridBindingPntFieldId
+ 1,
116 AffectedLightIndexListVariableNameFieldId
= AffectedLightIndexListBlockNameFieldId
+ 1,
117 LightIndexListBlockNameFieldId
= AffectedLightIndexListVariableNameFieldId
+ 1,
118 LightIndexListVariableNameFieldId
= LightIndexListBlockNameFieldId
+ 1,
119 ClusteringDataBlockNameFieldId
= LightIndexListVariableNameFieldId
+ 1,
120 ClusteringDataVariableNameFieldId
= ClusteringDataBlockNameFieldId
+ 1,
121 LightGridVariableNameFieldId
= ClusteringDataVariableNameFieldId
+ 1,
122 CalcFrustumsOnCPUFieldId
= LightGridVariableNameFieldId
+ 1,
123 CullLighsOnCPUFieldId
= CalcFrustumsOnCPUFieldId
+ 1,
124 DisabledFieldId
= CullLighsOnCPUFieldId
+ 1,
125 MaxLightIndexListSizeFieldId
= DisabledFieldId
+ 1,
126 MaxClusterLightCountFieldId
= MaxLightIndexListSizeFieldId
+ 1,
127 FrustNodeFieldId
= MaxClusterLightCountFieldId
+ 1,
128 FrustAlgoElementFieldId
= FrustNodeFieldId
+ 1,
129 FrustCompShaderAlgoFieldId
= FrustAlgoElementFieldId
+ 1,
130 CullNodeFieldId
= FrustCompShaderAlgoFieldId
+ 1,
131 CullAlgoElementFieldId
= CullNodeFieldId
+ 1,
132 CullCompShaderAlgoFieldId
= CullAlgoElementFieldId
+ 1,
133 MultiLightChunkFieldId
= CullCompShaderAlgoFieldId
+ 1,
134 ShaderProgChunkFieldId
= MultiLightChunkFieldId
+ 1,
135 NextFieldId
= ShaderProgChunkFieldId
+ 1
138 static const OSG::BitVector BlockSizeFieldMask
=
139 (TypeTraits
<BitVector
>::One
<< BlockSizeFieldId
);
140 static const OSG::BitVector TileSizeFieldMask
=
141 (TypeTraits
<BitVector
>::One
<< TileSizeFieldId
);
142 static const OSG::BitVector NumClusterZFieldMask
=
143 (TypeTraits
<BitVector
>::One
<< NumClusterZFieldId
);
144 static const OSG::BitVector NearPlaneOffsetFieldMask
=
145 (TypeTraits
<BitVector
>::One
<< NearPlaneOffsetFieldId
);
146 static const OSG::BitVector DispatchDataBindingPntFieldMask
=
147 (TypeTraits
<BitVector
>::One
<< DispatchDataBindingPntFieldId
);
148 static const OSG::BitVector ClusterDataBindingPntFieldMask
=
149 (TypeTraits
<BitVector
>::One
<< ClusterDataBindingPntFieldId
);
150 static const OSG::BitVector LightBindingPntFieldMask
=
151 (TypeTraits
<BitVector
>::One
<< LightBindingPntFieldId
);
152 static const OSG::BitVector AffectedLightIndexListBindingPntFieldMask
=
153 (TypeTraits
<BitVector
>::One
<< AffectedLightIndexListBindingPntFieldId
);
154 static const OSG::BitVector FrustumBindingPntFieldMask
=
155 (TypeTraits
<BitVector
>::One
<< FrustumBindingPntFieldId
);
156 static const OSG::BitVector LightIndexListBindingPntFieldMask
=
157 (TypeTraits
<BitVector
>::One
<< LightIndexListBindingPntFieldId
);
158 static const OSG::BitVector LightIndexCounterBindingPntFieldMask
=
159 (TypeTraits
<BitVector
>::One
<< LightIndexCounterBindingPntFieldId
);
160 static const OSG::BitVector LightGridBindingPntFieldMask
=
161 (TypeTraits
<BitVector
>::One
<< LightGridBindingPntFieldId
);
162 static const OSG::BitVector AffectedLightIndexListBlockNameFieldMask
=
163 (TypeTraits
<BitVector
>::One
<< AffectedLightIndexListBlockNameFieldId
);
164 static const OSG::BitVector AffectedLightIndexListVariableNameFieldMask
=
165 (TypeTraits
<BitVector
>::One
<< AffectedLightIndexListVariableNameFieldId
);
166 static const OSG::BitVector LightIndexListBlockNameFieldMask
=
167 (TypeTraits
<BitVector
>::One
<< LightIndexListBlockNameFieldId
);
168 static const OSG::BitVector LightIndexListVariableNameFieldMask
=
169 (TypeTraits
<BitVector
>::One
<< LightIndexListVariableNameFieldId
);
170 static const OSG::BitVector ClusteringDataBlockNameFieldMask
=
171 (TypeTraits
<BitVector
>::One
<< ClusteringDataBlockNameFieldId
);
172 static const OSG::BitVector ClusteringDataVariableNameFieldMask
=
173 (TypeTraits
<BitVector
>::One
<< ClusteringDataVariableNameFieldId
);
174 static const OSG::BitVector LightGridVariableNameFieldMask
=
175 (TypeTraits
<BitVector
>::One
<< LightGridVariableNameFieldId
);
176 static const OSG::BitVector CalcFrustumsOnCPUFieldMask
=
177 (TypeTraits
<BitVector
>::One
<< CalcFrustumsOnCPUFieldId
);
178 static const OSG::BitVector CullLighsOnCPUFieldMask
=
179 (TypeTraits
<BitVector
>::One
<< CullLighsOnCPUFieldId
);
180 static const OSG::BitVector DisabledFieldMask
=
181 (TypeTraits
<BitVector
>::One
<< DisabledFieldId
);
182 static const OSG::BitVector MaxLightIndexListSizeFieldMask
=
183 (TypeTraits
<BitVector
>::One
<< MaxLightIndexListSizeFieldId
);
184 static const OSG::BitVector MaxClusterLightCountFieldMask
=
185 (TypeTraits
<BitVector
>::One
<< MaxClusterLightCountFieldId
);
186 static const OSG::BitVector FrustNodeFieldMask
=
187 (TypeTraits
<BitVector
>::One
<< FrustNodeFieldId
);
188 static const OSG::BitVector FrustAlgoElementFieldMask
=
189 (TypeTraits
<BitVector
>::One
<< FrustAlgoElementFieldId
);
190 static const OSG::BitVector FrustCompShaderAlgoFieldMask
=
191 (TypeTraits
<BitVector
>::One
<< FrustCompShaderAlgoFieldId
);
192 static const OSG::BitVector CullNodeFieldMask
=
193 (TypeTraits
<BitVector
>::One
<< CullNodeFieldId
);
194 static const OSG::BitVector CullAlgoElementFieldMask
=
195 (TypeTraits
<BitVector
>::One
<< CullAlgoElementFieldId
);
196 static const OSG::BitVector CullCompShaderAlgoFieldMask
=
197 (TypeTraits
<BitVector
>::One
<< CullCompShaderAlgoFieldId
);
198 static const OSG::BitVector MultiLightChunkFieldMask
=
199 (TypeTraits
<BitVector
>::One
<< MultiLightChunkFieldId
);
200 static const OSG::BitVector ShaderProgChunkFieldMask
=
201 (TypeTraits
<BitVector
>::One
<< ShaderProgChunkFieldId
);
202 static const OSG::BitVector NextFieldMask
=
203 (TypeTraits
<BitVector
>::One
<< NextFieldId
);
205 typedef SFUInt32 SFBlockSizeType
;
206 typedef SFUInt32 SFTileSizeType
;
207 typedef SFUInt32 SFNumClusterZType
;
208 typedef SFReal32 SFNearPlaneOffsetType
;
209 typedef SFUInt32 SFDispatchDataBindingPntType
;
210 typedef SFUInt32 SFClusterDataBindingPntType
;
211 typedef SFUInt32 SFLightBindingPntType
;
212 typedef SFUInt32 SFAffectedLightIndexListBindingPntType
;
213 typedef SFUInt32 SFFrustumBindingPntType
;
214 typedef SFUInt32 SFLightIndexListBindingPntType
;
215 typedef SFUInt32 SFLightIndexCounterBindingPntType
;
216 typedef SFUInt32 SFLightGridBindingPntType
;
217 typedef SFString SFAffectedLightIndexListBlockNameType
;
218 typedef SFString SFAffectedLightIndexListVariableNameType
;
219 typedef SFString SFLightIndexListBlockNameType
;
220 typedef SFString SFLightIndexListVariableNameType
;
221 typedef SFString SFClusteringDataBlockNameType
;
222 typedef SFString SFClusteringDataVariableNameType
;
223 typedef SFString SFLightGridVariableNameType
;
224 typedef SFBool SFCalcFrustumsOnCPUType
;
225 typedef SFBool SFCullLighsOnCPUType
;
226 typedef SFBool SFDisabledType
;
227 typedef SFUInt32 SFMaxLightIndexListSizeType
;
228 typedef SFUInt32 SFMaxClusterLightCountType
;
229 typedef SFUnrecNodePtr SFFrustNodeType
;
230 typedef SFUnrecAlgorithmComputeElementPtr SFFrustAlgoElementType
;
231 typedef SFUnrecComputeShaderAlgorithmPtr SFFrustCompShaderAlgoType
;
232 typedef SFUnrecNodePtr SFCullNodeType
;
233 typedef SFUnrecAlgorithmComputeElementPtr SFCullAlgoElementType
;
234 typedef SFUnrecComputeShaderAlgorithmPtr SFCullCompShaderAlgoType
;
235 typedef SFUnrecMultiLightChunkPtr SFMultiLightChunkType
;
236 typedef SFUnrecShaderProgramChunkPtr SFShaderProgChunkType
;
238 /*---------------------------------------------------------------------*/
239 /*! \name Class Get */
242 static FieldContainerType
&getClassType (void);
243 static UInt32
getClassTypeId (void);
244 static UInt16
getClassGroupId(void);
247 /*---------------------------------------------------------------------*/
248 /*! \name FieldContainer Get */
251 virtual FieldContainerType
&getType (void);
252 virtual const FieldContainerType
&getType (void) const;
254 virtual UInt32
getContainerSize(void) const;
257 /*---------------------------------------------------------------------*/
258 /*! \name Field Get */
262 SFUInt32
*editSFBlockSize (void);
263 const SFUInt32
*getSFBlockSize (void) const;
265 SFUInt32
*editSFTileSize (void);
266 const SFUInt32
*getSFTileSize (void) const;
268 SFUInt32
*editSFNumClusterZ (void);
269 const SFUInt32
*getSFNumClusterZ (void) const;
271 SFReal32
*editSFNearPlaneOffset(void);
272 const SFReal32
*getSFNearPlaneOffset (void) const;
274 SFUInt32
*editSFDispatchDataBindingPnt(void);
275 const SFUInt32
*getSFDispatchDataBindingPnt (void) const;
277 SFUInt32
*editSFClusterDataBindingPnt(void);
278 const SFUInt32
*getSFClusterDataBindingPnt (void) const;
280 SFUInt32
*editSFLightBindingPnt(void);
281 const SFUInt32
*getSFLightBindingPnt (void) const;
283 SFUInt32
*editSFAffectedLightIndexListBindingPnt(void);
284 const SFUInt32
*getSFAffectedLightIndexListBindingPnt (void) const;
286 SFUInt32
*editSFFrustumBindingPnt(void);
287 const SFUInt32
*getSFFrustumBindingPnt (void) const;
289 SFUInt32
*editSFLightIndexListBindingPnt(void);
290 const SFUInt32
*getSFLightIndexListBindingPnt (void) const;
292 SFUInt32
*editSFLightIndexCounterBindingPnt(void);
293 const SFUInt32
*getSFLightIndexCounterBindingPnt (void) const;
295 SFUInt32
*editSFLightGridBindingPnt(void);
296 const SFUInt32
*getSFLightGridBindingPnt (void) const;
298 SFString
*editSFAffectedLightIndexListBlockName(void);
299 const SFString
*getSFAffectedLightIndexListBlockName (void) const;
301 SFString
*editSFAffectedLightIndexListVariableName(void);
302 const SFString
*getSFAffectedLightIndexListVariableName (void) const;
304 SFString
*editSFLightIndexListBlockName(void);
305 const SFString
*getSFLightIndexListBlockName (void) const;
307 SFString
*editSFLightIndexListVariableName(void);
308 const SFString
*getSFLightIndexListVariableName (void) const;
310 SFString
*editSFClusteringDataBlockName(void);
311 const SFString
*getSFClusteringDataBlockName (void) const;
313 SFString
*editSFClusteringDataVariableName(void);
314 const SFString
*getSFClusteringDataVariableName (void) const;
316 SFString
*editSFLightGridVariableName(void);
317 const SFString
*getSFLightGridVariableName (void) const;
319 SFBool
*editSFCalcFrustumsOnCPU(void);
320 const SFBool
*getSFCalcFrustumsOnCPU (void) const;
322 SFBool
*editSFCullLighsOnCPU (void);
323 const SFBool
*getSFCullLighsOnCPU (void) const;
325 SFBool
*editSFDisabled (void);
326 const SFBool
*getSFDisabled (void) const;
328 SFUInt32
*editSFMaxLightIndexListSize(void);
329 const SFUInt32
*getSFMaxLightIndexListSize (void) const;
331 SFUInt32
*editSFMaxClusterLightCount(void);
332 const SFUInt32
*getSFMaxClusterLightCount (void) const;
333 const SFUnrecMultiLightChunkPtr
*getSFMultiLightChunk(void) const;
334 SFUnrecMultiLightChunkPtr
*editSFMultiLightChunk(void);
337 UInt32
&editBlockSize (void);
338 UInt32
getBlockSize (void) const;
340 UInt32
&editTileSize (void);
341 UInt32
getTileSize (void) const;
343 UInt32
&editNumClusterZ (void);
344 UInt32
getNumClusterZ (void) const;
346 Real32
&editNearPlaneOffset(void);
347 Real32
getNearPlaneOffset (void) const;
349 UInt32
&editDispatchDataBindingPnt(void);
350 UInt32
getDispatchDataBindingPnt (void) const;
352 UInt32
&editClusterDataBindingPnt(void);
353 UInt32
getClusterDataBindingPnt (void) const;
355 UInt32
&editLightBindingPnt(void);
356 UInt32
getLightBindingPnt (void) const;
358 UInt32
&editAffectedLightIndexListBindingPnt(void);
359 UInt32
getAffectedLightIndexListBindingPnt (void) const;
361 UInt32
&editFrustumBindingPnt(void);
362 UInt32
getFrustumBindingPnt (void) const;
364 UInt32
&editLightIndexListBindingPnt(void);
365 UInt32
getLightIndexListBindingPnt (void) const;
367 UInt32
&editLightIndexCounterBindingPnt(void);
368 UInt32
getLightIndexCounterBindingPnt (void) const;
370 UInt32
&editLightGridBindingPnt(void);
371 UInt32
getLightGridBindingPnt (void) const;
373 std::string
&editAffectedLightIndexListBlockName(void);
374 const std::string
&getAffectedLightIndexListBlockName (void) const;
376 std::string
&editAffectedLightIndexListVariableName(void);
377 const std::string
&getAffectedLightIndexListVariableName (void) const;
379 std::string
&editLightIndexListBlockName(void);
380 const std::string
&getLightIndexListBlockName (void) const;
382 std::string
&editLightIndexListVariableName(void);
383 const std::string
&getLightIndexListVariableName (void) const;
385 std::string
&editClusteringDataBlockName(void);
386 const std::string
&getClusteringDataBlockName (void) const;
388 std::string
&editClusteringDataVariableName(void);
389 const std::string
&getClusteringDataVariableName (void) const;
391 std::string
&editLightGridVariableName(void);
392 const std::string
&getLightGridVariableName (void) const;
394 bool &editCalcFrustumsOnCPU(void);
395 bool getCalcFrustumsOnCPU (void) const;
397 bool &editCullLighsOnCPU (void);
398 bool getCullLighsOnCPU (void) const;
400 bool &editDisabled (void);
401 bool getDisabled (void) const;
403 UInt32
&editMaxLightIndexListSize(void);
404 UInt32
getMaxLightIndexListSize (void) const;
406 UInt32
&editMaxClusterLightCount(void);
407 UInt32
getMaxClusterLightCount (void) const;
409 MultiLightChunk
* getMultiLightChunk(void) const;
412 /*---------------------------------------------------------------------*/
413 /*! \name Field Set */
416 void setBlockSize (const UInt32 value
);
417 void setTileSize (const UInt32 value
);
418 void setNumClusterZ (const UInt32 value
);
419 void setNearPlaneOffset(const Real32 value
);
420 void setDispatchDataBindingPnt(const UInt32 value
);
421 void setClusterDataBindingPnt(const UInt32 value
);
422 void setLightBindingPnt(const UInt32 value
);
423 void setAffectedLightIndexListBindingPnt(const UInt32 value
);
424 void setFrustumBindingPnt(const UInt32 value
);
425 void setLightIndexListBindingPnt(const UInt32 value
);
426 void setLightIndexCounterBindingPnt(const UInt32 value
);
427 void setLightGridBindingPnt(const UInt32 value
);
428 void setAffectedLightIndexListBlockName(const std::string
&value
);
429 void setAffectedLightIndexListVariableName(const std::string
&value
);
430 void setLightIndexListBlockName(const std::string
&value
);
431 void setLightIndexListVariableName(const std::string
&value
);
432 void setClusteringDataBlockName(const std::string
&value
);
433 void setClusteringDataVariableName(const std::string
&value
);
434 void setLightGridVariableName(const std::string
&value
);
435 void setCalcFrustumsOnCPU(const bool value
);
436 void setCullLighsOnCPU (const bool value
);
437 void setDisabled (const bool value
);
438 void setMaxLightIndexListSize(const UInt32 value
);
439 void setMaxClusterLightCount(const UInt32 value
);
440 void setMultiLightChunk(MultiLightChunk
* const value
);
443 /*---------------------------------------------------------------------*/
444 /*! \name Ptr Field Set */
448 /*---------------------------------------------------------------------*/
449 /*! \name Ptr MField Set */
453 /*---------------------------------------------------------------------*/
454 /*! \name Binary Access */
457 virtual SizeT
getBinSize (ConstFieldMaskArg whichField
);
458 virtual void copyToBin (BinaryDataHandler
&pMem
,
459 ConstFieldMaskArg whichField
);
460 virtual void copyFromBin(BinaryDataHandler
&pMem
,
461 ConstFieldMaskArg whichField
);
465 /*---------------------------------------------------------------------*/
466 /*! \name Construction */
469 static ClusterShadingStageTransitPtr
create (void);
470 static ClusterShadingStage
*createEmpty (void);
472 static ClusterShadingStageTransitPtr
createLocal (
473 BitVector bFlags
= FCLocal::All
);
475 static ClusterShadingStage
*createEmptyLocal(
476 BitVector bFlags
= FCLocal::All
);
478 static ClusterShadingStageTransitPtr
createDependent (BitVector bFlags
);
481 /*---------------------------------------------------------------------*/
485 virtual FieldContainerTransitPtr
shallowCopy (void) const;
486 virtual FieldContainerTransitPtr
shallowCopyLocal(
487 BitVector bFlags
= FCLocal::All
) const;
488 virtual FieldContainerTransitPtr
shallowCopyDependent(
489 BitVector bFlags
) const;
492 /*========================= PROTECTED ===============================*/
496 static TypeObject _type
;
498 static void classDescInserter(TypeObject
&oType
);
499 static const Char8
*getClassname (void );
501 /*---------------------------------------------------------------------*/
505 SFUInt32 _sfBlockSize
;
506 SFUInt32 _sfTileSize
;
507 SFUInt32 _sfNumClusterZ
;
508 SFReal32 _sfNearPlaneOffset
;
509 SFUInt32 _sfDispatchDataBindingPnt
;
510 SFUInt32 _sfClusterDataBindingPnt
;
511 SFUInt32 _sfLightBindingPnt
;
512 SFUInt32 _sfAffectedLightIndexListBindingPnt
;
513 SFUInt32 _sfFrustumBindingPnt
;
514 SFUInt32 _sfLightIndexListBindingPnt
;
515 SFUInt32 _sfLightIndexCounterBindingPnt
;
516 SFUInt32 _sfLightGridBindingPnt
;
517 SFString _sfAffectedLightIndexListBlockName
;
518 SFString _sfAffectedLightIndexListVariableName
;
519 SFString _sfLightIndexListBlockName
;
520 SFString _sfLightIndexListVariableName
;
521 SFString _sfClusteringDataBlockName
;
522 SFString _sfClusteringDataVariableName
;
523 SFString _sfLightGridVariableName
;
524 SFBool _sfCalcFrustumsOnCPU
;
525 SFBool _sfCullLighsOnCPU
;
527 SFUInt32 _sfMaxLightIndexListSize
;
528 SFUInt32 _sfMaxClusterLightCount
;
529 SFUnrecNodePtr _sfFrustNode
;
530 SFUnrecAlgorithmComputeElementPtr _sfFrustAlgoElement
;
531 SFUnrecComputeShaderAlgorithmPtr _sfFrustCompShaderAlgo
;
532 SFUnrecNodePtr _sfCullNode
;
533 SFUnrecAlgorithmComputeElementPtr _sfCullAlgoElement
;
534 SFUnrecComputeShaderAlgorithmPtr _sfCullCompShaderAlgo
;
535 SFUnrecMultiLightChunkPtr _sfMultiLightChunk
;
536 SFUnrecShaderProgramChunkPtr _sfShaderProgChunk
;
539 /*---------------------------------------------------------------------*/
540 /*! \name Constructors */
543 ClusterShadingStageBase(void);
544 ClusterShadingStageBase(const ClusterShadingStageBase
&source
);
547 /*---------------------------------------------------------------------*/
548 /*! \name Destructors */
551 virtual ~ClusterShadingStageBase(void);
554 /*---------------------------------------------------------------------*/
555 /*! \name onCreate */
558 void onCreate(const ClusterShadingStage
*source
= NULL
);
561 /*---------------------------------------------------------------------*/
562 /*! \name Generic Field Access */
565 GetFieldHandlePtr
getHandleBlockSize (void) const;
566 EditFieldHandlePtr
editHandleBlockSize (void);
567 GetFieldHandlePtr
getHandleTileSize (void) const;
568 EditFieldHandlePtr
editHandleTileSize (void);
569 GetFieldHandlePtr
getHandleNumClusterZ (void) const;
570 EditFieldHandlePtr
editHandleNumClusterZ (void);
571 GetFieldHandlePtr
getHandleNearPlaneOffset (void) const;
572 EditFieldHandlePtr
editHandleNearPlaneOffset(void);
573 GetFieldHandlePtr
getHandleDispatchDataBindingPnt (void) const;
574 EditFieldHandlePtr
editHandleDispatchDataBindingPnt(void);
575 GetFieldHandlePtr
getHandleClusterDataBindingPnt (void) const;
576 EditFieldHandlePtr
editHandleClusterDataBindingPnt(void);
577 GetFieldHandlePtr
getHandleLightBindingPnt (void) const;
578 EditFieldHandlePtr
editHandleLightBindingPnt(void);
579 GetFieldHandlePtr
getHandleAffectedLightIndexListBindingPnt (void) const;
580 EditFieldHandlePtr
editHandleAffectedLightIndexListBindingPnt(void);
581 GetFieldHandlePtr
getHandleFrustumBindingPnt (void) const;
582 EditFieldHandlePtr
editHandleFrustumBindingPnt(void);
583 GetFieldHandlePtr
getHandleLightIndexListBindingPnt (void) const;
584 EditFieldHandlePtr
editHandleLightIndexListBindingPnt(void);
585 GetFieldHandlePtr
getHandleLightIndexCounterBindingPnt (void) const;
586 EditFieldHandlePtr
editHandleLightIndexCounterBindingPnt(void);
587 GetFieldHandlePtr
getHandleLightGridBindingPnt (void) const;
588 EditFieldHandlePtr
editHandleLightGridBindingPnt(void);
589 GetFieldHandlePtr
getHandleAffectedLightIndexListBlockName (void) const;
590 EditFieldHandlePtr
editHandleAffectedLightIndexListBlockName(void);
591 GetFieldHandlePtr
getHandleAffectedLightIndexListVariableName (void) const;
592 EditFieldHandlePtr
editHandleAffectedLightIndexListVariableName(void);
593 GetFieldHandlePtr
getHandleLightIndexListBlockName (void) const;
594 EditFieldHandlePtr
editHandleLightIndexListBlockName(void);
595 GetFieldHandlePtr
getHandleLightIndexListVariableName (void) const;
596 EditFieldHandlePtr
editHandleLightIndexListVariableName(void);
597 GetFieldHandlePtr
getHandleClusteringDataBlockName (void) const;
598 EditFieldHandlePtr
editHandleClusteringDataBlockName(void);
599 GetFieldHandlePtr
getHandleClusteringDataVariableName (void) const;
600 EditFieldHandlePtr
editHandleClusteringDataVariableName(void);
601 GetFieldHandlePtr
getHandleLightGridVariableName (void) const;
602 EditFieldHandlePtr
editHandleLightGridVariableName(void);
603 GetFieldHandlePtr
getHandleCalcFrustumsOnCPU (void) const;
604 EditFieldHandlePtr
editHandleCalcFrustumsOnCPU(void);
605 GetFieldHandlePtr
getHandleCullLighsOnCPU (void) const;
606 EditFieldHandlePtr
editHandleCullLighsOnCPU (void);
607 GetFieldHandlePtr
getHandleDisabled (void) const;
608 EditFieldHandlePtr
editHandleDisabled (void);
609 GetFieldHandlePtr
getHandleMaxLightIndexListSize (void) const;
610 EditFieldHandlePtr
editHandleMaxLightIndexListSize(void);
611 GetFieldHandlePtr
getHandleMaxClusterLightCount (void) const;
612 EditFieldHandlePtr
editHandleMaxClusterLightCount(void);
613 GetFieldHandlePtr
getHandleFrustNode (void) const;
614 EditFieldHandlePtr
editHandleFrustNode (void);
615 GetFieldHandlePtr
getHandleFrustAlgoElement (void) const;
616 EditFieldHandlePtr
editHandleFrustAlgoElement(void);
617 GetFieldHandlePtr
getHandleFrustCompShaderAlgo (void) const;
618 EditFieldHandlePtr
editHandleFrustCompShaderAlgo(void);
619 GetFieldHandlePtr
getHandleCullNode (void) const;
620 EditFieldHandlePtr
editHandleCullNode (void);
621 GetFieldHandlePtr
getHandleCullAlgoElement (void) const;
622 EditFieldHandlePtr
editHandleCullAlgoElement(void);
623 GetFieldHandlePtr
getHandleCullCompShaderAlgo (void) const;
624 EditFieldHandlePtr
editHandleCullCompShaderAlgo(void);
625 GetFieldHandlePtr
getHandleMultiLightChunk (void) const;
626 EditFieldHandlePtr
editHandleMultiLightChunk(void);
627 GetFieldHandlePtr
getHandleShaderProgChunk (void) const;
628 EditFieldHandlePtr
editHandleShaderProgChunk(void);
631 /*---------------------------------------------------------------------*/
632 /*! \name Field Get */
635 const SFUnrecNodePtr
*getSFFrustNode (void) const;
636 SFUnrecNodePtr
*editSFFrustNode (void);
637 const SFUnrecAlgorithmComputeElementPtr
*getSFFrustAlgoElement (void) const;
638 SFUnrecAlgorithmComputeElementPtr
*editSFFrustAlgoElement(void);
639 const SFUnrecComputeShaderAlgorithmPtr
*getSFFrustCompShaderAlgo (void) const;
640 SFUnrecComputeShaderAlgorithmPtr
*editSFFrustCompShaderAlgo(void);
641 const SFUnrecNodePtr
*getSFCullNode (void) const;
642 SFUnrecNodePtr
*editSFCullNode (void);
643 const SFUnrecAlgorithmComputeElementPtr
*getSFCullAlgoElement (void) const;
644 SFUnrecAlgorithmComputeElementPtr
*editSFCullAlgoElement(void);
645 const SFUnrecComputeShaderAlgorithmPtr
*getSFCullCompShaderAlgo (void) const;
646 SFUnrecComputeShaderAlgorithmPtr
*editSFCullCompShaderAlgo(void);
647 const SFUnrecShaderProgramChunkPtr
*getSFShaderProgChunk (void) const;
648 SFUnrecShaderProgramChunkPtr
*editSFShaderProgChunk(void);
651 Node
* getFrustNode (void) const;
653 AlgorithmComputeElement
* getFrustAlgoElement(void) const;
655 ComputeShaderAlgorithm
* getFrustCompShaderAlgo(void) const;
657 Node
* getCullNode (void) const;
659 AlgorithmComputeElement
* getCullAlgoElement(void) const;
661 ComputeShaderAlgorithm
* getCullCompShaderAlgo(void) const;
663 ShaderProgramChunk
* getShaderProgChunk(void) const;
666 /*---------------------------------------------------------------------*/
667 /*! \name Field Set */
670 void setFrustNode (Node
* const value
);
671 void setFrustAlgoElement(AlgorithmComputeElement
* const value
);
672 void setFrustCompShaderAlgo(ComputeShaderAlgorithm
* const value
);
673 void setCullNode (Node
* const value
);
674 void setCullAlgoElement(AlgorithmComputeElement
* const value
);
675 void setCullCompShaderAlgo(ComputeShaderAlgorithm
* const value
);
676 void setShaderProgChunk(ShaderProgramChunk
* const value
);
679 /*---------------------------------------------------------------------*/
680 /*! \name Ptr MField Set */
684 /*---------------------------------------------------------------------*/
688 #ifdef OSG_MT_CPTR_ASPECT
689 virtual void execSyncV( FieldContainer
&oFrom
,
690 ConstFieldMaskArg whichField
,
691 AspectOffsetStore
&oOffsets
,
692 ConstFieldMaskArg syncMode
,
693 const UInt32 uiSyncInfo
);
695 void execSync ( ClusterShadingStageBase
*pFrom
,
696 ConstFieldMaskArg whichField
,
697 AspectOffsetStore
&oOffsets
,
698 ConstFieldMaskArg syncMode
,
699 const UInt32 uiSyncInfo
);
703 /*---------------------------------------------------------------------*/
708 /*---------------------------------------------------------------------*/
709 /*! \name Aspect Create */
712 #ifdef OSG_MT_CPTR_ASPECT
713 virtual FieldContainer
*createAspectCopy(
714 const FieldContainer
*pRefAspect
) const;
718 /*---------------------------------------------------------------------*/
722 /*---------------------------------------------------------------------*/
726 virtual void resolveLinks(void);
729 /*========================== PRIVATE ================================*/
732 /*---------------------------------------------------------------------*/
734 // prohibit default functions (move to 'public' if you need one)
735 void operator =(const ClusterShadingStageBase
&source
);
738 typedef ClusterShadingStageBase
*ClusterShadingStageBaseP
;
740 typedef CoredNodeRefPtr
<ClusterShadingStage
> ClusterShadingStageNodeRefPtr
;
741 typedef CoredNodeMTRefPtr
<ClusterShadingStage
> ClusterShadingStageNodeMTRefPtr
;
745 #endif /* _OSGCLUSTERSHADINGSTAGEBASE_H_ */