changed: gcc8 base update
[opensg.git] / Source / Contrib / Techniques / OSGClusterShadingStageDataBase.cpp
blobc24ab2e773be4e8854905882b539bdf7ee0e0db6
1 /*---------------------------------------------------------------------------*\
2 * OpenSG *
3 * *
4 * *
5 * Copyright (C) 2000-2013 by the OpenSG Forum *
6 * *
7 * www.opensg.org *
8 * *
9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, carsten_neumann@gmx.net *
10 * *
11 \*---------------------------------------------------------------------------*/
12 /*---------------------------------------------------------------------------*\
13 * License *
14 * *
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. *
18 * *
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. *
23 * *
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. *
27 * *
28 \*---------------------------------------------------------------------------*/
29 /*---------------------------------------------------------------------------*\
30 * Changes *
31 * *
32 * *
33 * *
34 * *
35 * *
36 * *
37 \*---------------------------------------------------------------------------*/
39 /*****************************************************************************\
40 *****************************************************************************
41 ** **
42 ** This file is automatically generated. **
43 ** **
44 ** Any changes made to this file WILL be lost when it is **
45 ** regenerated, which can become necessary at any time. **
46 ** **
47 ** Do not change this file, changes should be done in the derived **
48 ** class ClusterShadingStageData!
49 ** **
50 *****************************************************************************
51 \*****************************************************************************/
53 #include <cstdlib>
54 #include <cstdio>
56 #ifdef WIN32
57 #pragma warning(disable: 4355) // turn off 'this' : used in base member initializer list warning
58 #pragma warning(disable: 4290) // disable exception specification warning
59 #endif
61 #include "OSGConfig.h"
65 #include "OSGUniformBufferObjStd140Chunk.h" // FrustDispDatUBOChunk Class
66 #include "OSGShaderStorageBufferObjStdLayoutChunk.h" // CullLightIndexCounterSSBOChunk Class
67 #include "OSGChunkMaterial.h" // FrustChunkMat Class
68 #include "OSGImage.h" // LightGridImage Class
69 #include "OSGTextureObjChunk.h" // LightGridTexObjChunk Class
70 #include "OSGTextureImageChunk.h" // LightGridTexImgChunkCS Class
72 #include "OSGClusterShadingStageDataBase.h"
73 #include "OSGClusterShadingStageData.h"
75 #include <boost/bind.hpp>
77 OSG_BEGIN_NAMESPACE
79 /***************************************************************************\
80 * Description *
81 \***************************************************************************/
83 /*! \class OSG::ClusterShadingStageData
84 View dependent Data used by the ClusterShadingStage.
87 /***************************************************************************\
88 * Field Documentation *
89 \***************************************************************************/
91 /*! \var UniformBufferObjStd140Chunk * ClusterShadingStageDataBase::_sfFrustDispDatUBOChunk
92 This represents a lightweight data struct used by the calc frustums computation shader.
95 /*! \var UniformBufferObjStd140Chunk * ClusterShadingStageDataBase::_sfCullDispDatUBOChunk
96 This represents a lightweight data struct used by the cull lights computation shader.
99 /*! \var UniformBufferObjStd140Chunk * ClusterShadingStageDataBase::_sfCullClusterDatUBOChunk
100 Cluster data are used for calculation of the cluster keys respectively cluster z-Values.
101 This UBO is needed in the shading material fragment shader.
104 /*! \var ShaderStorageBufferObjStdLayoutChunk * ClusterShadingStageDataBase::_sfCullLightIndexCounterSSBOChunk
105 This is a helper SSBO that contains a global counter used for the light culling shader.
108 /*! \var ShaderStorageBufferObjStdLayoutChunk * ClusterShadingStageDataBase::_sfFrustumsSSBOChunk
109 The frustums of the current view frustum.
112 /*! \var ShaderStorageBufferObjStdLayoutChunk * ClusterShadingStageDataBase::_sfAffectedLightIndexListSSBOChunk
113 The light index list affecting the view frustum. I.e. this index list is the
114 result of a pre light culling process before any cluster shading happens.
115 This SSBO is needed in the shading material fragment shader.
118 /*! \var ShaderStorageBufferObjStdLayoutChunk * ClusterShadingStageDataBase::_sfLightIndexListSSBOChunk
119 The global light index list, containing the result of the cluster shading calculations.
120 This SSBO is needed in the shading material fragment shader.
123 /*! \var ChunkMaterial * ClusterShadingStageDataBase::_sfFrustChunkMat
124 The material used for the GPU frustums calculations.
127 /*! \var ChunkMaterial * ClusterShadingStageDataBase::_sfCullChunkMat
128 The material used for the GPU light culling process.
131 /*! \var Image * ClusterShadingStageDataBase::_sfLightGridImage
132 The underlying image of the light grid.
135 /*! \var TextureObjChunk * ClusterShadingStageDataBase::_sfLightGridTexObjChunk
136 The texture object taking the underlying image of the light grid.
139 /*! \var TextureImageChunk * ClusterShadingStageDataBase::_sfLightGridTexImgChunkCS
140 The write only texture image chunk that is used in the light culling compute shader.
143 /*! \var TextureImageChunk * ClusterShadingStageDataBase::_sfLightGridTexImgChunkFS
144 The read only texture image chunk that is used in the fragment shader.
147 /*! \var Matrix ClusterShadingStageDataBase::_mfFrustumPlanesNormals
148 The four tile frustum planes normal vectors.
151 /*! \var Vec4f ClusterShadingStageDataBase::_mfFrustumPlanesDistances
152 The four tile frustum planes distances from the origin.
155 /*! \var Int32 ClusterShadingStageDataBase::_sfLeft
159 /*! \var Int32 ClusterShadingStageDataBase::_sfBottom
163 /*! \var Int32 ClusterShadingStageDataBase::_sfWidth
167 /*! \var Int32 ClusterShadingStageDataBase::_sfHeight
171 /*! \var bool ClusterShadingStageDataBase::_sfIsOrthographicCamera
172 This flag tracks whether we have an orthographic or perspective camera setup.
176 /***************************************************************************\
177 * FieldType/FieldTrait Instantiation *
178 \***************************************************************************/
180 #if !defined(OSG_DO_DOC) || defined(OSG_DOC_DEV)
181 PointerType FieldTraits<ClusterShadingStageData *, nsOSG>::_type(
182 "ClusterShadingStageDataPtr",
183 "StageDataPtr",
184 ClusterShadingStageData::getClassType(),
185 nsOSG);
186 #endif
188 OSG_FIELDTRAITS_GETTYPE_NS(ClusterShadingStageData *, nsOSG)
190 /***************************************************************************\
191 * Field Description *
192 \***************************************************************************/
194 void ClusterShadingStageDataBase::classDescInserter(TypeObject &oType)
196 FieldDescriptionBase *pDesc = NULL;
199 pDesc = new SFUnrecUniformBufferObjStd140ChunkPtr::Description(
200 SFUnrecUniformBufferObjStd140ChunkPtr::getClassType(),
201 "frustDispDatUBOChunk",
202 "This represents a lightweight data struct used by the calc frustums computation shader.\n",
203 FrustDispDatUBOChunkFieldId, FrustDispDatUBOChunkFieldMask,
204 true,
205 (Field::SFDefaultFlags | Field::FStdAccess),
206 static_cast<FieldEditMethodSig>(&ClusterShadingStageData::editHandleFrustDispDatUBOChunk),
207 static_cast<FieldGetMethodSig >(&ClusterShadingStageData::getHandleFrustDispDatUBOChunk));
209 oType.addInitialDesc(pDesc);
211 pDesc = new SFUnrecUniformBufferObjStd140ChunkPtr::Description(
212 SFUnrecUniformBufferObjStd140ChunkPtr::getClassType(),
213 "cullDispDatUBOChunk",
214 "This represents a lightweight data struct used by the cull lights computation shader.\n",
215 CullDispDatUBOChunkFieldId, CullDispDatUBOChunkFieldMask,
216 true,
217 (Field::SFDefaultFlags | Field::FStdAccess),
218 static_cast<FieldEditMethodSig>(&ClusterShadingStageData::editHandleCullDispDatUBOChunk),
219 static_cast<FieldGetMethodSig >(&ClusterShadingStageData::getHandleCullDispDatUBOChunk));
221 oType.addInitialDesc(pDesc);
223 pDesc = new SFUnrecUniformBufferObjStd140ChunkPtr::Description(
224 SFUnrecUniformBufferObjStd140ChunkPtr::getClassType(),
225 "cullClusterDatUBOChunk",
226 "Cluster data are used for calculation of the cluster keys respectively cluster z-Values.\n"
227 "This UBO is needed in the shading material fragment shader. \n",
228 CullClusterDatUBOChunkFieldId, CullClusterDatUBOChunkFieldMask,
229 true,
230 (Field::SFDefaultFlags | Field::FStdAccess),
231 static_cast<FieldEditMethodSig>(&ClusterShadingStageData::editHandleCullClusterDatUBOChunk),
232 static_cast<FieldGetMethodSig >(&ClusterShadingStageData::getHandleCullClusterDatUBOChunk));
234 oType.addInitialDesc(pDesc);
236 pDesc = new SFUnrecShaderStorageBufferObjStdLayoutChunkPtr::Description(
237 SFUnrecShaderStorageBufferObjStdLayoutChunkPtr::getClassType(),
238 "cullLightIndexCounterSSBOChunk",
239 "This is a helper SSBO that contains a global counter used for the light culling shader.\n",
240 CullLightIndexCounterSSBOChunkFieldId, CullLightIndexCounterSSBOChunkFieldMask,
241 true,
242 (Field::SFDefaultFlags | Field::FStdAccess),
243 static_cast<FieldEditMethodSig>(&ClusterShadingStageData::editHandleCullLightIndexCounterSSBOChunk),
244 static_cast<FieldGetMethodSig >(&ClusterShadingStageData::getHandleCullLightIndexCounterSSBOChunk));
246 oType.addInitialDesc(pDesc);
248 pDesc = new SFUnrecShaderStorageBufferObjStdLayoutChunkPtr::Description(
249 SFUnrecShaderStorageBufferObjStdLayoutChunkPtr::getClassType(),
250 "frustumsSSBOChunk",
251 "The frustums of the current view frustum.\n",
252 FrustumsSSBOChunkFieldId, FrustumsSSBOChunkFieldMask,
253 true,
254 (Field::SFDefaultFlags | Field::FStdAccess),
255 static_cast<FieldEditMethodSig>(&ClusterShadingStageData::editHandleFrustumsSSBOChunk),
256 static_cast<FieldGetMethodSig >(&ClusterShadingStageData::getHandleFrustumsSSBOChunk));
258 oType.addInitialDesc(pDesc);
260 pDesc = new SFUnrecShaderStorageBufferObjStdLayoutChunkPtr::Description(
261 SFUnrecShaderStorageBufferObjStdLayoutChunkPtr::getClassType(),
262 "affectedLightIndexListSSBOChunk",
263 "The light index list affecting the view frustum. I.e. this index list is the\n"
264 "result of a pre light culling process before any cluster shading happens.\n"
265 "This SSBO is needed in the shading material fragment shader. \n",
266 AffectedLightIndexListSSBOChunkFieldId, AffectedLightIndexListSSBOChunkFieldMask,
267 true,
268 (Field::SFDefaultFlags | Field::FStdAccess),
269 static_cast<FieldEditMethodSig>(&ClusterShadingStageData::editHandleAffectedLightIndexListSSBOChunk),
270 static_cast<FieldGetMethodSig >(&ClusterShadingStageData::getHandleAffectedLightIndexListSSBOChunk));
272 oType.addInitialDesc(pDesc);
274 pDesc = new SFUnrecShaderStorageBufferObjStdLayoutChunkPtr::Description(
275 SFUnrecShaderStorageBufferObjStdLayoutChunkPtr::getClassType(),
276 "lightIndexListSSBOChunk",
277 "The global light index list, containing the result of the cluster shading calculations.\n"
278 "This SSBO is needed in the shading material fragment shader. \n",
279 LightIndexListSSBOChunkFieldId, LightIndexListSSBOChunkFieldMask,
280 true,
281 (Field::SFDefaultFlags | Field::FStdAccess),
282 static_cast<FieldEditMethodSig>(&ClusterShadingStageData::editHandleLightIndexListSSBOChunk),
283 static_cast<FieldGetMethodSig >(&ClusterShadingStageData::getHandleLightIndexListSSBOChunk));
285 oType.addInitialDesc(pDesc);
287 pDesc = new SFUnrecChunkMaterialPtr::Description(
288 SFUnrecChunkMaterialPtr::getClassType(),
289 "frustChunkMat",
290 "The material used for the GPU frustums calculations.\n",
291 FrustChunkMatFieldId, FrustChunkMatFieldMask,
292 true,
293 (Field::SFDefaultFlags | Field::FStdAccess),
294 static_cast<FieldEditMethodSig>(&ClusterShadingStageData::editHandleFrustChunkMat),
295 static_cast<FieldGetMethodSig >(&ClusterShadingStageData::getHandleFrustChunkMat));
297 oType.addInitialDesc(pDesc);
299 pDesc = new SFUnrecChunkMaterialPtr::Description(
300 SFUnrecChunkMaterialPtr::getClassType(),
301 "cullChunkMat",
302 "The material used for the GPU light culling process.\n",
303 CullChunkMatFieldId, CullChunkMatFieldMask,
304 true,
305 (Field::SFDefaultFlags | Field::FStdAccess),
306 static_cast<FieldEditMethodSig>(&ClusterShadingStageData::editHandleCullChunkMat),
307 static_cast<FieldGetMethodSig >(&ClusterShadingStageData::getHandleCullChunkMat));
309 oType.addInitialDesc(pDesc);
311 pDesc = new SFUnrecImagePtr::Description(
312 SFUnrecImagePtr::getClassType(),
313 "lightGridImage",
314 "The underlying image of the light grid.\n",
315 LightGridImageFieldId, LightGridImageFieldMask,
316 true,
317 (Field::SFDefaultFlags | Field::FStdAccess),
318 static_cast<FieldEditMethodSig>(&ClusterShadingStageData::editHandleLightGridImage),
319 static_cast<FieldGetMethodSig >(&ClusterShadingStageData::getHandleLightGridImage));
321 oType.addInitialDesc(pDesc);
323 pDesc = new SFUnrecTextureObjChunkPtr::Description(
324 SFUnrecTextureObjChunkPtr::getClassType(),
325 "lightGridTexObjChunk",
326 "The texture object taking the underlying image of the light grid.\n",
327 LightGridTexObjChunkFieldId, LightGridTexObjChunkFieldMask,
328 true,
329 (Field::SFDefaultFlags | Field::FStdAccess),
330 static_cast<FieldEditMethodSig>(&ClusterShadingStageData::editHandleLightGridTexObjChunk),
331 static_cast<FieldGetMethodSig >(&ClusterShadingStageData::getHandleLightGridTexObjChunk));
333 oType.addInitialDesc(pDesc);
335 pDesc = new SFUnrecTextureImageChunkPtr::Description(
336 SFUnrecTextureImageChunkPtr::getClassType(),
337 "lightGridTexImgChunkCS",
338 "The write only texture image chunk that is used in the light culling compute shader.\n",
339 LightGridTexImgChunkCSFieldId, LightGridTexImgChunkCSFieldMask,
340 true,
341 (Field::SFDefaultFlags | Field::FStdAccess),
342 static_cast<FieldEditMethodSig>(&ClusterShadingStageData::editHandleLightGridTexImgChunkCS),
343 static_cast<FieldGetMethodSig >(&ClusterShadingStageData::getHandleLightGridTexImgChunkCS));
345 oType.addInitialDesc(pDesc);
347 pDesc = new SFUnrecTextureImageChunkPtr::Description(
348 SFUnrecTextureImageChunkPtr::getClassType(),
349 "lightGridTexImgChunkFS",
350 "The read only texture image chunk that is used in the fragment shader.\n",
351 LightGridTexImgChunkFSFieldId, LightGridTexImgChunkFSFieldMask,
352 true,
353 (Field::SFDefaultFlags | Field::FStdAccess),
354 static_cast<FieldEditMethodSig>(&ClusterShadingStageData::editHandleLightGridTexImgChunkFS),
355 static_cast<FieldGetMethodSig >(&ClusterShadingStageData::getHandleLightGridTexImgChunkFS));
357 oType.addInitialDesc(pDesc);
359 pDesc = new MFMatrix::Description(
360 MFMatrix::getClassType(),
361 "frustumPlanesNormals",
362 "The four tile frustum planes normal vectors.\n",
363 FrustumPlanesNormalsFieldId, FrustumPlanesNormalsFieldMask,
364 true,
365 (Field::MFDefaultFlags | Field::FStdAccess),
366 static_cast<FieldEditMethodSig>(&ClusterShadingStageData::editHandleFrustumPlanesNormals),
367 static_cast<FieldGetMethodSig >(&ClusterShadingStageData::getHandleFrustumPlanesNormals));
369 oType.addInitialDesc(pDesc);
371 pDesc = new MFVec4f::Description(
372 MFVec4f::getClassType(),
373 "frustumPlanesDistances",
374 "The four tile frustum planes distances from the origin.\n",
375 FrustumPlanesDistancesFieldId, FrustumPlanesDistancesFieldMask,
376 true,
377 (Field::MFDefaultFlags | Field::FStdAccess),
378 static_cast<FieldEditMethodSig>(&ClusterShadingStageData::editHandleFrustumPlanesDistances),
379 static_cast<FieldGetMethodSig >(&ClusterShadingStageData::getHandleFrustumPlanesDistances));
381 oType.addInitialDesc(pDesc);
383 pDesc = new SFInt32::Description(
384 SFInt32::getClassType(),
385 "left",
387 LeftFieldId, LeftFieldMask,
388 true,
389 (Field::SFDefaultFlags | Field::FStdAccess),
390 static_cast<FieldEditMethodSig>(&ClusterShadingStageData::editHandleLeft),
391 static_cast<FieldGetMethodSig >(&ClusterShadingStageData::getHandleLeft));
393 oType.addInitialDesc(pDesc);
395 pDesc = new SFInt32::Description(
396 SFInt32::getClassType(),
397 "bottom",
399 BottomFieldId, BottomFieldMask,
400 true,
401 (Field::SFDefaultFlags | Field::FStdAccess),
402 static_cast<FieldEditMethodSig>(&ClusterShadingStageData::editHandleBottom),
403 static_cast<FieldGetMethodSig >(&ClusterShadingStageData::getHandleBottom));
405 oType.addInitialDesc(pDesc);
407 pDesc = new SFInt32::Description(
408 SFInt32::getClassType(),
409 "width",
411 WidthFieldId, WidthFieldMask,
412 true,
413 (Field::SFDefaultFlags | Field::FStdAccess),
414 static_cast<FieldEditMethodSig>(&ClusterShadingStageData::editHandleWidth),
415 static_cast<FieldGetMethodSig >(&ClusterShadingStageData::getHandleWidth));
417 oType.addInitialDesc(pDesc);
419 pDesc = new SFInt32::Description(
420 SFInt32::getClassType(),
421 "height",
423 HeightFieldId, HeightFieldMask,
424 true,
425 (Field::SFDefaultFlags | Field::FStdAccess),
426 static_cast<FieldEditMethodSig>(&ClusterShadingStageData::editHandleHeight),
427 static_cast<FieldGetMethodSig >(&ClusterShadingStageData::getHandleHeight));
429 oType.addInitialDesc(pDesc);
431 pDesc = new SFBool::Description(
432 SFBool::getClassType(),
433 "isOrthographicCamera",
434 "This flag tracks whether we have an orthographic or perspective camera setup.\n",
435 IsOrthographicCameraFieldId, IsOrthographicCameraFieldMask,
436 true,
437 (Field::SFDefaultFlags | Field::FStdAccess),
438 static_cast<FieldEditMethodSig>(&ClusterShadingStageData::editHandleIsOrthographicCamera),
439 static_cast<FieldGetMethodSig >(&ClusterShadingStageData::getHandleIsOrthographicCamera));
441 oType.addInitialDesc(pDesc);
445 ClusterShadingStageDataBase::TypeObject ClusterShadingStageDataBase::_type(
446 ClusterShadingStageDataBase::getClassname(),
447 Inherited::getClassname(),
448 "NULL",
449 nsOSG, //Namespace
450 reinterpret_cast<PrototypeCreateF>(&ClusterShadingStageDataBase::createEmptyLocal),
451 reinterpret_cast<InitContainerF>(&ClusterShadingStageData::initMethod),
452 reinterpret_cast<ExitContainerF>(&ClusterShadingStageData::exitMethod),
453 reinterpret_cast<InitalInsertDescFunc>(
454 reinterpret_cast<void *>(&ClusterShadingStageData::classDescInserter)),
455 false,
457 "<?xml version=\"1.0\"?>\n"
458 "\n"
459 "<FieldContainer\n"
460 " name=\"ClusterShadingStageData\"\n"
461 " parent=\"StageData\"\n"
462 " library=\"ContribTechniques\"\n"
463 " pointerfieldtypes=\"none\"\n"
464 " structure=\"concrete\"\n"
465 " systemcomponent=\"true\"\n"
466 " parentsystemcomponent=\"true\"\n"
467 " decoratable=\"false\"\n"
468 " useLocalIncludes=\"false\"\n"
469 " isNodeCore=\"false\"\n"
470 " >\n"
471 "\n"
472 " View dependent Data used by the ClusterShadingStage.\n"
473 "\n"
474 " <Field\n"
475 " name=\"frustDispDatUBOChunk\"\n"
476 " type=\"UniformBufferObjStd140ChunkPtr\"\n"
477 " cardinality=\"single\"\n"
478 " visibility=\"internal\"\n"
479 " defaultValue=\"NULL\"\n"
480 " access=\"public\"\n"
481 " >\n"
482 " This represents a lightweight data struct used by the calc frustums computation shader.\n"
483 " </Field>\n"
484 "\n"
485 " <Field\n"
486 " name=\"cullDispDatUBOChunk\"\n"
487 " type=\"UniformBufferObjStd140ChunkPtr\"\n"
488 " cardinality=\"single\"\n"
489 " visibility=\"internal\"\n"
490 " defaultValue=\"NULL\"\n"
491 " access=\"public\"\n"
492 " >\n"
493 " This represents a lightweight data struct used by the cull lights computation shader.\n"
494 " </Field>\n"
495 "\n"
496 " <Field\n"
497 " name=\"cullClusterDatUBOChunk\"\n"
498 " type=\"UniformBufferObjStd140ChunkPtr\"\n"
499 " cardinality=\"single\"\n"
500 " visibility=\"internal\"\n"
501 " defaultValue=\"NULL\"\n"
502 " access=\"public\"\n"
503 " >\n"
504 " Cluster data are used for calculation of the cluster keys respectively cluster z-Values.\n"
505 " This UBO is needed in the shading material fragment shader. \n"
506 " </Field>\n"
507 "\n"
508 " <Field\n"
509 " name=\"cullLightIndexCounterSSBOChunk\"\n"
510 " type=\"ShaderStorageBufferObjStdLayoutChunkPtr\"\n"
511 " cardinality=\"single\"\n"
512 " visibility=\"internal\"\n"
513 " defaultValue=\"NULL\"\n"
514 " access=\"public\"\n"
515 " >\n"
516 " This is a helper SSBO that contains a global counter used for the light culling shader.\n"
517 " </Field>\n"
518 "\n"
519 " <Field\n"
520 " name=\"frustumsSSBOChunk\"\n"
521 " type=\"ShaderStorageBufferObjStdLayoutChunkPtr\"\n"
522 " cardinality=\"single\"\n"
523 " visibility=\"internal\"\n"
524 " defaultValue=\"NULL\"\n"
525 " access=\"public\"\n"
526 " >\n"
527 " The frustums of the current view frustum.\n"
528 " </Field>\n"
529 "\n"
530 " <Field\n"
531 " name=\"affectedLightIndexListSSBOChunk\"\n"
532 " type=\"ShaderStorageBufferObjStdLayoutChunkPtr\"\n"
533 " cardinality=\"single\"\n"
534 " visibility=\"internal\"\n"
535 " defaultValue=\"NULL\"\n"
536 " access=\"public\"\n"
537 " >\n"
538 " The light index list affecting the view frustum. I.e. this index list is the\n"
539 " result of a pre light culling process before any cluster shading happens.\n"
540 " This SSBO is needed in the shading material fragment shader. \n"
541 " </Field>\n"
542 "\n"
543 " <Field\n"
544 " name=\"lightIndexListSSBOChunk\"\n"
545 " type=\"ShaderStorageBufferObjStdLayoutChunkPtr\"\n"
546 " cardinality=\"single\"\n"
547 " visibility=\"internal\"\n"
548 " defaultValue=\"NULL\"\n"
549 " access=\"public\"\n"
550 " >\n"
551 " The global light index list, containing the result of the cluster shading calculations.\n"
552 " This SSBO is needed in the shading material fragment shader. \n"
553 " </Field>\n"
554 "\n"
555 " <Field\n"
556 " name=\"frustChunkMat\"\n"
557 " type=\"ChunkMaterialPtr\"\n"
558 " cardinality=\"single\"\n"
559 " visibility=\"internal\"\n"
560 " defaultValue=\"NULL\"\n"
561 " access=\"public\"\n"
562 " >\n"
563 " The material used for the GPU frustums calculations.\n"
564 " </Field>\n"
565 "\n"
566 " <Field\n"
567 " name=\"cullChunkMat\"\n"
568 " type=\"ChunkMaterialPtr\"\n"
569 " cardinality=\"single\"\n"
570 " visibility=\"internal\"\n"
571 " defaultValue=\"NULL\"\n"
572 " access=\"public\"\n"
573 " >\n"
574 " The material used for the GPU light culling process.\n"
575 " </Field>\n"
576 " \n"
577 " <Field\n"
578 " name=\"lightGridImage\"\n"
579 " type=\"ImagePtr\"\n"
580 " cardinality=\"single\"\n"
581 " visibility=\"internal\"\n"
582 " defaultValue=\"NULL\"\n"
583 " access=\"public\"\n"
584 " >\n"
585 " The underlying image of the light grid.\n"
586 " </Field>\n"
587 "\n"
588 " <Field\n"
589 " name=\"lightGridTexObjChunk\"\n"
590 " type=\"TextureObjChunkPtr\"\n"
591 " cardinality=\"single\"\n"
592 " visibility=\"internal\"\n"
593 " defaultValue=\"NULL\"\n"
594 " access=\"public\"\n"
595 " >\n"
596 " The texture object taking the underlying image of the light grid.\n"
597 " </Field>\n"
598 "\n"
599 " <Field\n"
600 " name=\"lightGridTexImgChunkCS\"\n"
601 " type=\"TextureImageChunkPtr\"\n"
602 " cardinality=\"single\"\n"
603 " visibility=\"internal\"\n"
604 " defaultValue=\"NULL\"\n"
605 " access=\"public\"\n"
606 " >\n"
607 " The write only texture image chunk that is used in the light culling compute shader.\n"
608 " </Field>\n"
609 "\n"
610 " <Field\n"
611 " name=\"lightGridTexImgChunkFS\"\n"
612 " type=\"TextureImageChunkPtr\"\n"
613 " cardinality=\"single\"\n"
614 " visibility=\"internal\"\n"
615 " defaultValue=\"NULL\"\n"
616 " access=\"public\"\n"
617 " >\n"
618 " The read only texture image chunk that is used in the fragment shader.\n"
619 " </Field>\n"
620 "\n"
621 " <Field\n"
622 " name=\"frustumPlanesNormals\"\n"
623 " type=\"Matrix\"\n"
624 " cardinality=\"multi\"\n"
625 " visibility=\"internal\"\n"
626 " access=\"public\"\n"
627 " >\n"
628 " The four tile frustum planes normal vectors.\n"
629 " </Field>\n"
630 "\n"
631 " <Field\n"
632 " name=\"frustumPlanesDistances\"\n"
633 " type=\"Vec4f\"\n"
634 " cardinality=\"multi\"\n"
635 " visibility=\"internal\"\n"
636 " access=\"public\"\n"
637 " >\n"
638 " The four tile frustum planes distances from the origin.\n"
639 " </Field>\n"
640 "\n"
641 " <Field\n"
642 " name=\"left\"\n"
643 " type=\"Int32\"\n"
644 " cardinality=\"single\"\n"
645 " visibility=\"internal\"\n"
646 " defaultValue=\"0\"\n"
647 " access=\"public\"\n"
648 " >\n"
649 " </Field>\n"
650 "\n"
651 " <Field\n"
652 " name=\"bottom\"\n"
653 " type=\"Int32\"\n"
654 " cardinality=\"single\"\n"
655 " visibility=\"internal\"\n"
656 " defaultValue=\"0\"\n"
657 " access=\"public\"\n"
658 " >\n"
659 " </Field>\n"
660 "\n"
661 " <Field\n"
662 " name=\"width\"\n"
663 " type=\"Int32\"\n"
664 " cardinality=\"single\"\n"
665 " visibility=\"internal\"\n"
666 " defaultValue=\"0\"\n"
667 " access=\"public\"\n"
668 " >\n"
669 " </Field>\n"
670 "\n"
671 " <Field\n"
672 " name=\"height\"\n"
673 " type=\"Int32\"\n"
674 " cardinality=\"single\"\n"
675 " visibility=\"internal\"\n"
676 " defaultValue=\"0\"\n"
677 " access=\"public\"\n"
678 " >\n"
679 " </Field>\n"
680 "\n"
681 " <Field\n"
682 " name=\"isOrthographicCamera\"\n"
683 " type=\"bool\"\n"
684 " cardinality=\"single\"\n"
685 " visibility=\"internal\"\n"
686 " defaultValue=\"false\"\n"
687 " access=\"public\"\n"
688 " >\n"
689 " This flag tracks whether we have an orthographic or perspective camera setup.\n"
690 " </Field>\n"
691 "\n"
692 " </FieldContainer>\n",
693 "View dependent Data used by the ClusterShadingStage.\n"
696 /*------------------------------ get -----------------------------------*/
698 FieldContainerType &ClusterShadingStageDataBase::getType(void)
700 return _type;
703 const FieldContainerType &ClusterShadingStageDataBase::getType(void) const
705 return _type;
708 UInt32 ClusterShadingStageDataBase::getContainerSize(void) const
710 return sizeof(ClusterShadingStageData);
713 /*------------------------- decorator get ------------------------------*/
716 //! Get the ClusterShadingStageData::_sfFrustDispDatUBOChunk field.
717 const SFUnrecUniformBufferObjStd140ChunkPtr *ClusterShadingStageDataBase::getSFFrustDispDatUBOChunk(void) const
719 return &_sfFrustDispDatUBOChunk;
722 SFUnrecUniformBufferObjStd140ChunkPtr *ClusterShadingStageDataBase::editSFFrustDispDatUBOChunk(void)
724 editSField(FrustDispDatUBOChunkFieldMask);
726 return &_sfFrustDispDatUBOChunk;
729 //! Get the value of the ClusterShadingStageData::_sfFrustDispDatUBOChunk field.
730 UniformBufferObjStd140Chunk * ClusterShadingStageDataBase::getFrustDispDatUBOChunk(void) const
732 return _sfFrustDispDatUBOChunk.getValue();
735 //! Set the value of the ClusterShadingStageData::_sfFrustDispDatUBOChunk field.
736 void ClusterShadingStageDataBase::setFrustDispDatUBOChunk(UniformBufferObjStd140Chunk * const value)
738 editSField(FrustDispDatUBOChunkFieldMask);
740 _sfFrustDispDatUBOChunk.setValue(value);
744 //! Get the ClusterShadingStageData::_sfCullDispDatUBOChunk field.
745 const SFUnrecUniformBufferObjStd140ChunkPtr *ClusterShadingStageDataBase::getSFCullDispDatUBOChunk(void) const
747 return &_sfCullDispDatUBOChunk;
750 SFUnrecUniformBufferObjStd140ChunkPtr *ClusterShadingStageDataBase::editSFCullDispDatUBOChunk(void)
752 editSField(CullDispDatUBOChunkFieldMask);
754 return &_sfCullDispDatUBOChunk;
757 //! Get the value of the ClusterShadingStageData::_sfCullDispDatUBOChunk field.
758 UniformBufferObjStd140Chunk * ClusterShadingStageDataBase::getCullDispDatUBOChunk(void) const
760 return _sfCullDispDatUBOChunk.getValue();
763 //! Set the value of the ClusterShadingStageData::_sfCullDispDatUBOChunk field.
764 void ClusterShadingStageDataBase::setCullDispDatUBOChunk(UniformBufferObjStd140Chunk * const value)
766 editSField(CullDispDatUBOChunkFieldMask);
768 _sfCullDispDatUBOChunk.setValue(value);
772 //! Get the ClusterShadingStageData::_sfCullClusterDatUBOChunk field.
773 const SFUnrecUniformBufferObjStd140ChunkPtr *ClusterShadingStageDataBase::getSFCullClusterDatUBOChunk(void) const
775 return &_sfCullClusterDatUBOChunk;
778 SFUnrecUniformBufferObjStd140ChunkPtr *ClusterShadingStageDataBase::editSFCullClusterDatUBOChunk(void)
780 editSField(CullClusterDatUBOChunkFieldMask);
782 return &_sfCullClusterDatUBOChunk;
785 //! Get the value of the ClusterShadingStageData::_sfCullClusterDatUBOChunk field.
786 UniformBufferObjStd140Chunk * ClusterShadingStageDataBase::getCullClusterDatUBOChunk(void) const
788 return _sfCullClusterDatUBOChunk.getValue();
791 //! Set the value of the ClusterShadingStageData::_sfCullClusterDatUBOChunk field.
792 void ClusterShadingStageDataBase::setCullClusterDatUBOChunk(UniformBufferObjStd140Chunk * const value)
794 editSField(CullClusterDatUBOChunkFieldMask);
796 _sfCullClusterDatUBOChunk.setValue(value);
800 //! Get the ClusterShadingStageData::_sfCullLightIndexCounterSSBOChunk field.
801 const SFUnrecShaderStorageBufferObjStdLayoutChunkPtr *ClusterShadingStageDataBase::getSFCullLightIndexCounterSSBOChunk(void) const
803 return &_sfCullLightIndexCounterSSBOChunk;
806 SFUnrecShaderStorageBufferObjStdLayoutChunkPtr *ClusterShadingStageDataBase::editSFCullLightIndexCounterSSBOChunk(void)
808 editSField(CullLightIndexCounterSSBOChunkFieldMask);
810 return &_sfCullLightIndexCounterSSBOChunk;
813 //! Get the value of the ClusterShadingStageData::_sfCullLightIndexCounterSSBOChunk field.
814 ShaderStorageBufferObjStdLayoutChunk * ClusterShadingStageDataBase::getCullLightIndexCounterSSBOChunk(void) const
816 return _sfCullLightIndexCounterSSBOChunk.getValue();
819 //! Set the value of the ClusterShadingStageData::_sfCullLightIndexCounterSSBOChunk field.
820 void ClusterShadingStageDataBase::setCullLightIndexCounterSSBOChunk(ShaderStorageBufferObjStdLayoutChunk * const value)
822 editSField(CullLightIndexCounterSSBOChunkFieldMask);
824 _sfCullLightIndexCounterSSBOChunk.setValue(value);
828 //! Get the ClusterShadingStageData::_sfFrustumsSSBOChunk field.
829 const SFUnrecShaderStorageBufferObjStdLayoutChunkPtr *ClusterShadingStageDataBase::getSFFrustumsSSBOChunk(void) const
831 return &_sfFrustumsSSBOChunk;
834 SFUnrecShaderStorageBufferObjStdLayoutChunkPtr *ClusterShadingStageDataBase::editSFFrustumsSSBOChunk(void)
836 editSField(FrustumsSSBOChunkFieldMask);
838 return &_sfFrustumsSSBOChunk;
841 //! Get the value of the ClusterShadingStageData::_sfFrustumsSSBOChunk field.
842 ShaderStorageBufferObjStdLayoutChunk * ClusterShadingStageDataBase::getFrustumsSSBOChunk(void) const
844 return _sfFrustumsSSBOChunk.getValue();
847 //! Set the value of the ClusterShadingStageData::_sfFrustumsSSBOChunk field.
848 void ClusterShadingStageDataBase::setFrustumsSSBOChunk(ShaderStorageBufferObjStdLayoutChunk * const value)
850 editSField(FrustumsSSBOChunkFieldMask);
852 _sfFrustumsSSBOChunk.setValue(value);
856 //! Get the ClusterShadingStageData::_sfAffectedLightIndexListSSBOChunk field.
857 const SFUnrecShaderStorageBufferObjStdLayoutChunkPtr *ClusterShadingStageDataBase::getSFAffectedLightIndexListSSBOChunk(void) const
859 return &_sfAffectedLightIndexListSSBOChunk;
862 SFUnrecShaderStorageBufferObjStdLayoutChunkPtr *ClusterShadingStageDataBase::editSFAffectedLightIndexListSSBOChunk(void)
864 editSField(AffectedLightIndexListSSBOChunkFieldMask);
866 return &_sfAffectedLightIndexListSSBOChunk;
869 //! Get the value of the ClusterShadingStageData::_sfAffectedLightIndexListSSBOChunk field.
870 ShaderStorageBufferObjStdLayoutChunk * ClusterShadingStageDataBase::getAffectedLightIndexListSSBOChunk(void) const
872 return _sfAffectedLightIndexListSSBOChunk.getValue();
875 //! Set the value of the ClusterShadingStageData::_sfAffectedLightIndexListSSBOChunk field.
876 void ClusterShadingStageDataBase::setAffectedLightIndexListSSBOChunk(ShaderStorageBufferObjStdLayoutChunk * const value)
878 editSField(AffectedLightIndexListSSBOChunkFieldMask);
880 _sfAffectedLightIndexListSSBOChunk.setValue(value);
884 //! Get the ClusterShadingStageData::_sfLightIndexListSSBOChunk field.
885 const SFUnrecShaderStorageBufferObjStdLayoutChunkPtr *ClusterShadingStageDataBase::getSFLightIndexListSSBOChunk(void) const
887 return &_sfLightIndexListSSBOChunk;
890 SFUnrecShaderStorageBufferObjStdLayoutChunkPtr *ClusterShadingStageDataBase::editSFLightIndexListSSBOChunk(void)
892 editSField(LightIndexListSSBOChunkFieldMask);
894 return &_sfLightIndexListSSBOChunk;
897 //! Get the value of the ClusterShadingStageData::_sfLightIndexListSSBOChunk field.
898 ShaderStorageBufferObjStdLayoutChunk * ClusterShadingStageDataBase::getLightIndexListSSBOChunk(void) const
900 return _sfLightIndexListSSBOChunk.getValue();
903 //! Set the value of the ClusterShadingStageData::_sfLightIndexListSSBOChunk field.
904 void ClusterShadingStageDataBase::setLightIndexListSSBOChunk(ShaderStorageBufferObjStdLayoutChunk * const value)
906 editSField(LightIndexListSSBOChunkFieldMask);
908 _sfLightIndexListSSBOChunk.setValue(value);
912 //! Get the ClusterShadingStageData::_sfFrustChunkMat field.
913 const SFUnrecChunkMaterialPtr *ClusterShadingStageDataBase::getSFFrustChunkMat(void) const
915 return &_sfFrustChunkMat;
918 SFUnrecChunkMaterialPtr *ClusterShadingStageDataBase::editSFFrustChunkMat (void)
920 editSField(FrustChunkMatFieldMask);
922 return &_sfFrustChunkMat;
925 //! Get the value of the ClusterShadingStageData::_sfFrustChunkMat field.
926 ChunkMaterial * ClusterShadingStageDataBase::getFrustChunkMat(void) const
928 return _sfFrustChunkMat.getValue();
931 //! Set the value of the ClusterShadingStageData::_sfFrustChunkMat field.
932 void ClusterShadingStageDataBase::setFrustChunkMat(ChunkMaterial * const value)
934 editSField(FrustChunkMatFieldMask);
936 _sfFrustChunkMat.setValue(value);
940 //! Get the ClusterShadingStageData::_sfCullChunkMat field.
941 const SFUnrecChunkMaterialPtr *ClusterShadingStageDataBase::getSFCullChunkMat(void) const
943 return &_sfCullChunkMat;
946 SFUnrecChunkMaterialPtr *ClusterShadingStageDataBase::editSFCullChunkMat (void)
948 editSField(CullChunkMatFieldMask);
950 return &_sfCullChunkMat;
953 //! Get the value of the ClusterShadingStageData::_sfCullChunkMat field.
954 ChunkMaterial * ClusterShadingStageDataBase::getCullChunkMat(void) const
956 return _sfCullChunkMat.getValue();
959 //! Set the value of the ClusterShadingStageData::_sfCullChunkMat field.
960 void ClusterShadingStageDataBase::setCullChunkMat(ChunkMaterial * const value)
962 editSField(CullChunkMatFieldMask);
964 _sfCullChunkMat.setValue(value);
968 //! Get the ClusterShadingStageData::_sfLightGridImage field.
969 const SFUnrecImagePtr *ClusterShadingStageDataBase::getSFLightGridImage(void) const
971 return &_sfLightGridImage;
974 SFUnrecImagePtr *ClusterShadingStageDataBase::editSFLightGridImage (void)
976 editSField(LightGridImageFieldMask);
978 return &_sfLightGridImage;
981 //! Get the value of the ClusterShadingStageData::_sfLightGridImage field.
982 Image * ClusterShadingStageDataBase::getLightGridImage(void) const
984 return _sfLightGridImage.getValue();
987 //! Set the value of the ClusterShadingStageData::_sfLightGridImage field.
988 void ClusterShadingStageDataBase::setLightGridImage(Image * const value)
990 editSField(LightGridImageFieldMask);
992 _sfLightGridImage.setValue(value);
996 //! Get the ClusterShadingStageData::_sfLightGridTexObjChunk field.
997 const SFUnrecTextureObjChunkPtr *ClusterShadingStageDataBase::getSFLightGridTexObjChunk(void) const
999 return &_sfLightGridTexObjChunk;
1002 SFUnrecTextureObjChunkPtr *ClusterShadingStageDataBase::editSFLightGridTexObjChunk(void)
1004 editSField(LightGridTexObjChunkFieldMask);
1006 return &_sfLightGridTexObjChunk;
1009 //! Get the value of the ClusterShadingStageData::_sfLightGridTexObjChunk field.
1010 TextureObjChunk * ClusterShadingStageDataBase::getLightGridTexObjChunk(void) const
1012 return _sfLightGridTexObjChunk.getValue();
1015 //! Set the value of the ClusterShadingStageData::_sfLightGridTexObjChunk field.
1016 void ClusterShadingStageDataBase::setLightGridTexObjChunk(TextureObjChunk * const value)
1018 editSField(LightGridTexObjChunkFieldMask);
1020 _sfLightGridTexObjChunk.setValue(value);
1024 //! Get the ClusterShadingStageData::_sfLightGridTexImgChunkCS field.
1025 const SFUnrecTextureImageChunkPtr *ClusterShadingStageDataBase::getSFLightGridTexImgChunkCS(void) const
1027 return &_sfLightGridTexImgChunkCS;
1030 SFUnrecTextureImageChunkPtr *ClusterShadingStageDataBase::editSFLightGridTexImgChunkCS(void)
1032 editSField(LightGridTexImgChunkCSFieldMask);
1034 return &_sfLightGridTexImgChunkCS;
1037 //! Get the value of the ClusterShadingStageData::_sfLightGridTexImgChunkCS field.
1038 TextureImageChunk * ClusterShadingStageDataBase::getLightGridTexImgChunkCS(void) const
1040 return _sfLightGridTexImgChunkCS.getValue();
1043 //! Set the value of the ClusterShadingStageData::_sfLightGridTexImgChunkCS field.
1044 void ClusterShadingStageDataBase::setLightGridTexImgChunkCS(TextureImageChunk * const value)
1046 editSField(LightGridTexImgChunkCSFieldMask);
1048 _sfLightGridTexImgChunkCS.setValue(value);
1052 //! Get the ClusterShadingStageData::_sfLightGridTexImgChunkFS field.
1053 const SFUnrecTextureImageChunkPtr *ClusterShadingStageDataBase::getSFLightGridTexImgChunkFS(void) const
1055 return &_sfLightGridTexImgChunkFS;
1058 SFUnrecTextureImageChunkPtr *ClusterShadingStageDataBase::editSFLightGridTexImgChunkFS(void)
1060 editSField(LightGridTexImgChunkFSFieldMask);
1062 return &_sfLightGridTexImgChunkFS;
1065 //! Get the value of the ClusterShadingStageData::_sfLightGridTexImgChunkFS field.
1066 TextureImageChunk * ClusterShadingStageDataBase::getLightGridTexImgChunkFS(void) const
1068 return _sfLightGridTexImgChunkFS.getValue();
1071 //! Set the value of the ClusterShadingStageData::_sfLightGridTexImgChunkFS field.
1072 void ClusterShadingStageDataBase::setLightGridTexImgChunkFS(TextureImageChunk * const value)
1074 editSField(LightGridTexImgChunkFSFieldMask);
1076 _sfLightGridTexImgChunkFS.setValue(value);
1080 MFMatrix *ClusterShadingStageDataBase::editMFFrustumPlanesNormals(void)
1082 editMField(FrustumPlanesNormalsFieldMask, _mfFrustumPlanesNormals);
1084 return &_mfFrustumPlanesNormals;
1087 const MFMatrix *ClusterShadingStageDataBase::getMFFrustumPlanesNormals(void) const
1089 return &_mfFrustumPlanesNormals;
1093 MFVec4f *ClusterShadingStageDataBase::editMFFrustumPlanesDistances(void)
1095 editMField(FrustumPlanesDistancesFieldMask, _mfFrustumPlanesDistances);
1097 return &_mfFrustumPlanesDistances;
1100 const MFVec4f *ClusterShadingStageDataBase::getMFFrustumPlanesDistances(void) const
1102 return &_mfFrustumPlanesDistances;
1106 SFInt32 *ClusterShadingStageDataBase::editSFLeft(void)
1108 editSField(LeftFieldMask);
1110 return &_sfLeft;
1113 const SFInt32 *ClusterShadingStageDataBase::getSFLeft(void) const
1115 return &_sfLeft;
1119 SFInt32 *ClusterShadingStageDataBase::editSFBottom(void)
1121 editSField(BottomFieldMask);
1123 return &_sfBottom;
1126 const SFInt32 *ClusterShadingStageDataBase::getSFBottom(void) const
1128 return &_sfBottom;
1132 SFInt32 *ClusterShadingStageDataBase::editSFWidth(void)
1134 editSField(WidthFieldMask);
1136 return &_sfWidth;
1139 const SFInt32 *ClusterShadingStageDataBase::getSFWidth(void) const
1141 return &_sfWidth;
1145 SFInt32 *ClusterShadingStageDataBase::editSFHeight(void)
1147 editSField(HeightFieldMask);
1149 return &_sfHeight;
1152 const SFInt32 *ClusterShadingStageDataBase::getSFHeight(void) const
1154 return &_sfHeight;
1158 SFBool *ClusterShadingStageDataBase::editSFIsOrthographicCamera(void)
1160 editSField(IsOrthographicCameraFieldMask);
1162 return &_sfIsOrthographicCamera;
1165 const SFBool *ClusterShadingStageDataBase::getSFIsOrthographicCamera(void) const
1167 return &_sfIsOrthographicCamera;
1175 /*------------------------------ access -----------------------------------*/
1177 SizeT ClusterShadingStageDataBase::getBinSize(ConstFieldMaskArg whichField)
1179 SizeT returnValue = Inherited::getBinSize(whichField);
1181 if(FieldBits::NoField != (FrustDispDatUBOChunkFieldMask & whichField))
1183 returnValue += _sfFrustDispDatUBOChunk.getBinSize();
1185 if(FieldBits::NoField != (CullDispDatUBOChunkFieldMask & whichField))
1187 returnValue += _sfCullDispDatUBOChunk.getBinSize();
1189 if(FieldBits::NoField != (CullClusterDatUBOChunkFieldMask & whichField))
1191 returnValue += _sfCullClusterDatUBOChunk.getBinSize();
1193 if(FieldBits::NoField != (CullLightIndexCounterSSBOChunkFieldMask & whichField))
1195 returnValue += _sfCullLightIndexCounterSSBOChunk.getBinSize();
1197 if(FieldBits::NoField != (FrustumsSSBOChunkFieldMask & whichField))
1199 returnValue += _sfFrustumsSSBOChunk.getBinSize();
1201 if(FieldBits::NoField != (AffectedLightIndexListSSBOChunkFieldMask & whichField))
1203 returnValue += _sfAffectedLightIndexListSSBOChunk.getBinSize();
1205 if(FieldBits::NoField != (LightIndexListSSBOChunkFieldMask & whichField))
1207 returnValue += _sfLightIndexListSSBOChunk.getBinSize();
1209 if(FieldBits::NoField != (FrustChunkMatFieldMask & whichField))
1211 returnValue += _sfFrustChunkMat.getBinSize();
1213 if(FieldBits::NoField != (CullChunkMatFieldMask & whichField))
1215 returnValue += _sfCullChunkMat.getBinSize();
1217 if(FieldBits::NoField != (LightGridImageFieldMask & whichField))
1219 returnValue += _sfLightGridImage.getBinSize();
1221 if(FieldBits::NoField != (LightGridTexObjChunkFieldMask & whichField))
1223 returnValue += _sfLightGridTexObjChunk.getBinSize();
1225 if(FieldBits::NoField != (LightGridTexImgChunkCSFieldMask & whichField))
1227 returnValue += _sfLightGridTexImgChunkCS.getBinSize();
1229 if(FieldBits::NoField != (LightGridTexImgChunkFSFieldMask & whichField))
1231 returnValue += _sfLightGridTexImgChunkFS.getBinSize();
1233 if(FieldBits::NoField != (FrustumPlanesNormalsFieldMask & whichField))
1235 returnValue += _mfFrustumPlanesNormals.getBinSize();
1237 if(FieldBits::NoField != (FrustumPlanesDistancesFieldMask & whichField))
1239 returnValue += _mfFrustumPlanesDistances.getBinSize();
1241 if(FieldBits::NoField != (LeftFieldMask & whichField))
1243 returnValue += _sfLeft.getBinSize();
1245 if(FieldBits::NoField != (BottomFieldMask & whichField))
1247 returnValue += _sfBottom.getBinSize();
1249 if(FieldBits::NoField != (WidthFieldMask & whichField))
1251 returnValue += _sfWidth.getBinSize();
1253 if(FieldBits::NoField != (HeightFieldMask & whichField))
1255 returnValue += _sfHeight.getBinSize();
1257 if(FieldBits::NoField != (IsOrthographicCameraFieldMask & whichField))
1259 returnValue += _sfIsOrthographicCamera.getBinSize();
1262 return returnValue;
1265 void ClusterShadingStageDataBase::copyToBin(BinaryDataHandler &pMem,
1266 ConstFieldMaskArg whichField)
1268 Inherited::copyToBin(pMem, whichField);
1270 if(FieldBits::NoField != (FrustDispDatUBOChunkFieldMask & whichField))
1272 _sfFrustDispDatUBOChunk.copyToBin(pMem);
1274 if(FieldBits::NoField != (CullDispDatUBOChunkFieldMask & whichField))
1276 _sfCullDispDatUBOChunk.copyToBin(pMem);
1278 if(FieldBits::NoField != (CullClusterDatUBOChunkFieldMask & whichField))
1280 _sfCullClusterDatUBOChunk.copyToBin(pMem);
1282 if(FieldBits::NoField != (CullLightIndexCounterSSBOChunkFieldMask & whichField))
1284 _sfCullLightIndexCounterSSBOChunk.copyToBin(pMem);
1286 if(FieldBits::NoField != (FrustumsSSBOChunkFieldMask & whichField))
1288 _sfFrustumsSSBOChunk.copyToBin(pMem);
1290 if(FieldBits::NoField != (AffectedLightIndexListSSBOChunkFieldMask & whichField))
1292 _sfAffectedLightIndexListSSBOChunk.copyToBin(pMem);
1294 if(FieldBits::NoField != (LightIndexListSSBOChunkFieldMask & whichField))
1296 _sfLightIndexListSSBOChunk.copyToBin(pMem);
1298 if(FieldBits::NoField != (FrustChunkMatFieldMask & whichField))
1300 _sfFrustChunkMat.copyToBin(pMem);
1302 if(FieldBits::NoField != (CullChunkMatFieldMask & whichField))
1304 _sfCullChunkMat.copyToBin(pMem);
1306 if(FieldBits::NoField != (LightGridImageFieldMask & whichField))
1308 _sfLightGridImage.copyToBin(pMem);
1310 if(FieldBits::NoField != (LightGridTexObjChunkFieldMask & whichField))
1312 _sfLightGridTexObjChunk.copyToBin(pMem);
1314 if(FieldBits::NoField != (LightGridTexImgChunkCSFieldMask & whichField))
1316 _sfLightGridTexImgChunkCS.copyToBin(pMem);
1318 if(FieldBits::NoField != (LightGridTexImgChunkFSFieldMask & whichField))
1320 _sfLightGridTexImgChunkFS.copyToBin(pMem);
1322 if(FieldBits::NoField != (FrustumPlanesNormalsFieldMask & whichField))
1324 _mfFrustumPlanesNormals.copyToBin(pMem);
1326 if(FieldBits::NoField != (FrustumPlanesDistancesFieldMask & whichField))
1328 _mfFrustumPlanesDistances.copyToBin(pMem);
1330 if(FieldBits::NoField != (LeftFieldMask & whichField))
1332 _sfLeft.copyToBin(pMem);
1334 if(FieldBits::NoField != (BottomFieldMask & whichField))
1336 _sfBottom.copyToBin(pMem);
1338 if(FieldBits::NoField != (WidthFieldMask & whichField))
1340 _sfWidth.copyToBin(pMem);
1342 if(FieldBits::NoField != (HeightFieldMask & whichField))
1344 _sfHeight.copyToBin(pMem);
1346 if(FieldBits::NoField != (IsOrthographicCameraFieldMask & whichField))
1348 _sfIsOrthographicCamera.copyToBin(pMem);
1352 void ClusterShadingStageDataBase::copyFromBin(BinaryDataHandler &pMem,
1353 ConstFieldMaskArg whichField)
1355 Inherited::copyFromBin(pMem, whichField);
1357 if(FieldBits::NoField != (FrustDispDatUBOChunkFieldMask & whichField))
1359 editSField(FrustDispDatUBOChunkFieldMask);
1360 _sfFrustDispDatUBOChunk.copyFromBin(pMem);
1362 if(FieldBits::NoField != (CullDispDatUBOChunkFieldMask & whichField))
1364 editSField(CullDispDatUBOChunkFieldMask);
1365 _sfCullDispDatUBOChunk.copyFromBin(pMem);
1367 if(FieldBits::NoField != (CullClusterDatUBOChunkFieldMask & whichField))
1369 editSField(CullClusterDatUBOChunkFieldMask);
1370 _sfCullClusterDatUBOChunk.copyFromBin(pMem);
1372 if(FieldBits::NoField != (CullLightIndexCounterSSBOChunkFieldMask & whichField))
1374 editSField(CullLightIndexCounterSSBOChunkFieldMask);
1375 _sfCullLightIndexCounterSSBOChunk.copyFromBin(pMem);
1377 if(FieldBits::NoField != (FrustumsSSBOChunkFieldMask & whichField))
1379 editSField(FrustumsSSBOChunkFieldMask);
1380 _sfFrustumsSSBOChunk.copyFromBin(pMem);
1382 if(FieldBits::NoField != (AffectedLightIndexListSSBOChunkFieldMask & whichField))
1384 editSField(AffectedLightIndexListSSBOChunkFieldMask);
1385 _sfAffectedLightIndexListSSBOChunk.copyFromBin(pMem);
1387 if(FieldBits::NoField != (LightIndexListSSBOChunkFieldMask & whichField))
1389 editSField(LightIndexListSSBOChunkFieldMask);
1390 _sfLightIndexListSSBOChunk.copyFromBin(pMem);
1392 if(FieldBits::NoField != (FrustChunkMatFieldMask & whichField))
1394 editSField(FrustChunkMatFieldMask);
1395 _sfFrustChunkMat.copyFromBin(pMem);
1397 if(FieldBits::NoField != (CullChunkMatFieldMask & whichField))
1399 editSField(CullChunkMatFieldMask);
1400 _sfCullChunkMat.copyFromBin(pMem);
1402 if(FieldBits::NoField != (LightGridImageFieldMask & whichField))
1404 editSField(LightGridImageFieldMask);
1405 _sfLightGridImage.copyFromBin(pMem);
1407 if(FieldBits::NoField != (LightGridTexObjChunkFieldMask & whichField))
1409 editSField(LightGridTexObjChunkFieldMask);
1410 _sfLightGridTexObjChunk.copyFromBin(pMem);
1412 if(FieldBits::NoField != (LightGridTexImgChunkCSFieldMask & whichField))
1414 editSField(LightGridTexImgChunkCSFieldMask);
1415 _sfLightGridTexImgChunkCS.copyFromBin(pMem);
1417 if(FieldBits::NoField != (LightGridTexImgChunkFSFieldMask & whichField))
1419 editSField(LightGridTexImgChunkFSFieldMask);
1420 _sfLightGridTexImgChunkFS.copyFromBin(pMem);
1422 if(FieldBits::NoField != (FrustumPlanesNormalsFieldMask & whichField))
1424 editMField(FrustumPlanesNormalsFieldMask, _mfFrustumPlanesNormals);
1425 _mfFrustumPlanesNormals.copyFromBin(pMem);
1427 if(FieldBits::NoField != (FrustumPlanesDistancesFieldMask & whichField))
1429 editMField(FrustumPlanesDistancesFieldMask, _mfFrustumPlanesDistances);
1430 _mfFrustumPlanesDistances.copyFromBin(pMem);
1432 if(FieldBits::NoField != (LeftFieldMask & whichField))
1434 editSField(LeftFieldMask);
1435 _sfLeft.copyFromBin(pMem);
1437 if(FieldBits::NoField != (BottomFieldMask & whichField))
1439 editSField(BottomFieldMask);
1440 _sfBottom.copyFromBin(pMem);
1442 if(FieldBits::NoField != (WidthFieldMask & whichField))
1444 editSField(WidthFieldMask);
1445 _sfWidth.copyFromBin(pMem);
1447 if(FieldBits::NoField != (HeightFieldMask & whichField))
1449 editSField(HeightFieldMask);
1450 _sfHeight.copyFromBin(pMem);
1452 if(FieldBits::NoField != (IsOrthographicCameraFieldMask & whichField))
1454 editSField(IsOrthographicCameraFieldMask);
1455 _sfIsOrthographicCamera.copyFromBin(pMem);
1459 //! create a new instance of the class
1460 ClusterShadingStageDataTransitPtr ClusterShadingStageDataBase::createLocal(BitVector bFlags)
1462 ClusterShadingStageDataTransitPtr fc;
1464 if(getClassType().getPrototype() != NULL)
1466 FieldContainerTransitPtr tmpPtr =
1467 getClassType().getPrototype()-> shallowCopyLocal(bFlags);
1469 fc = dynamic_pointer_cast<ClusterShadingStageData>(tmpPtr);
1472 return fc;
1475 //! create a new instance of the class, copy the container flags
1476 ClusterShadingStageDataTransitPtr ClusterShadingStageDataBase::createDependent(BitVector bFlags)
1478 ClusterShadingStageDataTransitPtr fc;
1480 if(getClassType().getPrototype() != NULL)
1482 FieldContainerTransitPtr tmpPtr =
1483 getClassType().getPrototype()-> shallowCopyDependent(bFlags);
1485 fc = dynamic_pointer_cast<ClusterShadingStageData>(tmpPtr);
1488 return fc;
1491 //! create a new instance of the class
1492 ClusterShadingStageDataTransitPtr ClusterShadingStageDataBase::create(void)
1494 ClusterShadingStageDataTransitPtr fc;
1496 if(getClassType().getPrototype() != NULL)
1498 FieldContainerTransitPtr tmpPtr =
1499 getClassType().getPrototype()-> shallowCopy();
1501 fc = dynamic_pointer_cast<ClusterShadingStageData>(tmpPtr);
1504 return fc;
1507 ClusterShadingStageData *ClusterShadingStageDataBase::createEmptyLocal(BitVector bFlags)
1509 ClusterShadingStageData *returnValue;
1511 newPtr<ClusterShadingStageData>(returnValue, bFlags);
1513 returnValue->_pFieldFlags->_bNamespaceMask &= ~bFlags;
1515 return returnValue;
1518 //! create an empty new instance of the class, do not copy the prototype
1519 ClusterShadingStageData *ClusterShadingStageDataBase::createEmpty(void)
1521 ClusterShadingStageData *returnValue;
1523 newPtr<ClusterShadingStageData>(returnValue, Thread::getCurrentLocalFlags());
1525 returnValue->_pFieldFlags->_bNamespaceMask &=
1526 ~Thread::getCurrentLocalFlags();
1528 return returnValue;
1532 FieldContainerTransitPtr ClusterShadingStageDataBase::shallowCopyLocal(
1533 BitVector bFlags) const
1535 ClusterShadingStageData *tmpPtr;
1537 newPtr(tmpPtr, dynamic_cast<const ClusterShadingStageData *>(this), bFlags);
1539 FieldContainerTransitPtr returnValue(tmpPtr);
1541 tmpPtr->_pFieldFlags->_bNamespaceMask &= ~bFlags;
1543 return returnValue;
1546 FieldContainerTransitPtr ClusterShadingStageDataBase::shallowCopyDependent(
1547 BitVector bFlags) const
1549 ClusterShadingStageData *tmpPtr;
1551 newPtr(tmpPtr, dynamic_cast<const ClusterShadingStageData *>(this), ~bFlags);
1553 FieldContainerTransitPtr returnValue(tmpPtr);
1555 tmpPtr->_pFieldFlags->_bNamespaceMask = bFlags;
1557 return returnValue;
1560 FieldContainerTransitPtr ClusterShadingStageDataBase::shallowCopy(void) const
1562 ClusterShadingStageData *tmpPtr;
1564 newPtr(tmpPtr,
1565 dynamic_cast<const ClusterShadingStageData *>(this),
1566 Thread::getCurrentLocalFlags());
1568 tmpPtr->_pFieldFlags->_bNamespaceMask &= ~Thread::getCurrentLocalFlags();
1570 FieldContainerTransitPtr returnValue(tmpPtr);
1572 return returnValue;
1578 /*------------------------- constructors ----------------------------------*/
1580 ClusterShadingStageDataBase::ClusterShadingStageDataBase(void) :
1581 Inherited(),
1582 _sfFrustDispDatUBOChunk (NULL),
1583 _sfCullDispDatUBOChunk (NULL),
1584 _sfCullClusterDatUBOChunk (NULL),
1585 _sfCullLightIndexCounterSSBOChunk(NULL),
1586 _sfFrustumsSSBOChunk (NULL),
1587 _sfAffectedLightIndexListSSBOChunk(NULL),
1588 _sfLightIndexListSSBOChunk(NULL),
1589 _sfFrustChunkMat (NULL),
1590 _sfCullChunkMat (NULL),
1591 _sfLightGridImage (NULL),
1592 _sfLightGridTexObjChunk (NULL),
1593 _sfLightGridTexImgChunkCS (NULL),
1594 _sfLightGridTexImgChunkFS (NULL),
1595 _mfFrustumPlanesNormals (),
1596 _mfFrustumPlanesDistances (),
1597 _sfLeft (Int32(0)),
1598 _sfBottom (Int32(0)),
1599 _sfWidth (Int32(0)),
1600 _sfHeight (Int32(0)),
1601 _sfIsOrthographicCamera (bool(false))
1605 ClusterShadingStageDataBase::ClusterShadingStageDataBase(const ClusterShadingStageDataBase &source) :
1606 Inherited(source),
1607 _sfFrustDispDatUBOChunk (NULL),
1608 _sfCullDispDatUBOChunk (NULL),
1609 _sfCullClusterDatUBOChunk (NULL),
1610 _sfCullLightIndexCounterSSBOChunk(NULL),
1611 _sfFrustumsSSBOChunk (NULL),
1612 _sfAffectedLightIndexListSSBOChunk(NULL),
1613 _sfLightIndexListSSBOChunk(NULL),
1614 _sfFrustChunkMat (NULL),
1615 _sfCullChunkMat (NULL),
1616 _sfLightGridImage (NULL),
1617 _sfLightGridTexObjChunk (NULL),
1618 _sfLightGridTexImgChunkCS (NULL),
1619 _sfLightGridTexImgChunkFS (NULL),
1620 _mfFrustumPlanesNormals (source._mfFrustumPlanesNormals ),
1621 _mfFrustumPlanesDistances (source._mfFrustumPlanesDistances ),
1622 _sfLeft (source._sfLeft ),
1623 _sfBottom (source._sfBottom ),
1624 _sfWidth (source._sfWidth ),
1625 _sfHeight (source._sfHeight ),
1626 _sfIsOrthographicCamera (source._sfIsOrthographicCamera )
1631 /*-------------------------- destructors ----------------------------------*/
1633 ClusterShadingStageDataBase::~ClusterShadingStageDataBase(void)
1637 void ClusterShadingStageDataBase::onCreate(const ClusterShadingStageData *source)
1639 Inherited::onCreate(source);
1641 if(source != NULL)
1643 ClusterShadingStageData *pThis = static_cast<ClusterShadingStageData *>(this);
1645 pThis->setFrustDispDatUBOChunk(source->getFrustDispDatUBOChunk());
1647 pThis->setCullDispDatUBOChunk(source->getCullDispDatUBOChunk());
1649 pThis->setCullClusterDatUBOChunk(source->getCullClusterDatUBOChunk());
1651 pThis->setCullLightIndexCounterSSBOChunk(source->getCullLightIndexCounterSSBOChunk());
1653 pThis->setFrustumsSSBOChunk(source->getFrustumsSSBOChunk());
1655 pThis->setAffectedLightIndexListSSBOChunk(source->getAffectedLightIndexListSSBOChunk());
1657 pThis->setLightIndexListSSBOChunk(source->getLightIndexListSSBOChunk());
1659 pThis->setFrustChunkMat(source->getFrustChunkMat());
1661 pThis->setCullChunkMat(source->getCullChunkMat());
1663 pThis->setLightGridImage(source->getLightGridImage());
1665 pThis->setLightGridTexObjChunk(source->getLightGridTexObjChunk());
1667 pThis->setLightGridTexImgChunkCS(source->getLightGridTexImgChunkCS());
1669 pThis->setLightGridTexImgChunkFS(source->getLightGridTexImgChunkFS());
1673 GetFieldHandlePtr ClusterShadingStageDataBase::getHandleFrustDispDatUBOChunk (void) const
1675 SFUnrecUniformBufferObjStd140ChunkPtr::GetHandlePtr returnValue(
1676 new SFUnrecUniformBufferObjStd140ChunkPtr::GetHandle(
1677 &_sfFrustDispDatUBOChunk,
1678 this->getType().getFieldDesc(FrustDispDatUBOChunkFieldId),
1679 const_cast<ClusterShadingStageDataBase *>(this)));
1681 return returnValue;
1684 EditFieldHandlePtr ClusterShadingStageDataBase::editHandleFrustDispDatUBOChunk(void)
1686 SFUnrecUniformBufferObjStd140ChunkPtr::EditHandlePtr returnValue(
1687 new SFUnrecUniformBufferObjStd140ChunkPtr::EditHandle(
1688 &_sfFrustDispDatUBOChunk,
1689 this->getType().getFieldDesc(FrustDispDatUBOChunkFieldId),
1690 this));
1692 returnValue->setSetMethod(
1693 boost::bind(&ClusterShadingStageData::setFrustDispDatUBOChunk,
1694 static_cast<ClusterShadingStageData *>(this), _1));
1696 editSField(FrustDispDatUBOChunkFieldMask);
1698 return returnValue;
1701 GetFieldHandlePtr ClusterShadingStageDataBase::getHandleCullDispDatUBOChunk (void) const
1703 SFUnrecUniformBufferObjStd140ChunkPtr::GetHandlePtr returnValue(
1704 new SFUnrecUniformBufferObjStd140ChunkPtr::GetHandle(
1705 &_sfCullDispDatUBOChunk,
1706 this->getType().getFieldDesc(CullDispDatUBOChunkFieldId),
1707 const_cast<ClusterShadingStageDataBase *>(this)));
1709 return returnValue;
1712 EditFieldHandlePtr ClusterShadingStageDataBase::editHandleCullDispDatUBOChunk(void)
1714 SFUnrecUniformBufferObjStd140ChunkPtr::EditHandlePtr returnValue(
1715 new SFUnrecUniformBufferObjStd140ChunkPtr::EditHandle(
1716 &_sfCullDispDatUBOChunk,
1717 this->getType().getFieldDesc(CullDispDatUBOChunkFieldId),
1718 this));
1720 returnValue->setSetMethod(
1721 boost::bind(&ClusterShadingStageData::setCullDispDatUBOChunk,
1722 static_cast<ClusterShadingStageData *>(this), _1));
1724 editSField(CullDispDatUBOChunkFieldMask);
1726 return returnValue;
1729 GetFieldHandlePtr ClusterShadingStageDataBase::getHandleCullClusterDatUBOChunk (void) const
1731 SFUnrecUniformBufferObjStd140ChunkPtr::GetHandlePtr returnValue(
1732 new SFUnrecUniformBufferObjStd140ChunkPtr::GetHandle(
1733 &_sfCullClusterDatUBOChunk,
1734 this->getType().getFieldDesc(CullClusterDatUBOChunkFieldId),
1735 const_cast<ClusterShadingStageDataBase *>(this)));
1737 return returnValue;
1740 EditFieldHandlePtr ClusterShadingStageDataBase::editHandleCullClusterDatUBOChunk(void)
1742 SFUnrecUniformBufferObjStd140ChunkPtr::EditHandlePtr returnValue(
1743 new SFUnrecUniformBufferObjStd140ChunkPtr::EditHandle(
1744 &_sfCullClusterDatUBOChunk,
1745 this->getType().getFieldDesc(CullClusterDatUBOChunkFieldId),
1746 this));
1748 returnValue->setSetMethod(
1749 boost::bind(&ClusterShadingStageData::setCullClusterDatUBOChunk,
1750 static_cast<ClusterShadingStageData *>(this), _1));
1752 editSField(CullClusterDatUBOChunkFieldMask);
1754 return returnValue;
1757 GetFieldHandlePtr ClusterShadingStageDataBase::getHandleCullLightIndexCounterSSBOChunk (void) const
1759 SFUnrecShaderStorageBufferObjStdLayoutChunkPtr::GetHandlePtr returnValue(
1760 new SFUnrecShaderStorageBufferObjStdLayoutChunkPtr::GetHandle(
1761 &_sfCullLightIndexCounterSSBOChunk,
1762 this->getType().getFieldDesc(CullLightIndexCounterSSBOChunkFieldId),
1763 const_cast<ClusterShadingStageDataBase *>(this)));
1765 return returnValue;
1768 EditFieldHandlePtr ClusterShadingStageDataBase::editHandleCullLightIndexCounterSSBOChunk(void)
1770 SFUnrecShaderStorageBufferObjStdLayoutChunkPtr::EditHandlePtr returnValue(
1771 new SFUnrecShaderStorageBufferObjStdLayoutChunkPtr::EditHandle(
1772 &_sfCullLightIndexCounterSSBOChunk,
1773 this->getType().getFieldDesc(CullLightIndexCounterSSBOChunkFieldId),
1774 this));
1776 returnValue->setSetMethod(
1777 boost::bind(&ClusterShadingStageData::setCullLightIndexCounterSSBOChunk,
1778 static_cast<ClusterShadingStageData *>(this), _1));
1780 editSField(CullLightIndexCounterSSBOChunkFieldMask);
1782 return returnValue;
1785 GetFieldHandlePtr ClusterShadingStageDataBase::getHandleFrustumsSSBOChunk (void) const
1787 SFUnrecShaderStorageBufferObjStdLayoutChunkPtr::GetHandlePtr returnValue(
1788 new SFUnrecShaderStorageBufferObjStdLayoutChunkPtr::GetHandle(
1789 &_sfFrustumsSSBOChunk,
1790 this->getType().getFieldDesc(FrustumsSSBOChunkFieldId),
1791 const_cast<ClusterShadingStageDataBase *>(this)));
1793 return returnValue;
1796 EditFieldHandlePtr ClusterShadingStageDataBase::editHandleFrustumsSSBOChunk(void)
1798 SFUnrecShaderStorageBufferObjStdLayoutChunkPtr::EditHandlePtr returnValue(
1799 new SFUnrecShaderStorageBufferObjStdLayoutChunkPtr::EditHandle(
1800 &_sfFrustumsSSBOChunk,
1801 this->getType().getFieldDesc(FrustumsSSBOChunkFieldId),
1802 this));
1804 returnValue->setSetMethod(
1805 boost::bind(&ClusterShadingStageData::setFrustumsSSBOChunk,
1806 static_cast<ClusterShadingStageData *>(this), _1));
1808 editSField(FrustumsSSBOChunkFieldMask);
1810 return returnValue;
1813 GetFieldHandlePtr ClusterShadingStageDataBase::getHandleAffectedLightIndexListSSBOChunk (void) const
1815 SFUnrecShaderStorageBufferObjStdLayoutChunkPtr::GetHandlePtr returnValue(
1816 new SFUnrecShaderStorageBufferObjStdLayoutChunkPtr::GetHandle(
1817 &_sfAffectedLightIndexListSSBOChunk,
1818 this->getType().getFieldDesc(AffectedLightIndexListSSBOChunkFieldId),
1819 const_cast<ClusterShadingStageDataBase *>(this)));
1821 return returnValue;
1824 EditFieldHandlePtr ClusterShadingStageDataBase::editHandleAffectedLightIndexListSSBOChunk(void)
1826 SFUnrecShaderStorageBufferObjStdLayoutChunkPtr::EditHandlePtr returnValue(
1827 new SFUnrecShaderStorageBufferObjStdLayoutChunkPtr::EditHandle(
1828 &_sfAffectedLightIndexListSSBOChunk,
1829 this->getType().getFieldDesc(AffectedLightIndexListSSBOChunkFieldId),
1830 this));
1832 returnValue->setSetMethod(
1833 boost::bind(&ClusterShadingStageData::setAffectedLightIndexListSSBOChunk,
1834 static_cast<ClusterShadingStageData *>(this), _1));
1836 editSField(AffectedLightIndexListSSBOChunkFieldMask);
1838 return returnValue;
1841 GetFieldHandlePtr ClusterShadingStageDataBase::getHandleLightIndexListSSBOChunk (void) const
1843 SFUnrecShaderStorageBufferObjStdLayoutChunkPtr::GetHandlePtr returnValue(
1844 new SFUnrecShaderStorageBufferObjStdLayoutChunkPtr::GetHandle(
1845 &_sfLightIndexListSSBOChunk,
1846 this->getType().getFieldDesc(LightIndexListSSBOChunkFieldId),
1847 const_cast<ClusterShadingStageDataBase *>(this)));
1849 return returnValue;
1852 EditFieldHandlePtr ClusterShadingStageDataBase::editHandleLightIndexListSSBOChunk(void)
1854 SFUnrecShaderStorageBufferObjStdLayoutChunkPtr::EditHandlePtr returnValue(
1855 new SFUnrecShaderStorageBufferObjStdLayoutChunkPtr::EditHandle(
1856 &_sfLightIndexListSSBOChunk,
1857 this->getType().getFieldDesc(LightIndexListSSBOChunkFieldId),
1858 this));
1860 returnValue->setSetMethod(
1861 boost::bind(&ClusterShadingStageData::setLightIndexListSSBOChunk,
1862 static_cast<ClusterShadingStageData *>(this), _1));
1864 editSField(LightIndexListSSBOChunkFieldMask);
1866 return returnValue;
1869 GetFieldHandlePtr ClusterShadingStageDataBase::getHandleFrustChunkMat (void) const
1871 SFUnrecChunkMaterialPtr::GetHandlePtr returnValue(
1872 new SFUnrecChunkMaterialPtr::GetHandle(
1873 &_sfFrustChunkMat,
1874 this->getType().getFieldDesc(FrustChunkMatFieldId),
1875 const_cast<ClusterShadingStageDataBase *>(this)));
1877 return returnValue;
1880 EditFieldHandlePtr ClusterShadingStageDataBase::editHandleFrustChunkMat (void)
1882 SFUnrecChunkMaterialPtr::EditHandlePtr returnValue(
1883 new SFUnrecChunkMaterialPtr::EditHandle(
1884 &_sfFrustChunkMat,
1885 this->getType().getFieldDesc(FrustChunkMatFieldId),
1886 this));
1888 returnValue->setSetMethod(
1889 boost::bind(&ClusterShadingStageData::setFrustChunkMat,
1890 static_cast<ClusterShadingStageData *>(this), _1));
1892 editSField(FrustChunkMatFieldMask);
1894 return returnValue;
1897 GetFieldHandlePtr ClusterShadingStageDataBase::getHandleCullChunkMat (void) const
1899 SFUnrecChunkMaterialPtr::GetHandlePtr returnValue(
1900 new SFUnrecChunkMaterialPtr::GetHandle(
1901 &_sfCullChunkMat,
1902 this->getType().getFieldDesc(CullChunkMatFieldId),
1903 const_cast<ClusterShadingStageDataBase *>(this)));
1905 return returnValue;
1908 EditFieldHandlePtr ClusterShadingStageDataBase::editHandleCullChunkMat (void)
1910 SFUnrecChunkMaterialPtr::EditHandlePtr returnValue(
1911 new SFUnrecChunkMaterialPtr::EditHandle(
1912 &_sfCullChunkMat,
1913 this->getType().getFieldDesc(CullChunkMatFieldId),
1914 this));
1916 returnValue->setSetMethod(
1917 boost::bind(&ClusterShadingStageData::setCullChunkMat,
1918 static_cast<ClusterShadingStageData *>(this), _1));
1920 editSField(CullChunkMatFieldMask);
1922 return returnValue;
1925 GetFieldHandlePtr ClusterShadingStageDataBase::getHandleLightGridImage (void) const
1927 SFUnrecImagePtr::GetHandlePtr returnValue(
1928 new SFUnrecImagePtr::GetHandle(
1929 &_sfLightGridImage,
1930 this->getType().getFieldDesc(LightGridImageFieldId),
1931 const_cast<ClusterShadingStageDataBase *>(this)));
1933 return returnValue;
1936 EditFieldHandlePtr ClusterShadingStageDataBase::editHandleLightGridImage (void)
1938 SFUnrecImagePtr::EditHandlePtr returnValue(
1939 new SFUnrecImagePtr::EditHandle(
1940 &_sfLightGridImage,
1941 this->getType().getFieldDesc(LightGridImageFieldId),
1942 this));
1944 returnValue->setSetMethod(
1945 boost::bind(&ClusterShadingStageData::setLightGridImage,
1946 static_cast<ClusterShadingStageData *>(this), _1));
1948 editSField(LightGridImageFieldMask);
1950 return returnValue;
1953 GetFieldHandlePtr ClusterShadingStageDataBase::getHandleLightGridTexObjChunk (void) const
1955 SFUnrecTextureObjChunkPtr::GetHandlePtr returnValue(
1956 new SFUnrecTextureObjChunkPtr::GetHandle(
1957 &_sfLightGridTexObjChunk,
1958 this->getType().getFieldDesc(LightGridTexObjChunkFieldId),
1959 const_cast<ClusterShadingStageDataBase *>(this)));
1961 return returnValue;
1964 EditFieldHandlePtr ClusterShadingStageDataBase::editHandleLightGridTexObjChunk(void)
1966 SFUnrecTextureObjChunkPtr::EditHandlePtr returnValue(
1967 new SFUnrecTextureObjChunkPtr::EditHandle(
1968 &_sfLightGridTexObjChunk,
1969 this->getType().getFieldDesc(LightGridTexObjChunkFieldId),
1970 this));
1972 returnValue->setSetMethod(
1973 boost::bind(&ClusterShadingStageData::setLightGridTexObjChunk,
1974 static_cast<ClusterShadingStageData *>(this), _1));
1976 editSField(LightGridTexObjChunkFieldMask);
1978 return returnValue;
1981 GetFieldHandlePtr ClusterShadingStageDataBase::getHandleLightGridTexImgChunkCS (void) const
1983 SFUnrecTextureImageChunkPtr::GetHandlePtr returnValue(
1984 new SFUnrecTextureImageChunkPtr::GetHandle(
1985 &_sfLightGridTexImgChunkCS,
1986 this->getType().getFieldDesc(LightGridTexImgChunkCSFieldId),
1987 const_cast<ClusterShadingStageDataBase *>(this)));
1989 return returnValue;
1992 EditFieldHandlePtr ClusterShadingStageDataBase::editHandleLightGridTexImgChunkCS(void)
1994 SFUnrecTextureImageChunkPtr::EditHandlePtr returnValue(
1995 new SFUnrecTextureImageChunkPtr::EditHandle(
1996 &_sfLightGridTexImgChunkCS,
1997 this->getType().getFieldDesc(LightGridTexImgChunkCSFieldId),
1998 this));
2000 returnValue->setSetMethod(
2001 boost::bind(&ClusterShadingStageData::setLightGridTexImgChunkCS,
2002 static_cast<ClusterShadingStageData *>(this), _1));
2004 editSField(LightGridTexImgChunkCSFieldMask);
2006 return returnValue;
2009 GetFieldHandlePtr ClusterShadingStageDataBase::getHandleLightGridTexImgChunkFS (void) const
2011 SFUnrecTextureImageChunkPtr::GetHandlePtr returnValue(
2012 new SFUnrecTextureImageChunkPtr::GetHandle(
2013 &_sfLightGridTexImgChunkFS,
2014 this->getType().getFieldDesc(LightGridTexImgChunkFSFieldId),
2015 const_cast<ClusterShadingStageDataBase *>(this)));
2017 return returnValue;
2020 EditFieldHandlePtr ClusterShadingStageDataBase::editHandleLightGridTexImgChunkFS(void)
2022 SFUnrecTextureImageChunkPtr::EditHandlePtr returnValue(
2023 new SFUnrecTextureImageChunkPtr::EditHandle(
2024 &_sfLightGridTexImgChunkFS,
2025 this->getType().getFieldDesc(LightGridTexImgChunkFSFieldId),
2026 this));
2028 returnValue->setSetMethod(
2029 boost::bind(&ClusterShadingStageData::setLightGridTexImgChunkFS,
2030 static_cast<ClusterShadingStageData *>(this), _1));
2032 editSField(LightGridTexImgChunkFSFieldMask);
2034 return returnValue;
2037 GetFieldHandlePtr ClusterShadingStageDataBase::getHandleFrustumPlanesNormals (void) const
2039 MFMatrix::GetHandlePtr returnValue(
2040 new MFMatrix::GetHandle(
2041 &_mfFrustumPlanesNormals,
2042 this->getType().getFieldDesc(FrustumPlanesNormalsFieldId),
2043 const_cast<ClusterShadingStageDataBase *>(this)));
2045 return returnValue;
2048 EditFieldHandlePtr ClusterShadingStageDataBase::editHandleFrustumPlanesNormals(void)
2050 MFMatrix::EditHandlePtr returnValue(
2051 new MFMatrix::EditHandle(
2052 &_mfFrustumPlanesNormals,
2053 this->getType().getFieldDesc(FrustumPlanesNormalsFieldId),
2054 this));
2057 editMField(FrustumPlanesNormalsFieldMask, _mfFrustumPlanesNormals);
2059 return returnValue;
2062 GetFieldHandlePtr ClusterShadingStageDataBase::getHandleFrustumPlanesDistances (void) const
2064 MFVec4f::GetHandlePtr returnValue(
2065 new MFVec4f::GetHandle(
2066 &_mfFrustumPlanesDistances,
2067 this->getType().getFieldDesc(FrustumPlanesDistancesFieldId),
2068 const_cast<ClusterShadingStageDataBase *>(this)));
2070 return returnValue;
2073 EditFieldHandlePtr ClusterShadingStageDataBase::editHandleFrustumPlanesDistances(void)
2075 MFVec4f::EditHandlePtr returnValue(
2076 new MFVec4f::EditHandle(
2077 &_mfFrustumPlanesDistances,
2078 this->getType().getFieldDesc(FrustumPlanesDistancesFieldId),
2079 this));
2082 editMField(FrustumPlanesDistancesFieldMask, _mfFrustumPlanesDistances);
2084 return returnValue;
2087 GetFieldHandlePtr ClusterShadingStageDataBase::getHandleLeft (void) const
2089 SFInt32::GetHandlePtr returnValue(
2090 new SFInt32::GetHandle(
2091 &_sfLeft,
2092 this->getType().getFieldDesc(LeftFieldId),
2093 const_cast<ClusterShadingStageDataBase *>(this)));
2095 return returnValue;
2098 EditFieldHandlePtr ClusterShadingStageDataBase::editHandleLeft (void)
2100 SFInt32::EditHandlePtr returnValue(
2101 new SFInt32::EditHandle(
2102 &_sfLeft,
2103 this->getType().getFieldDesc(LeftFieldId),
2104 this));
2107 editSField(LeftFieldMask);
2109 return returnValue;
2112 GetFieldHandlePtr ClusterShadingStageDataBase::getHandleBottom (void) const
2114 SFInt32::GetHandlePtr returnValue(
2115 new SFInt32::GetHandle(
2116 &_sfBottom,
2117 this->getType().getFieldDesc(BottomFieldId),
2118 const_cast<ClusterShadingStageDataBase *>(this)));
2120 return returnValue;
2123 EditFieldHandlePtr ClusterShadingStageDataBase::editHandleBottom (void)
2125 SFInt32::EditHandlePtr returnValue(
2126 new SFInt32::EditHandle(
2127 &_sfBottom,
2128 this->getType().getFieldDesc(BottomFieldId),
2129 this));
2132 editSField(BottomFieldMask);
2134 return returnValue;
2137 GetFieldHandlePtr ClusterShadingStageDataBase::getHandleWidth (void) const
2139 SFInt32::GetHandlePtr returnValue(
2140 new SFInt32::GetHandle(
2141 &_sfWidth,
2142 this->getType().getFieldDesc(WidthFieldId),
2143 const_cast<ClusterShadingStageDataBase *>(this)));
2145 return returnValue;
2148 EditFieldHandlePtr ClusterShadingStageDataBase::editHandleWidth (void)
2150 SFInt32::EditHandlePtr returnValue(
2151 new SFInt32::EditHandle(
2152 &_sfWidth,
2153 this->getType().getFieldDesc(WidthFieldId),
2154 this));
2157 editSField(WidthFieldMask);
2159 return returnValue;
2162 GetFieldHandlePtr ClusterShadingStageDataBase::getHandleHeight (void) const
2164 SFInt32::GetHandlePtr returnValue(
2165 new SFInt32::GetHandle(
2166 &_sfHeight,
2167 this->getType().getFieldDesc(HeightFieldId),
2168 const_cast<ClusterShadingStageDataBase *>(this)));
2170 return returnValue;
2173 EditFieldHandlePtr ClusterShadingStageDataBase::editHandleHeight (void)
2175 SFInt32::EditHandlePtr returnValue(
2176 new SFInt32::EditHandle(
2177 &_sfHeight,
2178 this->getType().getFieldDesc(HeightFieldId),
2179 this));
2182 editSField(HeightFieldMask);
2184 return returnValue;
2187 GetFieldHandlePtr ClusterShadingStageDataBase::getHandleIsOrthographicCamera (void) const
2189 SFBool::GetHandlePtr returnValue(
2190 new SFBool::GetHandle(
2191 &_sfIsOrthographicCamera,
2192 this->getType().getFieldDesc(IsOrthographicCameraFieldId),
2193 const_cast<ClusterShadingStageDataBase *>(this)));
2195 return returnValue;
2198 EditFieldHandlePtr ClusterShadingStageDataBase::editHandleIsOrthographicCamera(void)
2200 SFBool::EditHandlePtr returnValue(
2201 new SFBool::EditHandle(
2202 &_sfIsOrthographicCamera,
2203 this->getType().getFieldDesc(IsOrthographicCameraFieldId),
2204 this));
2207 editSField(IsOrthographicCameraFieldMask);
2209 return returnValue;
2213 #ifdef OSG_MT_CPTR_ASPECT
2214 void ClusterShadingStageDataBase::execSyncV( FieldContainer &oFrom,
2215 ConstFieldMaskArg whichField,
2216 AspectOffsetStore &oOffsets,
2217 ConstFieldMaskArg syncMode,
2218 const UInt32 uiSyncInfo)
2220 ClusterShadingStageData *pThis = static_cast<ClusterShadingStageData *>(this);
2222 pThis->execSync(static_cast<ClusterShadingStageData *>(&oFrom),
2223 whichField,
2224 oOffsets,
2225 syncMode,
2226 uiSyncInfo);
2228 #endif
2231 #ifdef OSG_MT_CPTR_ASPECT
2232 FieldContainer *ClusterShadingStageDataBase::createAspectCopy(
2233 const FieldContainer *pRefAspect) const
2235 ClusterShadingStageData *returnValue;
2237 newAspectCopy(returnValue,
2238 dynamic_cast<const ClusterShadingStageData *>(pRefAspect),
2239 dynamic_cast<const ClusterShadingStageData *>(this));
2241 return returnValue;
2243 #endif
2245 void ClusterShadingStageDataBase::resolveLinks(void)
2247 Inherited::resolveLinks();
2249 static_cast<ClusterShadingStageData *>(this)->setFrustDispDatUBOChunk(NULL);
2251 static_cast<ClusterShadingStageData *>(this)->setCullDispDatUBOChunk(NULL);
2253 static_cast<ClusterShadingStageData *>(this)->setCullClusterDatUBOChunk(NULL);
2255 static_cast<ClusterShadingStageData *>(this)->setCullLightIndexCounterSSBOChunk(NULL);
2257 static_cast<ClusterShadingStageData *>(this)->setFrustumsSSBOChunk(NULL);
2259 static_cast<ClusterShadingStageData *>(this)->setAffectedLightIndexListSSBOChunk(NULL);
2261 static_cast<ClusterShadingStageData *>(this)->setLightIndexListSSBOChunk(NULL);
2263 static_cast<ClusterShadingStageData *>(this)->setFrustChunkMat(NULL);
2265 static_cast<ClusterShadingStageData *>(this)->setCullChunkMat(NULL);
2267 static_cast<ClusterShadingStageData *>(this)->setLightGridImage(NULL);
2269 static_cast<ClusterShadingStageData *>(this)->setLightGridTexObjChunk(NULL);
2271 static_cast<ClusterShadingStageData *>(this)->setLightGridTexImgChunkCS(NULL);
2273 static_cast<ClusterShadingStageData *>(this)->setLightGridTexImgChunkFS(NULL);
2275 #ifdef OSG_MT_CPTR_ASPECT
2276 AspectOffsetStore oOffsets;
2278 _pAspectStore->fillOffsetArray(oOffsets, this);
2279 #endif
2281 #ifdef OSG_MT_CPTR_ASPECT
2282 _mfFrustumPlanesNormals.terminateShare(Thread::getCurrentAspect(),
2283 oOffsets);
2284 #endif
2285 #ifdef OSG_MT_CPTR_ASPECT
2286 _mfFrustumPlanesDistances.terminateShare(Thread::getCurrentAspect(),
2287 oOffsets);
2288 #endif
2292 OSG_END_NAMESPACE