fixed: gcc8 compile issues
[opensg.git] / Source / Contrib / Techniques / OSGClusterShadingStageDataBase.cpp
blob12e976077211b83a52aec6bb66b2a486a9b79224
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>(&ClusterShadingStageData::classDescInserter),
454 false,
456 "<?xml version=\"1.0\"?>\n"
457 "\n"
458 "<FieldContainer\n"
459 " name=\"ClusterShadingStageData\"\n"
460 " parent=\"StageData\"\n"
461 " library=\"ContribTechniques\"\n"
462 " pointerfieldtypes=\"none\"\n"
463 " structure=\"concrete\"\n"
464 " systemcomponent=\"true\"\n"
465 " parentsystemcomponent=\"true\"\n"
466 " decoratable=\"false\"\n"
467 " useLocalIncludes=\"false\"\n"
468 " isNodeCore=\"false\"\n"
469 " >\n"
470 "\n"
471 " View dependent Data used by the ClusterShadingStage.\n"
472 "\n"
473 " <Field\n"
474 " name=\"frustDispDatUBOChunk\"\n"
475 " type=\"UniformBufferObjStd140ChunkPtr\"\n"
476 " cardinality=\"single\"\n"
477 " visibility=\"internal\"\n"
478 " defaultValue=\"NULL\"\n"
479 " access=\"public\"\n"
480 " >\n"
481 " This represents a lightweight data struct used by the calc frustums computation shader.\n"
482 " </Field>\n"
483 "\n"
484 " <Field\n"
485 " name=\"cullDispDatUBOChunk\"\n"
486 " type=\"UniformBufferObjStd140ChunkPtr\"\n"
487 " cardinality=\"single\"\n"
488 " visibility=\"internal\"\n"
489 " defaultValue=\"NULL\"\n"
490 " access=\"public\"\n"
491 " >\n"
492 " This represents a lightweight data struct used by the cull lights computation shader.\n"
493 " </Field>\n"
494 "\n"
495 " <Field\n"
496 " name=\"cullClusterDatUBOChunk\"\n"
497 " type=\"UniformBufferObjStd140ChunkPtr\"\n"
498 " cardinality=\"single\"\n"
499 " visibility=\"internal\"\n"
500 " defaultValue=\"NULL\"\n"
501 " access=\"public\"\n"
502 " >\n"
503 " Cluster data are used for calculation of the cluster keys respectively cluster z-Values.\n"
504 " This UBO is needed in the shading material fragment shader. \n"
505 " </Field>\n"
506 "\n"
507 " <Field\n"
508 " name=\"cullLightIndexCounterSSBOChunk\"\n"
509 " type=\"ShaderStorageBufferObjStdLayoutChunkPtr\"\n"
510 " cardinality=\"single\"\n"
511 " visibility=\"internal\"\n"
512 " defaultValue=\"NULL\"\n"
513 " access=\"public\"\n"
514 " >\n"
515 " This is a helper SSBO that contains a global counter used for the light culling shader.\n"
516 " </Field>\n"
517 "\n"
518 " <Field\n"
519 " name=\"frustumsSSBOChunk\"\n"
520 " type=\"ShaderStorageBufferObjStdLayoutChunkPtr\"\n"
521 " cardinality=\"single\"\n"
522 " visibility=\"internal\"\n"
523 " defaultValue=\"NULL\"\n"
524 " access=\"public\"\n"
525 " >\n"
526 " The frustums of the current view frustum.\n"
527 " </Field>\n"
528 "\n"
529 " <Field\n"
530 " name=\"affectedLightIndexListSSBOChunk\"\n"
531 " type=\"ShaderStorageBufferObjStdLayoutChunkPtr\"\n"
532 " cardinality=\"single\"\n"
533 " visibility=\"internal\"\n"
534 " defaultValue=\"NULL\"\n"
535 " access=\"public\"\n"
536 " >\n"
537 " The light index list affecting the view frustum. I.e. this index list is the\n"
538 " result of a pre light culling process before any cluster shading happens.\n"
539 " This SSBO is needed in the shading material fragment shader. \n"
540 " </Field>\n"
541 "\n"
542 " <Field\n"
543 " name=\"lightIndexListSSBOChunk\"\n"
544 " type=\"ShaderStorageBufferObjStdLayoutChunkPtr\"\n"
545 " cardinality=\"single\"\n"
546 " visibility=\"internal\"\n"
547 " defaultValue=\"NULL\"\n"
548 " access=\"public\"\n"
549 " >\n"
550 " The global light index list, containing the result of the cluster shading calculations.\n"
551 " This SSBO is needed in the shading material fragment shader. \n"
552 " </Field>\n"
553 "\n"
554 " <Field\n"
555 " name=\"frustChunkMat\"\n"
556 " type=\"ChunkMaterialPtr\"\n"
557 " cardinality=\"single\"\n"
558 " visibility=\"internal\"\n"
559 " defaultValue=\"NULL\"\n"
560 " access=\"public\"\n"
561 " >\n"
562 " The material used for the GPU frustums calculations.\n"
563 " </Field>\n"
564 "\n"
565 " <Field\n"
566 " name=\"cullChunkMat\"\n"
567 " type=\"ChunkMaterialPtr\"\n"
568 " cardinality=\"single\"\n"
569 " visibility=\"internal\"\n"
570 " defaultValue=\"NULL\"\n"
571 " access=\"public\"\n"
572 " >\n"
573 " The material used for the GPU light culling process.\n"
574 " </Field>\n"
575 " \n"
576 " <Field\n"
577 " name=\"lightGridImage\"\n"
578 " type=\"ImagePtr\"\n"
579 " cardinality=\"single\"\n"
580 " visibility=\"internal\"\n"
581 " defaultValue=\"NULL\"\n"
582 " access=\"public\"\n"
583 " >\n"
584 " The underlying image of the light grid.\n"
585 " </Field>\n"
586 "\n"
587 " <Field\n"
588 " name=\"lightGridTexObjChunk\"\n"
589 " type=\"TextureObjChunkPtr\"\n"
590 " cardinality=\"single\"\n"
591 " visibility=\"internal\"\n"
592 " defaultValue=\"NULL\"\n"
593 " access=\"public\"\n"
594 " >\n"
595 " The texture object taking the underlying image of the light grid.\n"
596 " </Field>\n"
597 "\n"
598 " <Field\n"
599 " name=\"lightGridTexImgChunkCS\"\n"
600 " type=\"TextureImageChunkPtr\"\n"
601 " cardinality=\"single\"\n"
602 " visibility=\"internal\"\n"
603 " defaultValue=\"NULL\"\n"
604 " access=\"public\"\n"
605 " >\n"
606 " The write only texture image chunk that is used in the light culling compute shader.\n"
607 " </Field>\n"
608 "\n"
609 " <Field\n"
610 " name=\"lightGridTexImgChunkFS\"\n"
611 " type=\"TextureImageChunkPtr\"\n"
612 " cardinality=\"single\"\n"
613 " visibility=\"internal\"\n"
614 " defaultValue=\"NULL\"\n"
615 " access=\"public\"\n"
616 " >\n"
617 " The read only texture image chunk that is used in the fragment shader.\n"
618 " </Field>\n"
619 "\n"
620 " <Field\n"
621 " name=\"frustumPlanesNormals\"\n"
622 " type=\"Matrix\"\n"
623 " cardinality=\"multi\"\n"
624 " visibility=\"internal\"\n"
625 " access=\"public\"\n"
626 " >\n"
627 " The four tile frustum planes normal vectors.\n"
628 " </Field>\n"
629 "\n"
630 " <Field\n"
631 " name=\"frustumPlanesDistances\"\n"
632 " type=\"Vec4f\"\n"
633 " cardinality=\"multi\"\n"
634 " visibility=\"internal\"\n"
635 " access=\"public\"\n"
636 " >\n"
637 " The four tile frustum planes distances from the origin.\n"
638 " </Field>\n"
639 "\n"
640 " <Field\n"
641 " name=\"left\"\n"
642 " type=\"Int32\"\n"
643 " cardinality=\"single\"\n"
644 " visibility=\"internal\"\n"
645 " defaultValue=\"0\"\n"
646 " access=\"public\"\n"
647 " >\n"
648 " </Field>\n"
649 "\n"
650 " <Field\n"
651 " name=\"bottom\"\n"
652 " type=\"Int32\"\n"
653 " cardinality=\"single\"\n"
654 " visibility=\"internal\"\n"
655 " defaultValue=\"0\"\n"
656 " access=\"public\"\n"
657 " >\n"
658 " </Field>\n"
659 "\n"
660 " <Field\n"
661 " name=\"width\"\n"
662 " type=\"Int32\"\n"
663 " cardinality=\"single\"\n"
664 " visibility=\"internal\"\n"
665 " defaultValue=\"0\"\n"
666 " access=\"public\"\n"
667 " >\n"
668 " </Field>\n"
669 "\n"
670 " <Field\n"
671 " name=\"height\"\n"
672 " type=\"Int32\"\n"
673 " cardinality=\"single\"\n"
674 " visibility=\"internal\"\n"
675 " defaultValue=\"0\"\n"
676 " access=\"public\"\n"
677 " >\n"
678 " </Field>\n"
679 "\n"
680 " <Field\n"
681 " name=\"isOrthographicCamera\"\n"
682 " type=\"bool\"\n"
683 " cardinality=\"single\"\n"
684 " visibility=\"internal\"\n"
685 " defaultValue=\"false\"\n"
686 " access=\"public\"\n"
687 " >\n"
688 " This flag tracks whether we have an orthographic or perspective camera setup.\n"
689 " </Field>\n"
690 "\n"
691 " </FieldContainer>\n",
692 "View dependent Data used by the ClusterShadingStage.\n"
695 /*------------------------------ get -----------------------------------*/
697 FieldContainerType &ClusterShadingStageDataBase::getType(void)
699 return _type;
702 const FieldContainerType &ClusterShadingStageDataBase::getType(void) const
704 return _type;
707 UInt32 ClusterShadingStageDataBase::getContainerSize(void) const
709 return sizeof(ClusterShadingStageData);
712 /*------------------------- decorator get ------------------------------*/
715 //! Get the ClusterShadingStageData::_sfFrustDispDatUBOChunk field.
716 const SFUnrecUniformBufferObjStd140ChunkPtr *ClusterShadingStageDataBase::getSFFrustDispDatUBOChunk(void) const
718 return &_sfFrustDispDatUBOChunk;
721 SFUnrecUniformBufferObjStd140ChunkPtr *ClusterShadingStageDataBase::editSFFrustDispDatUBOChunk(void)
723 editSField(FrustDispDatUBOChunkFieldMask);
725 return &_sfFrustDispDatUBOChunk;
728 //! Get the value of the ClusterShadingStageData::_sfFrustDispDatUBOChunk field.
729 UniformBufferObjStd140Chunk * ClusterShadingStageDataBase::getFrustDispDatUBOChunk(void) const
731 return _sfFrustDispDatUBOChunk.getValue();
734 //! Set the value of the ClusterShadingStageData::_sfFrustDispDatUBOChunk field.
735 void ClusterShadingStageDataBase::setFrustDispDatUBOChunk(UniformBufferObjStd140Chunk * const value)
737 editSField(FrustDispDatUBOChunkFieldMask);
739 _sfFrustDispDatUBOChunk.setValue(value);
743 //! Get the ClusterShadingStageData::_sfCullDispDatUBOChunk field.
744 const SFUnrecUniformBufferObjStd140ChunkPtr *ClusterShadingStageDataBase::getSFCullDispDatUBOChunk(void) const
746 return &_sfCullDispDatUBOChunk;
749 SFUnrecUniformBufferObjStd140ChunkPtr *ClusterShadingStageDataBase::editSFCullDispDatUBOChunk(void)
751 editSField(CullDispDatUBOChunkFieldMask);
753 return &_sfCullDispDatUBOChunk;
756 //! Get the value of the ClusterShadingStageData::_sfCullDispDatUBOChunk field.
757 UniformBufferObjStd140Chunk * ClusterShadingStageDataBase::getCullDispDatUBOChunk(void) const
759 return _sfCullDispDatUBOChunk.getValue();
762 //! Set the value of the ClusterShadingStageData::_sfCullDispDatUBOChunk field.
763 void ClusterShadingStageDataBase::setCullDispDatUBOChunk(UniformBufferObjStd140Chunk * const value)
765 editSField(CullDispDatUBOChunkFieldMask);
767 _sfCullDispDatUBOChunk.setValue(value);
771 //! Get the ClusterShadingStageData::_sfCullClusterDatUBOChunk field.
772 const SFUnrecUniformBufferObjStd140ChunkPtr *ClusterShadingStageDataBase::getSFCullClusterDatUBOChunk(void) const
774 return &_sfCullClusterDatUBOChunk;
777 SFUnrecUniformBufferObjStd140ChunkPtr *ClusterShadingStageDataBase::editSFCullClusterDatUBOChunk(void)
779 editSField(CullClusterDatUBOChunkFieldMask);
781 return &_sfCullClusterDatUBOChunk;
784 //! Get the value of the ClusterShadingStageData::_sfCullClusterDatUBOChunk field.
785 UniformBufferObjStd140Chunk * ClusterShadingStageDataBase::getCullClusterDatUBOChunk(void) const
787 return _sfCullClusterDatUBOChunk.getValue();
790 //! Set the value of the ClusterShadingStageData::_sfCullClusterDatUBOChunk field.
791 void ClusterShadingStageDataBase::setCullClusterDatUBOChunk(UniformBufferObjStd140Chunk * const value)
793 editSField(CullClusterDatUBOChunkFieldMask);
795 _sfCullClusterDatUBOChunk.setValue(value);
799 //! Get the ClusterShadingStageData::_sfCullLightIndexCounterSSBOChunk field.
800 const SFUnrecShaderStorageBufferObjStdLayoutChunkPtr *ClusterShadingStageDataBase::getSFCullLightIndexCounterSSBOChunk(void) const
802 return &_sfCullLightIndexCounterSSBOChunk;
805 SFUnrecShaderStorageBufferObjStdLayoutChunkPtr *ClusterShadingStageDataBase::editSFCullLightIndexCounterSSBOChunk(void)
807 editSField(CullLightIndexCounterSSBOChunkFieldMask);
809 return &_sfCullLightIndexCounterSSBOChunk;
812 //! Get the value of the ClusterShadingStageData::_sfCullLightIndexCounterSSBOChunk field.
813 ShaderStorageBufferObjStdLayoutChunk * ClusterShadingStageDataBase::getCullLightIndexCounterSSBOChunk(void) const
815 return _sfCullLightIndexCounterSSBOChunk.getValue();
818 //! Set the value of the ClusterShadingStageData::_sfCullLightIndexCounterSSBOChunk field.
819 void ClusterShadingStageDataBase::setCullLightIndexCounterSSBOChunk(ShaderStorageBufferObjStdLayoutChunk * const value)
821 editSField(CullLightIndexCounterSSBOChunkFieldMask);
823 _sfCullLightIndexCounterSSBOChunk.setValue(value);
827 //! Get the ClusterShadingStageData::_sfFrustumsSSBOChunk field.
828 const SFUnrecShaderStorageBufferObjStdLayoutChunkPtr *ClusterShadingStageDataBase::getSFFrustumsSSBOChunk(void) const
830 return &_sfFrustumsSSBOChunk;
833 SFUnrecShaderStorageBufferObjStdLayoutChunkPtr *ClusterShadingStageDataBase::editSFFrustumsSSBOChunk(void)
835 editSField(FrustumsSSBOChunkFieldMask);
837 return &_sfFrustumsSSBOChunk;
840 //! Get the value of the ClusterShadingStageData::_sfFrustumsSSBOChunk field.
841 ShaderStorageBufferObjStdLayoutChunk * ClusterShadingStageDataBase::getFrustumsSSBOChunk(void) const
843 return _sfFrustumsSSBOChunk.getValue();
846 //! Set the value of the ClusterShadingStageData::_sfFrustumsSSBOChunk field.
847 void ClusterShadingStageDataBase::setFrustumsSSBOChunk(ShaderStorageBufferObjStdLayoutChunk * const value)
849 editSField(FrustumsSSBOChunkFieldMask);
851 _sfFrustumsSSBOChunk.setValue(value);
855 //! Get the ClusterShadingStageData::_sfAffectedLightIndexListSSBOChunk field.
856 const SFUnrecShaderStorageBufferObjStdLayoutChunkPtr *ClusterShadingStageDataBase::getSFAffectedLightIndexListSSBOChunk(void) const
858 return &_sfAffectedLightIndexListSSBOChunk;
861 SFUnrecShaderStorageBufferObjStdLayoutChunkPtr *ClusterShadingStageDataBase::editSFAffectedLightIndexListSSBOChunk(void)
863 editSField(AffectedLightIndexListSSBOChunkFieldMask);
865 return &_sfAffectedLightIndexListSSBOChunk;
868 //! Get the value of the ClusterShadingStageData::_sfAffectedLightIndexListSSBOChunk field.
869 ShaderStorageBufferObjStdLayoutChunk * ClusterShadingStageDataBase::getAffectedLightIndexListSSBOChunk(void) const
871 return _sfAffectedLightIndexListSSBOChunk.getValue();
874 //! Set the value of the ClusterShadingStageData::_sfAffectedLightIndexListSSBOChunk field.
875 void ClusterShadingStageDataBase::setAffectedLightIndexListSSBOChunk(ShaderStorageBufferObjStdLayoutChunk * const value)
877 editSField(AffectedLightIndexListSSBOChunkFieldMask);
879 _sfAffectedLightIndexListSSBOChunk.setValue(value);
883 //! Get the ClusterShadingStageData::_sfLightIndexListSSBOChunk field.
884 const SFUnrecShaderStorageBufferObjStdLayoutChunkPtr *ClusterShadingStageDataBase::getSFLightIndexListSSBOChunk(void) const
886 return &_sfLightIndexListSSBOChunk;
889 SFUnrecShaderStorageBufferObjStdLayoutChunkPtr *ClusterShadingStageDataBase::editSFLightIndexListSSBOChunk(void)
891 editSField(LightIndexListSSBOChunkFieldMask);
893 return &_sfLightIndexListSSBOChunk;
896 //! Get the value of the ClusterShadingStageData::_sfLightIndexListSSBOChunk field.
897 ShaderStorageBufferObjStdLayoutChunk * ClusterShadingStageDataBase::getLightIndexListSSBOChunk(void) const
899 return _sfLightIndexListSSBOChunk.getValue();
902 //! Set the value of the ClusterShadingStageData::_sfLightIndexListSSBOChunk field.
903 void ClusterShadingStageDataBase::setLightIndexListSSBOChunk(ShaderStorageBufferObjStdLayoutChunk * const value)
905 editSField(LightIndexListSSBOChunkFieldMask);
907 _sfLightIndexListSSBOChunk.setValue(value);
911 //! Get the ClusterShadingStageData::_sfFrustChunkMat field.
912 const SFUnrecChunkMaterialPtr *ClusterShadingStageDataBase::getSFFrustChunkMat(void) const
914 return &_sfFrustChunkMat;
917 SFUnrecChunkMaterialPtr *ClusterShadingStageDataBase::editSFFrustChunkMat (void)
919 editSField(FrustChunkMatFieldMask);
921 return &_sfFrustChunkMat;
924 //! Get the value of the ClusterShadingStageData::_sfFrustChunkMat field.
925 ChunkMaterial * ClusterShadingStageDataBase::getFrustChunkMat(void) const
927 return _sfFrustChunkMat.getValue();
930 //! Set the value of the ClusterShadingStageData::_sfFrustChunkMat field.
931 void ClusterShadingStageDataBase::setFrustChunkMat(ChunkMaterial * const value)
933 editSField(FrustChunkMatFieldMask);
935 _sfFrustChunkMat.setValue(value);
939 //! Get the ClusterShadingStageData::_sfCullChunkMat field.
940 const SFUnrecChunkMaterialPtr *ClusterShadingStageDataBase::getSFCullChunkMat(void) const
942 return &_sfCullChunkMat;
945 SFUnrecChunkMaterialPtr *ClusterShadingStageDataBase::editSFCullChunkMat (void)
947 editSField(CullChunkMatFieldMask);
949 return &_sfCullChunkMat;
952 //! Get the value of the ClusterShadingStageData::_sfCullChunkMat field.
953 ChunkMaterial * ClusterShadingStageDataBase::getCullChunkMat(void) const
955 return _sfCullChunkMat.getValue();
958 //! Set the value of the ClusterShadingStageData::_sfCullChunkMat field.
959 void ClusterShadingStageDataBase::setCullChunkMat(ChunkMaterial * const value)
961 editSField(CullChunkMatFieldMask);
963 _sfCullChunkMat.setValue(value);
967 //! Get the ClusterShadingStageData::_sfLightGridImage field.
968 const SFUnrecImagePtr *ClusterShadingStageDataBase::getSFLightGridImage(void) const
970 return &_sfLightGridImage;
973 SFUnrecImagePtr *ClusterShadingStageDataBase::editSFLightGridImage (void)
975 editSField(LightGridImageFieldMask);
977 return &_sfLightGridImage;
980 //! Get the value of the ClusterShadingStageData::_sfLightGridImage field.
981 Image * ClusterShadingStageDataBase::getLightGridImage(void) const
983 return _sfLightGridImage.getValue();
986 //! Set the value of the ClusterShadingStageData::_sfLightGridImage field.
987 void ClusterShadingStageDataBase::setLightGridImage(Image * const value)
989 editSField(LightGridImageFieldMask);
991 _sfLightGridImage.setValue(value);
995 //! Get the ClusterShadingStageData::_sfLightGridTexObjChunk field.
996 const SFUnrecTextureObjChunkPtr *ClusterShadingStageDataBase::getSFLightGridTexObjChunk(void) const
998 return &_sfLightGridTexObjChunk;
1001 SFUnrecTextureObjChunkPtr *ClusterShadingStageDataBase::editSFLightGridTexObjChunk(void)
1003 editSField(LightGridTexObjChunkFieldMask);
1005 return &_sfLightGridTexObjChunk;
1008 //! Get the value of the ClusterShadingStageData::_sfLightGridTexObjChunk field.
1009 TextureObjChunk * ClusterShadingStageDataBase::getLightGridTexObjChunk(void) const
1011 return _sfLightGridTexObjChunk.getValue();
1014 //! Set the value of the ClusterShadingStageData::_sfLightGridTexObjChunk field.
1015 void ClusterShadingStageDataBase::setLightGridTexObjChunk(TextureObjChunk * const value)
1017 editSField(LightGridTexObjChunkFieldMask);
1019 _sfLightGridTexObjChunk.setValue(value);
1023 //! Get the ClusterShadingStageData::_sfLightGridTexImgChunkCS field.
1024 const SFUnrecTextureImageChunkPtr *ClusterShadingStageDataBase::getSFLightGridTexImgChunkCS(void) const
1026 return &_sfLightGridTexImgChunkCS;
1029 SFUnrecTextureImageChunkPtr *ClusterShadingStageDataBase::editSFLightGridTexImgChunkCS(void)
1031 editSField(LightGridTexImgChunkCSFieldMask);
1033 return &_sfLightGridTexImgChunkCS;
1036 //! Get the value of the ClusterShadingStageData::_sfLightGridTexImgChunkCS field.
1037 TextureImageChunk * ClusterShadingStageDataBase::getLightGridTexImgChunkCS(void) const
1039 return _sfLightGridTexImgChunkCS.getValue();
1042 //! Set the value of the ClusterShadingStageData::_sfLightGridTexImgChunkCS field.
1043 void ClusterShadingStageDataBase::setLightGridTexImgChunkCS(TextureImageChunk * const value)
1045 editSField(LightGridTexImgChunkCSFieldMask);
1047 _sfLightGridTexImgChunkCS.setValue(value);
1051 //! Get the ClusterShadingStageData::_sfLightGridTexImgChunkFS field.
1052 const SFUnrecTextureImageChunkPtr *ClusterShadingStageDataBase::getSFLightGridTexImgChunkFS(void) const
1054 return &_sfLightGridTexImgChunkFS;
1057 SFUnrecTextureImageChunkPtr *ClusterShadingStageDataBase::editSFLightGridTexImgChunkFS(void)
1059 editSField(LightGridTexImgChunkFSFieldMask);
1061 return &_sfLightGridTexImgChunkFS;
1064 //! Get the value of the ClusterShadingStageData::_sfLightGridTexImgChunkFS field.
1065 TextureImageChunk * ClusterShadingStageDataBase::getLightGridTexImgChunkFS(void) const
1067 return _sfLightGridTexImgChunkFS.getValue();
1070 //! Set the value of the ClusterShadingStageData::_sfLightGridTexImgChunkFS field.
1071 void ClusterShadingStageDataBase::setLightGridTexImgChunkFS(TextureImageChunk * const value)
1073 editSField(LightGridTexImgChunkFSFieldMask);
1075 _sfLightGridTexImgChunkFS.setValue(value);
1079 MFMatrix *ClusterShadingStageDataBase::editMFFrustumPlanesNormals(void)
1081 editMField(FrustumPlanesNormalsFieldMask, _mfFrustumPlanesNormals);
1083 return &_mfFrustumPlanesNormals;
1086 const MFMatrix *ClusterShadingStageDataBase::getMFFrustumPlanesNormals(void) const
1088 return &_mfFrustumPlanesNormals;
1092 MFVec4f *ClusterShadingStageDataBase::editMFFrustumPlanesDistances(void)
1094 editMField(FrustumPlanesDistancesFieldMask, _mfFrustumPlanesDistances);
1096 return &_mfFrustumPlanesDistances;
1099 const MFVec4f *ClusterShadingStageDataBase::getMFFrustumPlanesDistances(void) const
1101 return &_mfFrustumPlanesDistances;
1105 SFInt32 *ClusterShadingStageDataBase::editSFLeft(void)
1107 editSField(LeftFieldMask);
1109 return &_sfLeft;
1112 const SFInt32 *ClusterShadingStageDataBase::getSFLeft(void) const
1114 return &_sfLeft;
1118 SFInt32 *ClusterShadingStageDataBase::editSFBottom(void)
1120 editSField(BottomFieldMask);
1122 return &_sfBottom;
1125 const SFInt32 *ClusterShadingStageDataBase::getSFBottom(void) const
1127 return &_sfBottom;
1131 SFInt32 *ClusterShadingStageDataBase::editSFWidth(void)
1133 editSField(WidthFieldMask);
1135 return &_sfWidth;
1138 const SFInt32 *ClusterShadingStageDataBase::getSFWidth(void) const
1140 return &_sfWidth;
1144 SFInt32 *ClusterShadingStageDataBase::editSFHeight(void)
1146 editSField(HeightFieldMask);
1148 return &_sfHeight;
1151 const SFInt32 *ClusterShadingStageDataBase::getSFHeight(void) const
1153 return &_sfHeight;
1157 SFBool *ClusterShadingStageDataBase::editSFIsOrthographicCamera(void)
1159 editSField(IsOrthographicCameraFieldMask);
1161 return &_sfIsOrthographicCamera;
1164 const SFBool *ClusterShadingStageDataBase::getSFIsOrthographicCamera(void) const
1166 return &_sfIsOrthographicCamera;
1174 /*------------------------------ access -----------------------------------*/
1176 SizeT ClusterShadingStageDataBase::getBinSize(ConstFieldMaskArg whichField)
1178 SizeT returnValue = Inherited::getBinSize(whichField);
1180 if(FieldBits::NoField != (FrustDispDatUBOChunkFieldMask & whichField))
1182 returnValue += _sfFrustDispDatUBOChunk.getBinSize();
1184 if(FieldBits::NoField != (CullDispDatUBOChunkFieldMask & whichField))
1186 returnValue += _sfCullDispDatUBOChunk.getBinSize();
1188 if(FieldBits::NoField != (CullClusterDatUBOChunkFieldMask & whichField))
1190 returnValue += _sfCullClusterDatUBOChunk.getBinSize();
1192 if(FieldBits::NoField != (CullLightIndexCounterSSBOChunkFieldMask & whichField))
1194 returnValue += _sfCullLightIndexCounterSSBOChunk.getBinSize();
1196 if(FieldBits::NoField != (FrustumsSSBOChunkFieldMask & whichField))
1198 returnValue += _sfFrustumsSSBOChunk.getBinSize();
1200 if(FieldBits::NoField != (AffectedLightIndexListSSBOChunkFieldMask & whichField))
1202 returnValue += _sfAffectedLightIndexListSSBOChunk.getBinSize();
1204 if(FieldBits::NoField != (LightIndexListSSBOChunkFieldMask & whichField))
1206 returnValue += _sfLightIndexListSSBOChunk.getBinSize();
1208 if(FieldBits::NoField != (FrustChunkMatFieldMask & whichField))
1210 returnValue += _sfFrustChunkMat.getBinSize();
1212 if(FieldBits::NoField != (CullChunkMatFieldMask & whichField))
1214 returnValue += _sfCullChunkMat.getBinSize();
1216 if(FieldBits::NoField != (LightGridImageFieldMask & whichField))
1218 returnValue += _sfLightGridImage.getBinSize();
1220 if(FieldBits::NoField != (LightGridTexObjChunkFieldMask & whichField))
1222 returnValue += _sfLightGridTexObjChunk.getBinSize();
1224 if(FieldBits::NoField != (LightGridTexImgChunkCSFieldMask & whichField))
1226 returnValue += _sfLightGridTexImgChunkCS.getBinSize();
1228 if(FieldBits::NoField != (LightGridTexImgChunkFSFieldMask & whichField))
1230 returnValue += _sfLightGridTexImgChunkFS.getBinSize();
1232 if(FieldBits::NoField != (FrustumPlanesNormalsFieldMask & whichField))
1234 returnValue += _mfFrustumPlanesNormals.getBinSize();
1236 if(FieldBits::NoField != (FrustumPlanesDistancesFieldMask & whichField))
1238 returnValue += _mfFrustumPlanesDistances.getBinSize();
1240 if(FieldBits::NoField != (LeftFieldMask & whichField))
1242 returnValue += _sfLeft.getBinSize();
1244 if(FieldBits::NoField != (BottomFieldMask & whichField))
1246 returnValue += _sfBottom.getBinSize();
1248 if(FieldBits::NoField != (WidthFieldMask & whichField))
1250 returnValue += _sfWidth.getBinSize();
1252 if(FieldBits::NoField != (HeightFieldMask & whichField))
1254 returnValue += _sfHeight.getBinSize();
1256 if(FieldBits::NoField != (IsOrthographicCameraFieldMask & whichField))
1258 returnValue += _sfIsOrthographicCamera.getBinSize();
1261 return returnValue;
1264 void ClusterShadingStageDataBase::copyToBin(BinaryDataHandler &pMem,
1265 ConstFieldMaskArg whichField)
1267 Inherited::copyToBin(pMem, whichField);
1269 if(FieldBits::NoField != (FrustDispDatUBOChunkFieldMask & whichField))
1271 _sfFrustDispDatUBOChunk.copyToBin(pMem);
1273 if(FieldBits::NoField != (CullDispDatUBOChunkFieldMask & whichField))
1275 _sfCullDispDatUBOChunk.copyToBin(pMem);
1277 if(FieldBits::NoField != (CullClusterDatUBOChunkFieldMask & whichField))
1279 _sfCullClusterDatUBOChunk.copyToBin(pMem);
1281 if(FieldBits::NoField != (CullLightIndexCounterSSBOChunkFieldMask & whichField))
1283 _sfCullLightIndexCounterSSBOChunk.copyToBin(pMem);
1285 if(FieldBits::NoField != (FrustumsSSBOChunkFieldMask & whichField))
1287 _sfFrustumsSSBOChunk.copyToBin(pMem);
1289 if(FieldBits::NoField != (AffectedLightIndexListSSBOChunkFieldMask & whichField))
1291 _sfAffectedLightIndexListSSBOChunk.copyToBin(pMem);
1293 if(FieldBits::NoField != (LightIndexListSSBOChunkFieldMask & whichField))
1295 _sfLightIndexListSSBOChunk.copyToBin(pMem);
1297 if(FieldBits::NoField != (FrustChunkMatFieldMask & whichField))
1299 _sfFrustChunkMat.copyToBin(pMem);
1301 if(FieldBits::NoField != (CullChunkMatFieldMask & whichField))
1303 _sfCullChunkMat.copyToBin(pMem);
1305 if(FieldBits::NoField != (LightGridImageFieldMask & whichField))
1307 _sfLightGridImage.copyToBin(pMem);
1309 if(FieldBits::NoField != (LightGridTexObjChunkFieldMask & whichField))
1311 _sfLightGridTexObjChunk.copyToBin(pMem);
1313 if(FieldBits::NoField != (LightGridTexImgChunkCSFieldMask & whichField))
1315 _sfLightGridTexImgChunkCS.copyToBin(pMem);
1317 if(FieldBits::NoField != (LightGridTexImgChunkFSFieldMask & whichField))
1319 _sfLightGridTexImgChunkFS.copyToBin(pMem);
1321 if(FieldBits::NoField != (FrustumPlanesNormalsFieldMask & whichField))
1323 _mfFrustumPlanesNormals.copyToBin(pMem);
1325 if(FieldBits::NoField != (FrustumPlanesDistancesFieldMask & whichField))
1327 _mfFrustumPlanesDistances.copyToBin(pMem);
1329 if(FieldBits::NoField != (LeftFieldMask & whichField))
1331 _sfLeft.copyToBin(pMem);
1333 if(FieldBits::NoField != (BottomFieldMask & whichField))
1335 _sfBottom.copyToBin(pMem);
1337 if(FieldBits::NoField != (WidthFieldMask & whichField))
1339 _sfWidth.copyToBin(pMem);
1341 if(FieldBits::NoField != (HeightFieldMask & whichField))
1343 _sfHeight.copyToBin(pMem);
1345 if(FieldBits::NoField != (IsOrthographicCameraFieldMask & whichField))
1347 _sfIsOrthographicCamera.copyToBin(pMem);
1351 void ClusterShadingStageDataBase::copyFromBin(BinaryDataHandler &pMem,
1352 ConstFieldMaskArg whichField)
1354 Inherited::copyFromBin(pMem, whichField);
1356 if(FieldBits::NoField != (FrustDispDatUBOChunkFieldMask & whichField))
1358 editSField(FrustDispDatUBOChunkFieldMask);
1359 _sfFrustDispDatUBOChunk.copyFromBin(pMem);
1361 if(FieldBits::NoField != (CullDispDatUBOChunkFieldMask & whichField))
1363 editSField(CullDispDatUBOChunkFieldMask);
1364 _sfCullDispDatUBOChunk.copyFromBin(pMem);
1366 if(FieldBits::NoField != (CullClusterDatUBOChunkFieldMask & whichField))
1368 editSField(CullClusterDatUBOChunkFieldMask);
1369 _sfCullClusterDatUBOChunk.copyFromBin(pMem);
1371 if(FieldBits::NoField != (CullLightIndexCounterSSBOChunkFieldMask & whichField))
1373 editSField(CullLightIndexCounterSSBOChunkFieldMask);
1374 _sfCullLightIndexCounterSSBOChunk.copyFromBin(pMem);
1376 if(FieldBits::NoField != (FrustumsSSBOChunkFieldMask & whichField))
1378 editSField(FrustumsSSBOChunkFieldMask);
1379 _sfFrustumsSSBOChunk.copyFromBin(pMem);
1381 if(FieldBits::NoField != (AffectedLightIndexListSSBOChunkFieldMask & whichField))
1383 editSField(AffectedLightIndexListSSBOChunkFieldMask);
1384 _sfAffectedLightIndexListSSBOChunk.copyFromBin(pMem);
1386 if(FieldBits::NoField != (LightIndexListSSBOChunkFieldMask & whichField))
1388 editSField(LightIndexListSSBOChunkFieldMask);
1389 _sfLightIndexListSSBOChunk.copyFromBin(pMem);
1391 if(FieldBits::NoField != (FrustChunkMatFieldMask & whichField))
1393 editSField(FrustChunkMatFieldMask);
1394 _sfFrustChunkMat.copyFromBin(pMem);
1396 if(FieldBits::NoField != (CullChunkMatFieldMask & whichField))
1398 editSField(CullChunkMatFieldMask);
1399 _sfCullChunkMat.copyFromBin(pMem);
1401 if(FieldBits::NoField != (LightGridImageFieldMask & whichField))
1403 editSField(LightGridImageFieldMask);
1404 _sfLightGridImage.copyFromBin(pMem);
1406 if(FieldBits::NoField != (LightGridTexObjChunkFieldMask & whichField))
1408 editSField(LightGridTexObjChunkFieldMask);
1409 _sfLightGridTexObjChunk.copyFromBin(pMem);
1411 if(FieldBits::NoField != (LightGridTexImgChunkCSFieldMask & whichField))
1413 editSField(LightGridTexImgChunkCSFieldMask);
1414 _sfLightGridTexImgChunkCS.copyFromBin(pMem);
1416 if(FieldBits::NoField != (LightGridTexImgChunkFSFieldMask & whichField))
1418 editSField(LightGridTexImgChunkFSFieldMask);
1419 _sfLightGridTexImgChunkFS.copyFromBin(pMem);
1421 if(FieldBits::NoField != (FrustumPlanesNormalsFieldMask & whichField))
1423 editMField(FrustumPlanesNormalsFieldMask, _mfFrustumPlanesNormals);
1424 _mfFrustumPlanesNormals.copyFromBin(pMem);
1426 if(FieldBits::NoField != (FrustumPlanesDistancesFieldMask & whichField))
1428 editMField(FrustumPlanesDistancesFieldMask, _mfFrustumPlanesDistances);
1429 _mfFrustumPlanesDistances.copyFromBin(pMem);
1431 if(FieldBits::NoField != (LeftFieldMask & whichField))
1433 editSField(LeftFieldMask);
1434 _sfLeft.copyFromBin(pMem);
1436 if(FieldBits::NoField != (BottomFieldMask & whichField))
1438 editSField(BottomFieldMask);
1439 _sfBottom.copyFromBin(pMem);
1441 if(FieldBits::NoField != (WidthFieldMask & whichField))
1443 editSField(WidthFieldMask);
1444 _sfWidth.copyFromBin(pMem);
1446 if(FieldBits::NoField != (HeightFieldMask & whichField))
1448 editSField(HeightFieldMask);
1449 _sfHeight.copyFromBin(pMem);
1451 if(FieldBits::NoField != (IsOrthographicCameraFieldMask & whichField))
1453 editSField(IsOrthographicCameraFieldMask);
1454 _sfIsOrthographicCamera.copyFromBin(pMem);
1458 //! create a new instance of the class
1459 ClusterShadingStageDataTransitPtr ClusterShadingStageDataBase::createLocal(BitVector bFlags)
1461 ClusterShadingStageDataTransitPtr fc;
1463 if(getClassType().getPrototype() != NULL)
1465 FieldContainerTransitPtr tmpPtr =
1466 getClassType().getPrototype()-> shallowCopyLocal(bFlags);
1468 fc = dynamic_pointer_cast<ClusterShadingStageData>(tmpPtr);
1471 return fc;
1474 //! create a new instance of the class, copy the container flags
1475 ClusterShadingStageDataTransitPtr ClusterShadingStageDataBase::createDependent(BitVector bFlags)
1477 ClusterShadingStageDataTransitPtr fc;
1479 if(getClassType().getPrototype() != NULL)
1481 FieldContainerTransitPtr tmpPtr =
1482 getClassType().getPrototype()-> shallowCopyDependent(bFlags);
1484 fc = dynamic_pointer_cast<ClusterShadingStageData>(tmpPtr);
1487 return fc;
1490 //! create a new instance of the class
1491 ClusterShadingStageDataTransitPtr ClusterShadingStageDataBase::create(void)
1493 ClusterShadingStageDataTransitPtr fc;
1495 if(getClassType().getPrototype() != NULL)
1497 FieldContainerTransitPtr tmpPtr =
1498 getClassType().getPrototype()-> shallowCopy();
1500 fc = dynamic_pointer_cast<ClusterShadingStageData>(tmpPtr);
1503 return fc;
1506 ClusterShadingStageData *ClusterShadingStageDataBase::createEmptyLocal(BitVector bFlags)
1508 ClusterShadingStageData *returnValue;
1510 newPtr<ClusterShadingStageData>(returnValue, bFlags);
1512 returnValue->_pFieldFlags->_bNamespaceMask &= ~bFlags;
1514 return returnValue;
1517 //! create an empty new instance of the class, do not copy the prototype
1518 ClusterShadingStageData *ClusterShadingStageDataBase::createEmpty(void)
1520 ClusterShadingStageData *returnValue;
1522 newPtr<ClusterShadingStageData>(returnValue, Thread::getCurrentLocalFlags());
1524 returnValue->_pFieldFlags->_bNamespaceMask &=
1525 ~Thread::getCurrentLocalFlags();
1527 return returnValue;
1531 FieldContainerTransitPtr ClusterShadingStageDataBase::shallowCopyLocal(
1532 BitVector bFlags) const
1534 ClusterShadingStageData *tmpPtr;
1536 newPtr(tmpPtr, dynamic_cast<const ClusterShadingStageData *>(this), bFlags);
1538 FieldContainerTransitPtr returnValue(tmpPtr);
1540 tmpPtr->_pFieldFlags->_bNamespaceMask &= ~bFlags;
1542 return returnValue;
1545 FieldContainerTransitPtr ClusterShadingStageDataBase::shallowCopyDependent(
1546 BitVector bFlags) const
1548 ClusterShadingStageData *tmpPtr;
1550 newPtr(tmpPtr, dynamic_cast<const ClusterShadingStageData *>(this), ~bFlags);
1552 FieldContainerTransitPtr returnValue(tmpPtr);
1554 tmpPtr->_pFieldFlags->_bNamespaceMask = bFlags;
1556 return returnValue;
1559 FieldContainerTransitPtr ClusterShadingStageDataBase::shallowCopy(void) const
1561 ClusterShadingStageData *tmpPtr;
1563 newPtr(tmpPtr,
1564 dynamic_cast<const ClusterShadingStageData *>(this),
1565 Thread::getCurrentLocalFlags());
1567 tmpPtr->_pFieldFlags->_bNamespaceMask &= ~Thread::getCurrentLocalFlags();
1569 FieldContainerTransitPtr returnValue(tmpPtr);
1571 return returnValue;
1577 /*------------------------- constructors ----------------------------------*/
1579 ClusterShadingStageDataBase::ClusterShadingStageDataBase(void) :
1580 Inherited(),
1581 _sfFrustDispDatUBOChunk (NULL),
1582 _sfCullDispDatUBOChunk (NULL),
1583 _sfCullClusterDatUBOChunk (NULL),
1584 _sfCullLightIndexCounterSSBOChunk(NULL),
1585 _sfFrustumsSSBOChunk (NULL),
1586 _sfAffectedLightIndexListSSBOChunk(NULL),
1587 _sfLightIndexListSSBOChunk(NULL),
1588 _sfFrustChunkMat (NULL),
1589 _sfCullChunkMat (NULL),
1590 _sfLightGridImage (NULL),
1591 _sfLightGridTexObjChunk (NULL),
1592 _sfLightGridTexImgChunkCS (NULL),
1593 _sfLightGridTexImgChunkFS (NULL),
1594 _mfFrustumPlanesNormals (),
1595 _mfFrustumPlanesDistances (),
1596 _sfLeft (Int32(0)),
1597 _sfBottom (Int32(0)),
1598 _sfWidth (Int32(0)),
1599 _sfHeight (Int32(0)),
1600 _sfIsOrthographicCamera (bool(false))
1604 ClusterShadingStageDataBase::ClusterShadingStageDataBase(const ClusterShadingStageDataBase &source) :
1605 Inherited(source),
1606 _sfFrustDispDatUBOChunk (NULL),
1607 _sfCullDispDatUBOChunk (NULL),
1608 _sfCullClusterDatUBOChunk (NULL),
1609 _sfCullLightIndexCounterSSBOChunk(NULL),
1610 _sfFrustumsSSBOChunk (NULL),
1611 _sfAffectedLightIndexListSSBOChunk(NULL),
1612 _sfLightIndexListSSBOChunk(NULL),
1613 _sfFrustChunkMat (NULL),
1614 _sfCullChunkMat (NULL),
1615 _sfLightGridImage (NULL),
1616 _sfLightGridTexObjChunk (NULL),
1617 _sfLightGridTexImgChunkCS (NULL),
1618 _sfLightGridTexImgChunkFS (NULL),
1619 _mfFrustumPlanesNormals (source._mfFrustumPlanesNormals ),
1620 _mfFrustumPlanesDistances (source._mfFrustumPlanesDistances ),
1621 _sfLeft (source._sfLeft ),
1622 _sfBottom (source._sfBottom ),
1623 _sfWidth (source._sfWidth ),
1624 _sfHeight (source._sfHeight ),
1625 _sfIsOrthographicCamera (source._sfIsOrthographicCamera )
1630 /*-------------------------- destructors ----------------------------------*/
1632 ClusterShadingStageDataBase::~ClusterShadingStageDataBase(void)
1636 void ClusterShadingStageDataBase::onCreate(const ClusterShadingStageData *source)
1638 Inherited::onCreate(source);
1640 if(source != NULL)
1642 ClusterShadingStageData *pThis = static_cast<ClusterShadingStageData *>(this);
1644 pThis->setFrustDispDatUBOChunk(source->getFrustDispDatUBOChunk());
1646 pThis->setCullDispDatUBOChunk(source->getCullDispDatUBOChunk());
1648 pThis->setCullClusterDatUBOChunk(source->getCullClusterDatUBOChunk());
1650 pThis->setCullLightIndexCounterSSBOChunk(source->getCullLightIndexCounterSSBOChunk());
1652 pThis->setFrustumsSSBOChunk(source->getFrustumsSSBOChunk());
1654 pThis->setAffectedLightIndexListSSBOChunk(source->getAffectedLightIndexListSSBOChunk());
1656 pThis->setLightIndexListSSBOChunk(source->getLightIndexListSSBOChunk());
1658 pThis->setFrustChunkMat(source->getFrustChunkMat());
1660 pThis->setCullChunkMat(source->getCullChunkMat());
1662 pThis->setLightGridImage(source->getLightGridImage());
1664 pThis->setLightGridTexObjChunk(source->getLightGridTexObjChunk());
1666 pThis->setLightGridTexImgChunkCS(source->getLightGridTexImgChunkCS());
1668 pThis->setLightGridTexImgChunkFS(source->getLightGridTexImgChunkFS());
1672 GetFieldHandlePtr ClusterShadingStageDataBase::getHandleFrustDispDatUBOChunk (void) const
1674 SFUnrecUniformBufferObjStd140ChunkPtr::GetHandlePtr returnValue(
1675 new SFUnrecUniformBufferObjStd140ChunkPtr::GetHandle(
1676 &_sfFrustDispDatUBOChunk,
1677 this->getType().getFieldDesc(FrustDispDatUBOChunkFieldId),
1678 const_cast<ClusterShadingStageDataBase *>(this)));
1680 return returnValue;
1683 EditFieldHandlePtr ClusterShadingStageDataBase::editHandleFrustDispDatUBOChunk(void)
1685 SFUnrecUniformBufferObjStd140ChunkPtr::EditHandlePtr returnValue(
1686 new SFUnrecUniformBufferObjStd140ChunkPtr::EditHandle(
1687 &_sfFrustDispDatUBOChunk,
1688 this->getType().getFieldDesc(FrustDispDatUBOChunkFieldId),
1689 this));
1691 returnValue->setSetMethod(
1692 boost::bind(&ClusterShadingStageData::setFrustDispDatUBOChunk,
1693 static_cast<ClusterShadingStageData *>(this), _1));
1695 editSField(FrustDispDatUBOChunkFieldMask);
1697 return returnValue;
1700 GetFieldHandlePtr ClusterShadingStageDataBase::getHandleCullDispDatUBOChunk (void) const
1702 SFUnrecUniformBufferObjStd140ChunkPtr::GetHandlePtr returnValue(
1703 new SFUnrecUniformBufferObjStd140ChunkPtr::GetHandle(
1704 &_sfCullDispDatUBOChunk,
1705 this->getType().getFieldDesc(CullDispDatUBOChunkFieldId),
1706 const_cast<ClusterShadingStageDataBase *>(this)));
1708 return returnValue;
1711 EditFieldHandlePtr ClusterShadingStageDataBase::editHandleCullDispDatUBOChunk(void)
1713 SFUnrecUniformBufferObjStd140ChunkPtr::EditHandlePtr returnValue(
1714 new SFUnrecUniformBufferObjStd140ChunkPtr::EditHandle(
1715 &_sfCullDispDatUBOChunk,
1716 this->getType().getFieldDesc(CullDispDatUBOChunkFieldId),
1717 this));
1719 returnValue->setSetMethod(
1720 boost::bind(&ClusterShadingStageData::setCullDispDatUBOChunk,
1721 static_cast<ClusterShadingStageData *>(this), _1));
1723 editSField(CullDispDatUBOChunkFieldMask);
1725 return returnValue;
1728 GetFieldHandlePtr ClusterShadingStageDataBase::getHandleCullClusterDatUBOChunk (void) const
1730 SFUnrecUniformBufferObjStd140ChunkPtr::GetHandlePtr returnValue(
1731 new SFUnrecUniformBufferObjStd140ChunkPtr::GetHandle(
1732 &_sfCullClusterDatUBOChunk,
1733 this->getType().getFieldDesc(CullClusterDatUBOChunkFieldId),
1734 const_cast<ClusterShadingStageDataBase *>(this)));
1736 return returnValue;
1739 EditFieldHandlePtr ClusterShadingStageDataBase::editHandleCullClusterDatUBOChunk(void)
1741 SFUnrecUniformBufferObjStd140ChunkPtr::EditHandlePtr returnValue(
1742 new SFUnrecUniformBufferObjStd140ChunkPtr::EditHandle(
1743 &_sfCullClusterDatUBOChunk,
1744 this->getType().getFieldDesc(CullClusterDatUBOChunkFieldId),
1745 this));
1747 returnValue->setSetMethod(
1748 boost::bind(&ClusterShadingStageData::setCullClusterDatUBOChunk,
1749 static_cast<ClusterShadingStageData *>(this), _1));
1751 editSField(CullClusterDatUBOChunkFieldMask);
1753 return returnValue;
1756 GetFieldHandlePtr ClusterShadingStageDataBase::getHandleCullLightIndexCounterSSBOChunk (void) const
1758 SFUnrecShaderStorageBufferObjStdLayoutChunkPtr::GetHandlePtr returnValue(
1759 new SFUnrecShaderStorageBufferObjStdLayoutChunkPtr::GetHandle(
1760 &_sfCullLightIndexCounterSSBOChunk,
1761 this->getType().getFieldDesc(CullLightIndexCounterSSBOChunkFieldId),
1762 const_cast<ClusterShadingStageDataBase *>(this)));
1764 return returnValue;
1767 EditFieldHandlePtr ClusterShadingStageDataBase::editHandleCullLightIndexCounterSSBOChunk(void)
1769 SFUnrecShaderStorageBufferObjStdLayoutChunkPtr::EditHandlePtr returnValue(
1770 new SFUnrecShaderStorageBufferObjStdLayoutChunkPtr::EditHandle(
1771 &_sfCullLightIndexCounterSSBOChunk,
1772 this->getType().getFieldDesc(CullLightIndexCounterSSBOChunkFieldId),
1773 this));
1775 returnValue->setSetMethod(
1776 boost::bind(&ClusterShadingStageData::setCullLightIndexCounterSSBOChunk,
1777 static_cast<ClusterShadingStageData *>(this), _1));
1779 editSField(CullLightIndexCounterSSBOChunkFieldMask);
1781 return returnValue;
1784 GetFieldHandlePtr ClusterShadingStageDataBase::getHandleFrustumsSSBOChunk (void) const
1786 SFUnrecShaderStorageBufferObjStdLayoutChunkPtr::GetHandlePtr returnValue(
1787 new SFUnrecShaderStorageBufferObjStdLayoutChunkPtr::GetHandle(
1788 &_sfFrustumsSSBOChunk,
1789 this->getType().getFieldDesc(FrustumsSSBOChunkFieldId),
1790 const_cast<ClusterShadingStageDataBase *>(this)));
1792 return returnValue;
1795 EditFieldHandlePtr ClusterShadingStageDataBase::editHandleFrustumsSSBOChunk(void)
1797 SFUnrecShaderStorageBufferObjStdLayoutChunkPtr::EditHandlePtr returnValue(
1798 new SFUnrecShaderStorageBufferObjStdLayoutChunkPtr::EditHandle(
1799 &_sfFrustumsSSBOChunk,
1800 this->getType().getFieldDesc(FrustumsSSBOChunkFieldId),
1801 this));
1803 returnValue->setSetMethod(
1804 boost::bind(&ClusterShadingStageData::setFrustumsSSBOChunk,
1805 static_cast<ClusterShadingStageData *>(this), _1));
1807 editSField(FrustumsSSBOChunkFieldMask);
1809 return returnValue;
1812 GetFieldHandlePtr ClusterShadingStageDataBase::getHandleAffectedLightIndexListSSBOChunk (void) const
1814 SFUnrecShaderStorageBufferObjStdLayoutChunkPtr::GetHandlePtr returnValue(
1815 new SFUnrecShaderStorageBufferObjStdLayoutChunkPtr::GetHandle(
1816 &_sfAffectedLightIndexListSSBOChunk,
1817 this->getType().getFieldDesc(AffectedLightIndexListSSBOChunkFieldId),
1818 const_cast<ClusterShadingStageDataBase *>(this)));
1820 return returnValue;
1823 EditFieldHandlePtr ClusterShadingStageDataBase::editHandleAffectedLightIndexListSSBOChunk(void)
1825 SFUnrecShaderStorageBufferObjStdLayoutChunkPtr::EditHandlePtr returnValue(
1826 new SFUnrecShaderStorageBufferObjStdLayoutChunkPtr::EditHandle(
1827 &_sfAffectedLightIndexListSSBOChunk,
1828 this->getType().getFieldDesc(AffectedLightIndexListSSBOChunkFieldId),
1829 this));
1831 returnValue->setSetMethod(
1832 boost::bind(&ClusterShadingStageData::setAffectedLightIndexListSSBOChunk,
1833 static_cast<ClusterShadingStageData *>(this), _1));
1835 editSField(AffectedLightIndexListSSBOChunkFieldMask);
1837 return returnValue;
1840 GetFieldHandlePtr ClusterShadingStageDataBase::getHandleLightIndexListSSBOChunk (void) const
1842 SFUnrecShaderStorageBufferObjStdLayoutChunkPtr::GetHandlePtr returnValue(
1843 new SFUnrecShaderStorageBufferObjStdLayoutChunkPtr::GetHandle(
1844 &_sfLightIndexListSSBOChunk,
1845 this->getType().getFieldDesc(LightIndexListSSBOChunkFieldId),
1846 const_cast<ClusterShadingStageDataBase *>(this)));
1848 return returnValue;
1851 EditFieldHandlePtr ClusterShadingStageDataBase::editHandleLightIndexListSSBOChunk(void)
1853 SFUnrecShaderStorageBufferObjStdLayoutChunkPtr::EditHandlePtr returnValue(
1854 new SFUnrecShaderStorageBufferObjStdLayoutChunkPtr::EditHandle(
1855 &_sfLightIndexListSSBOChunk,
1856 this->getType().getFieldDesc(LightIndexListSSBOChunkFieldId),
1857 this));
1859 returnValue->setSetMethod(
1860 boost::bind(&ClusterShadingStageData::setLightIndexListSSBOChunk,
1861 static_cast<ClusterShadingStageData *>(this), _1));
1863 editSField(LightIndexListSSBOChunkFieldMask);
1865 return returnValue;
1868 GetFieldHandlePtr ClusterShadingStageDataBase::getHandleFrustChunkMat (void) const
1870 SFUnrecChunkMaterialPtr::GetHandlePtr returnValue(
1871 new SFUnrecChunkMaterialPtr::GetHandle(
1872 &_sfFrustChunkMat,
1873 this->getType().getFieldDesc(FrustChunkMatFieldId),
1874 const_cast<ClusterShadingStageDataBase *>(this)));
1876 return returnValue;
1879 EditFieldHandlePtr ClusterShadingStageDataBase::editHandleFrustChunkMat (void)
1881 SFUnrecChunkMaterialPtr::EditHandlePtr returnValue(
1882 new SFUnrecChunkMaterialPtr::EditHandle(
1883 &_sfFrustChunkMat,
1884 this->getType().getFieldDesc(FrustChunkMatFieldId),
1885 this));
1887 returnValue->setSetMethod(
1888 boost::bind(&ClusterShadingStageData::setFrustChunkMat,
1889 static_cast<ClusterShadingStageData *>(this), _1));
1891 editSField(FrustChunkMatFieldMask);
1893 return returnValue;
1896 GetFieldHandlePtr ClusterShadingStageDataBase::getHandleCullChunkMat (void) const
1898 SFUnrecChunkMaterialPtr::GetHandlePtr returnValue(
1899 new SFUnrecChunkMaterialPtr::GetHandle(
1900 &_sfCullChunkMat,
1901 this->getType().getFieldDesc(CullChunkMatFieldId),
1902 const_cast<ClusterShadingStageDataBase *>(this)));
1904 return returnValue;
1907 EditFieldHandlePtr ClusterShadingStageDataBase::editHandleCullChunkMat (void)
1909 SFUnrecChunkMaterialPtr::EditHandlePtr returnValue(
1910 new SFUnrecChunkMaterialPtr::EditHandle(
1911 &_sfCullChunkMat,
1912 this->getType().getFieldDesc(CullChunkMatFieldId),
1913 this));
1915 returnValue->setSetMethod(
1916 boost::bind(&ClusterShadingStageData::setCullChunkMat,
1917 static_cast<ClusterShadingStageData *>(this), _1));
1919 editSField(CullChunkMatFieldMask);
1921 return returnValue;
1924 GetFieldHandlePtr ClusterShadingStageDataBase::getHandleLightGridImage (void) const
1926 SFUnrecImagePtr::GetHandlePtr returnValue(
1927 new SFUnrecImagePtr::GetHandle(
1928 &_sfLightGridImage,
1929 this->getType().getFieldDesc(LightGridImageFieldId),
1930 const_cast<ClusterShadingStageDataBase *>(this)));
1932 return returnValue;
1935 EditFieldHandlePtr ClusterShadingStageDataBase::editHandleLightGridImage (void)
1937 SFUnrecImagePtr::EditHandlePtr returnValue(
1938 new SFUnrecImagePtr::EditHandle(
1939 &_sfLightGridImage,
1940 this->getType().getFieldDesc(LightGridImageFieldId),
1941 this));
1943 returnValue->setSetMethod(
1944 boost::bind(&ClusterShadingStageData::setLightGridImage,
1945 static_cast<ClusterShadingStageData *>(this), _1));
1947 editSField(LightGridImageFieldMask);
1949 return returnValue;
1952 GetFieldHandlePtr ClusterShadingStageDataBase::getHandleLightGridTexObjChunk (void) const
1954 SFUnrecTextureObjChunkPtr::GetHandlePtr returnValue(
1955 new SFUnrecTextureObjChunkPtr::GetHandle(
1956 &_sfLightGridTexObjChunk,
1957 this->getType().getFieldDesc(LightGridTexObjChunkFieldId),
1958 const_cast<ClusterShadingStageDataBase *>(this)));
1960 return returnValue;
1963 EditFieldHandlePtr ClusterShadingStageDataBase::editHandleLightGridTexObjChunk(void)
1965 SFUnrecTextureObjChunkPtr::EditHandlePtr returnValue(
1966 new SFUnrecTextureObjChunkPtr::EditHandle(
1967 &_sfLightGridTexObjChunk,
1968 this->getType().getFieldDesc(LightGridTexObjChunkFieldId),
1969 this));
1971 returnValue->setSetMethod(
1972 boost::bind(&ClusterShadingStageData::setLightGridTexObjChunk,
1973 static_cast<ClusterShadingStageData *>(this), _1));
1975 editSField(LightGridTexObjChunkFieldMask);
1977 return returnValue;
1980 GetFieldHandlePtr ClusterShadingStageDataBase::getHandleLightGridTexImgChunkCS (void) const
1982 SFUnrecTextureImageChunkPtr::GetHandlePtr returnValue(
1983 new SFUnrecTextureImageChunkPtr::GetHandle(
1984 &_sfLightGridTexImgChunkCS,
1985 this->getType().getFieldDesc(LightGridTexImgChunkCSFieldId),
1986 const_cast<ClusterShadingStageDataBase *>(this)));
1988 return returnValue;
1991 EditFieldHandlePtr ClusterShadingStageDataBase::editHandleLightGridTexImgChunkCS(void)
1993 SFUnrecTextureImageChunkPtr::EditHandlePtr returnValue(
1994 new SFUnrecTextureImageChunkPtr::EditHandle(
1995 &_sfLightGridTexImgChunkCS,
1996 this->getType().getFieldDesc(LightGridTexImgChunkCSFieldId),
1997 this));
1999 returnValue->setSetMethod(
2000 boost::bind(&ClusterShadingStageData::setLightGridTexImgChunkCS,
2001 static_cast<ClusterShadingStageData *>(this), _1));
2003 editSField(LightGridTexImgChunkCSFieldMask);
2005 return returnValue;
2008 GetFieldHandlePtr ClusterShadingStageDataBase::getHandleLightGridTexImgChunkFS (void) const
2010 SFUnrecTextureImageChunkPtr::GetHandlePtr returnValue(
2011 new SFUnrecTextureImageChunkPtr::GetHandle(
2012 &_sfLightGridTexImgChunkFS,
2013 this->getType().getFieldDesc(LightGridTexImgChunkFSFieldId),
2014 const_cast<ClusterShadingStageDataBase *>(this)));
2016 return returnValue;
2019 EditFieldHandlePtr ClusterShadingStageDataBase::editHandleLightGridTexImgChunkFS(void)
2021 SFUnrecTextureImageChunkPtr::EditHandlePtr returnValue(
2022 new SFUnrecTextureImageChunkPtr::EditHandle(
2023 &_sfLightGridTexImgChunkFS,
2024 this->getType().getFieldDesc(LightGridTexImgChunkFSFieldId),
2025 this));
2027 returnValue->setSetMethod(
2028 boost::bind(&ClusterShadingStageData::setLightGridTexImgChunkFS,
2029 static_cast<ClusterShadingStageData *>(this), _1));
2031 editSField(LightGridTexImgChunkFSFieldMask);
2033 return returnValue;
2036 GetFieldHandlePtr ClusterShadingStageDataBase::getHandleFrustumPlanesNormals (void) const
2038 MFMatrix::GetHandlePtr returnValue(
2039 new MFMatrix::GetHandle(
2040 &_mfFrustumPlanesNormals,
2041 this->getType().getFieldDesc(FrustumPlanesNormalsFieldId),
2042 const_cast<ClusterShadingStageDataBase *>(this)));
2044 return returnValue;
2047 EditFieldHandlePtr ClusterShadingStageDataBase::editHandleFrustumPlanesNormals(void)
2049 MFMatrix::EditHandlePtr returnValue(
2050 new MFMatrix::EditHandle(
2051 &_mfFrustumPlanesNormals,
2052 this->getType().getFieldDesc(FrustumPlanesNormalsFieldId),
2053 this));
2056 editMField(FrustumPlanesNormalsFieldMask, _mfFrustumPlanesNormals);
2058 return returnValue;
2061 GetFieldHandlePtr ClusterShadingStageDataBase::getHandleFrustumPlanesDistances (void) const
2063 MFVec4f::GetHandlePtr returnValue(
2064 new MFVec4f::GetHandle(
2065 &_mfFrustumPlanesDistances,
2066 this->getType().getFieldDesc(FrustumPlanesDistancesFieldId),
2067 const_cast<ClusterShadingStageDataBase *>(this)));
2069 return returnValue;
2072 EditFieldHandlePtr ClusterShadingStageDataBase::editHandleFrustumPlanesDistances(void)
2074 MFVec4f::EditHandlePtr returnValue(
2075 new MFVec4f::EditHandle(
2076 &_mfFrustumPlanesDistances,
2077 this->getType().getFieldDesc(FrustumPlanesDistancesFieldId),
2078 this));
2081 editMField(FrustumPlanesDistancesFieldMask, _mfFrustumPlanesDistances);
2083 return returnValue;
2086 GetFieldHandlePtr ClusterShadingStageDataBase::getHandleLeft (void) const
2088 SFInt32::GetHandlePtr returnValue(
2089 new SFInt32::GetHandle(
2090 &_sfLeft,
2091 this->getType().getFieldDesc(LeftFieldId),
2092 const_cast<ClusterShadingStageDataBase *>(this)));
2094 return returnValue;
2097 EditFieldHandlePtr ClusterShadingStageDataBase::editHandleLeft (void)
2099 SFInt32::EditHandlePtr returnValue(
2100 new SFInt32::EditHandle(
2101 &_sfLeft,
2102 this->getType().getFieldDesc(LeftFieldId),
2103 this));
2106 editSField(LeftFieldMask);
2108 return returnValue;
2111 GetFieldHandlePtr ClusterShadingStageDataBase::getHandleBottom (void) const
2113 SFInt32::GetHandlePtr returnValue(
2114 new SFInt32::GetHandle(
2115 &_sfBottom,
2116 this->getType().getFieldDesc(BottomFieldId),
2117 const_cast<ClusterShadingStageDataBase *>(this)));
2119 return returnValue;
2122 EditFieldHandlePtr ClusterShadingStageDataBase::editHandleBottom (void)
2124 SFInt32::EditHandlePtr returnValue(
2125 new SFInt32::EditHandle(
2126 &_sfBottom,
2127 this->getType().getFieldDesc(BottomFieldId),
2128 this));
2131 editSField(BottomFieldMask);
2133 return returnValue;
2136 GetFieldHandlePtr ClusterShadingStageDataBase::getHandleWidth (void) const
2138 SFInt32::GetHandlePtr returnValue(
2139 new SFInt32::GetHandle(
2140 &_sfWidth,
2141 this->getType().getFieldDesc(WidthFieldId),
2142 const_cast<ClusterShadingStageDataBase *>(this)));
2144 return returnValue;
2147 EditFieldHandlePtr ClusterShadingStageDataBase::editHandleWidth (void)
2149 SFInt32::EditHandlePtr returnValue(
2150 new SFInt32::EditHandle(
2151 &_sfWidth,
2152 this->getType().getFieldDesc(WidthFieldId),
2153 this));
2156 editSField(WidthFieldMask);
2158 return returnValue;
2161 GetFieldHandlePtr ClusterShadingStageDataBase::getHandleHeight (void) const
2163 SFInt32::GetHandlePtr returnValue(
2164 new SFInt32::GetHandle(
2165 &_sfHeight,
2166 this->getType().getFieldDesc(HeightFieldId),
2167 const_cast<ClusterShadingStageDataBase *>(this)));
2169 return returnValue;
2172 EditFieldHandlePtr ClusterShadingStageDataBase::editHandleHeight (void)
2174 SFInt32::EditHandlePtr returnValue(
2175 new SFInt32::EditHandle(
2176 &_sfHeight,
2177 this->getType().getFieldDesc(HeightFieldId),
2178 this));
2181 editSField(HeightFieldMask);
2183 return returnValue;
2186 GetFieldHandlePtr ClusterShadingStageDataBase::getHandleIsOrthographicCamera (void) const
2188 SFBool::GetHandlePtr returnValue(
2189 new SFBool::GetHandle(
2190 &_sfIsOrthographicCamera,
2191 this->getType().getFieldDesc(IsOrthographicCameraFieldId),
2192 const_cast<ClusterShadingStageDataBase *>(this)));
2194 return returnValue;
2197 EditFieldHandlePtr ClusterShadingStageDataBase::editHandleIsOrthographicCamera(void)
2199 SFBool::EditHandlePtr returnValue(
2200 new SFBool::EditHandle(
2201 &_sfIsOrthographicCamera,
2202 this->getType().getFieldDesc(IsOrthographicCameraFieldId),
2203 this));
2206 editSField(IsOrthographicCameraFieldMask);
2208 return returnValue;
2212 #ifdef OSG_MT_CPTR_ASPECT
2213 void ClusterShadingStageDataBase::execSyncV( FieldContainer &oFrom,
2214 ConstFieldMaskArg whichField,
2215 AspectOffsetStore &oOffsets,
2216 ConstFieldMaskArg syncMode,
2217 const UInt32 uiSyncInfo)
2219 ClusterShadingStageData *pThis = static_cast<ClusterShadingStageData *>(this);
2221 pThis->execSync(static_cast<ClusterShadingStageData *>(&oFrom),
2222 whichField,
2223 oOffsets,
2224 syncMode,
2225 uiSyncInfo);
2227 #endif
2230 #ifdef OSG_MT_CPTR_ASPECT
2231 FieldContainer *ClusterShadingStageDataBase::createAspectCopy(
2232 const FieldContainer *pRefAspect) const
2234 ClusterShadingStageData *returnValue;
2236 newAspectCopy(returnValue,
2237 dynamic_cast<const ClusterShadingStageData *>(pRefAspect),
2238 dynamic_cast<const ClusterShadingStageData *>(this));
2240 return returnValue;
2242 #endif
2244 void ClusterShadingStageDataBase::resolveLinks(void)
2246 Inherited::resolveLinks();
2248 static_cast<ClusterShadingStageData *>(this)->setFrustDispDatUBOChunk(NULL);
2250 static_cast<ClusterShadingStageData *>(this)->setCullDispDatUBOChunk(NULL);
2252 static_cast<ClusterShadingStageData *>(this)->setCullClusterDatUBOChunk(NULL);
2254 static_cast<ClusterShadingStageData *>(this)->setCullLightIndexCounterSSBOChunk(NULL);
2256 static_cast<ClusterShadingStageData *>(this)->setFrustumsSSBOChunk(NULL);
2258 static_cast<ClusterShadingStageData *>(this)->setAffectedLightIndexListSSBOChunk(NULL);
2260 static_cast<ClusterShadingStageData *>(this)->setLightIndexListSSBOChunk(NULL);
2262 static_cast<ClusterShadingStageData *>(this)->setFrustChunkMat(NULL);
2264 static_cast<ClusterShadingStageData *>(this)->setCullChunkMat(NULL);
2266 static_cast<ClusterShadingStageData *>(this)->setLightGridImage(NULL);
2268 static_cast<ClusterShadingStageData *>(this)->setLightGridTexObjChunk(NULL);
2270 static_cast<ClusterShadingStageData *>(this)->setLightGridTexImgChunkCS(NULL);
2272 static_cast<ClusterShadingStageData *>(this)->setLightGridTexImgChunkFS(NULL);
2274 #ifdef OSG_MT_CPTR_ASPECT
2275 AspectOffsetStore oOffsets;
2277 _pAspectStore->fillOffsetArray(oOffsets, this);
2278 #endif
2280 #ifdef OSG_MT_CPTR_ASPECT
2281 _mfFrustumPlanesNormals.terminateShare(Thread::getCurrentAspect(),
2282 oOffsets);
2283 #endif
2284 #ifdef OSG_MT_CPTR_ASPECT
2285 _mfFrustumPlanesDistances.terminateShare(Thread::getCurrentAspect(),
2286 oOffsets);
2287 #endif
2291 OSG_END_NAMESPACE