changed: gcc8 base update
[opensg.git] / Source / System / Window / Base / OSGRenderOptionsBase.cpp
blob1d7be4d71d7018c7874b2b89dba48b8fccaf4f75
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 RenderOptions!
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"
64 #include "OSGGL.h" // PolygonMode default header
67 #include "OSGRenderOptionsBase.h"
68 #include "OSGRenderOptions.h"
70 #include <boost/bind.hpp>
72 OSG_BEGIN_NAMESPACE
74 /***************************************************************************\
75 * Description *
76 \***************************************************************************/
78 /*! \class OSG::RenderOptions
82 /***************************************************************************\
83 * Field Documentation *
84 \***************************************************************************/
86 /*! \var MaterialMapKey RenderOptionsBase::_sfRenderProperties
90 /*! \var bool RenderOptionsBase::_sfUseGLFinish
94 /*! \var bool RenderOptionsBase::_sfStatistic
98 /*! \var GLenum RenderOptionsBase::_sfPolygonMode
102 /*! \var bool RenderOptionsBase::_sfTwoSidedLighting
106 /*! \var bool RenderOptionsBase::_sfSpecTexLighting
110 /*! \var bool RenderOptionsBase::_sfSortTrans
114 /*! \var bool RenderOptionsBase::_sfZWriteTrans
118 /*! \var bool RenderOptionsBase::_sfLocalLights
122 /*! \var bool RenderOptionsBase::_sfCorrectTwoSidedLighting
126 /*! \var bool RenderOptionsBase::_sfOcclusionCulling
130 /*! \var Int32 RenderOptionsBase::_sfOcclusionCullingMode
131 OcclusionStopAndWait (1) or OcclusionMultiFrame (2)
134 /*! \var UInt32 RenderOptionsBase::_sfOcclusionCullingPixels
135 culls objects with this number of visible pixels default is zero.
138 /*! \var bool RenderOptionsBase::_sfAntialiasing
142 /*! \var Real32 RenderOptionsBase::_sfAntialiasingDistance
146 /*! \var Real32 RenderOptionsBase::_sfAntialiasingScale
150 /*! \var UInt32 RenderOptionsBase::_sfAntialiasingTrigger
154 /*! \var bool RenderOptionsBase::_sfFrustumCulling
158 /*! \var bool RenderOptionsBase::_sfBackfaceCulling
162 /*! \var bool RenderOptionsBase::_sfSmallFeatureCulling
166 /*! \var Real32 RenderOptionsBase::_sfSmallFeaturePixels
170 /*! \var UInt32 RenderOptionsBase::_sfSmallFeatureThreshold
174 /*! \var bool RenderOptionsBase::_sfFirstFrame
178 /*! \var bool RenderOptionsBase::_sfDepthOnlyPass
182 /*! \var Color4f RenderOptionsBase::_sfLightModelAmbient
186 /*! \var Color4f RenderOptionsBase::_sfFogColor
190 /*! \var Vec2f RenderOptionsBase::_sfFogRange
194 /*! \var Real32 RenderOptionsBase::_sfFogDensity
198 /*! \var Int32 RenderOptionsBase::_sfFogMode
202 /*! \var UInt32 RenderOptionsBase::_sfMultiSample
203 number of multi-sample-buffer used for FSAA
206 /*! \var UInt32 RenderOptionsBase::_sfMultiSampleFilterMode
207 defindes the filter-method for multi-sample buffer, must be GL_FALSE/0 (off), GL_DONT_CARE, GL_FASTEST or GL_NICEST
211 /***************************************************************************\
212 * FieldType/FieldTrait Instantiation *
213 \***************************************************************************/
215 #if !defined(OSG_DO_DOC) || defined(OSG_DOC_DEV)
216 PointerType FieldTraits<RenderOptions *, nsOSG>::_type(
217 "RenderOptionsPtr",
218 "AttachmentPtr",
219 RenderOptions::getClassType(),
220 nsOSG);
221 #endif
223 OSG_FIELDTRAITS_GETTYPE_NS(RenderOptions *, nsOSG)
225 OSG_EXPORT_PTR_SFIELD_FULL(PointerSField,
226 RenderOptions *,
227 nsOSG)
229 OSG_EXPORT_PTR_MFIELD_FULL(PointerMField,
230 RenderOptions *,
231 nsOSG)
233 /***************************************************************************\
234 * Field Description *
235 \***************************************************************************/
237 void RenderOptionsBase::classDescInserter(TypeObject &oType)
239 FieldDescriptionBase *pDesc = NULL;
242 pDesc = new SFMaterialMapKey::Description(
243 SFMaterialMapKey::getClassType(),
244 "renderProperties",
246 RenderPropertiesFieldId, RenderPropertiesFieldMask,
247 false,
248 (Field::SFDefaultFlags | Field::FStdAccess),
249 static_cast<FieldEditMethodSig>(&RenderOptions::editHandleRenderProperties),
250 static_cast<FieldGetMethodSig >(&RenderOptions::getHandleRenderProperties));
252 oType.addInitialDesc(pDesc);
254 pDesc = new SFBool::Description(
255 SFBool::getClassType(),
256 "useGLFinish",
258 UseGLFinishFieldId, UseGLFinishFieldMask,
259 false,
260 (Field::SFDefaultFlags | Field::FStdAccess),
261 static_cast<FieldEditMethodSig>(&RenderOptions::editHandleUseGLFinish),
262 static_cast<FieldGetMethodSig >(&RenderOptions::getHandleUseGLFinish));
264 oType.addInitialDesc(pDesc);
266 pDesc = new SFBool::Description(
267 SFBool::getClassType(),
268 "statistic",
270 StatisticFieldId, StatisticFieldMask,
271 false,
272 (Field::SFDefaultFlags | Field::FStdAccess),
273 static_cast<FieldEditMethodSig>(&RenderOptions::editHandleStatistic),
274 static_cast<FieldGetMethodSig >(&RenderOptions::getHandleStatistic));
276 oType.addInitialDesc(pDesc);
278 pDesc = new SFGLenum::Description(
279 SFGLenum::getClassType(),
280 "polygonMode",
282 PolygonModeFieldId, PolygonModeFieldMask,
283 false,
284 (Field::SFDefaultFlags | Field::FStdAccess),
285 static_cast<FieldEditMethodSig>(&RenderOptions::editHandlePolygonMode),
286 static_cast<FieldGetMethodSig >(&RenderOptions::getHandlePolygonMode));
288 oType.addInitialDesc(pDesc);
290 pDesc = new SFBool::Description(
291 SFBool::getClassType(),
292 "twoSidedLighting",
294 TwoSidedLightingFieldId, TwoSidedLightingFieldMask,
295 false,
296 (Field::SFDefaultFlags | Field::FStdAccess),
297 static_cast<FieldEditMethodSig>(&RenderOptions::editHandleTwoSidedLighting),
298 static_cast<FieldGetMethodSig >(&RenderOptions::getHandleTwoSidedLighting));
300 oType.addInitialDesc(pDesc);
302 pDesc = new SFBool::Description(
303 SFBool::getClassType(),
304 "specTexLighting",
306 SpecTexLightingFieldId, SpecTexLightingFieldMask,
307 false,
308 (Field::SFDefaultFlags | Field::FStdAccess),
309 static_cast<FieldEditMethodSig>(&RenderOptions::editHandleSpecTexLighting),
310 static_cast<FieldGetMethodSig >(&RenderOptions::getHandleSpecTexLighting));
312 oType.addInitialDesc(pDesc);
314 pDesc = new SFBool::Description(
315 SFBool::getClassType(),
316 "sortTrans",
318 SortTransFieldId, SortTransFieldMask,
319 false,
320 (Field::SFDefaultFlags | Field::FStdAccess),
321 static_cast<FieldEditMethodSig>(&RenderOptions::editHandleSortTrans),
322 static_cast<FieldGetMethodSig >(&RenderOptions::getHandleSortTrans));
324 oType.addInitialDesc(pDesc);
326 pDesc = new SFBool::Description(
327 SFBool::getClassType(),
328 "zWriteTrans",
330 ZWriteTransFieldId, ZWriteTransFieldMask,
331 false,
332 (Field::SFDefaultFlags | Field::FStdAccess),
333 static_cast<FieldEditMethodSig>(&RenderOptions::editHandleZWriteTrans),
334 static_cast<FieldGetMethodSig >(&RenderOptions::getHandleZWriteTrans));
336 oType.addInitialDesc(pDesc);
338 pDesc = new SFBool::Description(
339 SFBool::getClassType(),
340 "localLights",
342 LocalLightsFieldId, LocalLightsFieldMask,
343 false,
344 (Field::SFDefaultFlags | Field::FStdAccess),
345 static_cast<FieldEditMethodSig>(&RenderOptions::editHandleLocalLights),
346 static_cast<FieldGetMethodSig >(&RenderOptions::getHandleLocalLights));
348 oType.addInitialDesc(pDesc);
350 pDesc = new SFBool::Description(
351 SFBool::getClassType(),
352 "correctTwoSidedLighting",
354 CorrectTwoSidedLightingFieldId, CorrectTwoSidedLightingFieldMask,
355 false,
356 (Field::SFDefaultFlags | Field::FStdAccess),
357 static_cast<FieldEditMethodSig>(&RenderOptions::editHandleCorrectTwoSidedLighting),
358 static_cast<FieldGetMethodSig >(&RenderOptions::getHandleCorrectTwoSidedLighting));
360 oType.addInitialDesc(pDesc);
362 pDesc = new SFBool::Description(
363 SFBool::getClassType(),
364 "occlusionCulling",
366 OcclusionCullingFieldId, OcclusionCullingFieldMask,
367 false,
368 (Field::SFDefaultFlags | Field::FStdAccess),
369 static_cast<FieldEditMethodSig>(&RenderOptions::editHandleOcclusionCulling),
370 static_cast<FieldGetMethodSig >(&RenderOptions::getHandleOcclusionCulling));
372 oType.addInitialDesc(pDesc);
374 pDesc = new SFInt32::Description(
375 SFInt32::getClassType(),
376 "occlusionCullingMode",
377 "OcclusionStopAndWait (1) or OcclusionMultiFrame (2)\n",
378 OcclusionCullingModeFieldId, OcclusionCullingModeFieldMask,
379 false,
380 (Field::SFDefaultFlags | Field::FStdAccess),
381 static_cast<FieldEditMethodSig>(&RenderOptions::editHandleOcclusionCullingMode),
382 static_cast<FieldGetMethodSig >(&RenderOptions::getHandleOcclusionCullingMode));
384 oType.addInitialDesc(pDesc);
386 pDesc = new SFUInt32::Description(
387 SFUInt32::getClassType(),
388 "occlusionCullingPixels",
389 "culls objects with this number of visible pixels default is zero.\n",
390 OcclusionCullingPixelsFieldId, OcclusionCullingPixelsFieldMask,
391 false,
392 (Field::SFDefaultFlags | Field::FStdAccess),
393 static_cast<FieldEditMethodSig>(&RenderOptions::editHandleOcclusionCullingPixels),
394 static_cast<FieldGetMethodSig >(&RenderOptions::getHandleOcclusionCullingPixels));
396 oType.addInitialDesc(pDesc);
398 pDesc = new SFBool::Description(
399 SFBool::getClassType(),
400 "antialiasing",
402 AntialiasingFieldId, AntialiasingFieldMask,
403 false,
404 (Field::SFDefaultFlags | Field::FStdAccess),
405 static_cast<FieldEditMethodSig>(&RenderOptions::editHandleAntialiasing),
406 static_cast<FieldGetMethodSig >(&RenderOptions::getHandleAntialiasing));
408 oType.addInitialDesc(pDesc);
410 pDesc = new SFReal32::Description(
411 SFReal32::getClassType(),
412 "antialiasingDistance",
414 AntialiasingDistanceFieldId, AntialiasingDistanceFieldMask,
415 false,
416 (Field::SFDefaultFlags | Field::FStdAccess),
417 static_cast<FieldEditMethodSig>(&RenderOptions::editHandleAntialiasingDistance),
418 static_cast<FieldGetMethodSig >(&RenderOptions::getHandleAntialiasingDistance));
420 oType.addInitialDesc(pDesc);
422 pDesc = new SFReal32::Description(
423 SFReal32::getClassType(),
424 "antialiasingScale",
426 AntialiasingScaleFieldId, AntialiasingScaleFieldMask,
427 false,
428 (Field::SFDefaultFlags | Field::FStdAccess),
429 static_cast<FieldEditMethodSig>(&RenderOptions::editHandleAntialiasingScale),
430 static_cast<FieldGetMethodSig >(&RenderOptions::getHandleAntialiasingScale));
432 oType.addInitialDesc(pDesc);
434 pDesc = new SFUInt32::Description(
435 SFUInt32::getClassType(),
436 "antialiasingTrigger",
438 AntialiasingTriggerFieldId, AntialiasingTriggerFieldMask,
439 false,
440 (Field::SFDefaultFlags | Field::FStdAccess),
441 static_cast<FieldEditMethodSig>(&RenderOptions::editHandleAntialiasingTrigger),
442 static_cast<FieldGetMethodSig >(&RenderOptions::getHandleAntialiasingTrigger));
444 oType.addInitialDesc(pDesc);
446 pDesc = new SFBool::Description(
447 SFBool::getClassType(),
448 "frustumCulling",
450 FrustumCullingFieldId, FrustumCullingFieldMask,
451 false,
452 (Field::SFDefaultFlags | Field::FStdAccess),
453 static_cast<FieldEditMethodSig>(&RenderOptions::editHandleFrustumCulling),
454 static_cast<FieldGetMethodSig >(&RenderOptions::getHandleFrustumCulling));
456 oType.addInitialDesc(pDesc);
458 pDesc = new SFBool::Description(
459 SFBool::getClassType(),
460 "backfaceCulling",
462 BackfaceCullingFieldId, BackfaceCullingFieldMask,
463 false,
464 (Field::SFDefaultFlags | Field::FStdAccess),
465 static_cast<FieldEditMethodSig>(&RenderOptions::editHandleBackfaceCulling),
466 static_cast<FieldGetMethodSig >(&RenderOptions::getHandleBackfaceCulling));
468 oType.addInitialDesc(pDesc);
470 pDesc = new SFBool::Description(
471 SFBool::getClassType(),
472 "smallFeatureCulling",
474 SmallFeatureCullingFieldId, SmallFeatureCullingFieldMask,
475 false,
476 (Field::SFDefaultFlags | Field::FStdAccess),
477 static_cast<FieldEditMethodSig>(&RenderOptions::editHandleSmallFeatureCulling),
478 static_cast<FieldGetMethodSig >(&RenderOptions::getHandleSmallFeatureCulling));
480 oType.addInitialDesc(pDesc);
482 pDesc = new SFReal32::Description(
483 SFReal32::getClassType(),
484 "smallFeaturePixels",
486 SmallFeaturePixelsFieldId, SmallFeaturePixelsFieldMask,
487 false,
488 (Field::SFDefaultFlags | Field::FStdAccess),
489 static_cast<FieldEditMethodSig>(&RenderOptions::editHandleSmallFeaturePixels),
490 static_cast<FieldGetMethodSig >(&RenderOptions::getHandleSmallFeaturePixels));
492 oType.addInitialDesc(pDesc);
494 pDesc = new SFUInt32::Description(
495 SFUInt32::getClassType(),
496 "smallFeatureThreshold",
498 SmallFeatureThresholdFieldId, SmallFeatureThresholdFieldMask,
499 false,
500 (Field::SFDefaultFlags | Field::FStdAccess),
501 static_cast<FieldEditMethodSig>(&RenderOptions::editHandleSmallFeatureThreshold),
502 static_cast<FieldGetMethodSig >(&RenderOptions::getHandleSmallFeatureThreshold));
504 oType.addInitialDesc(pDesc);
506 pDesc = new SFBool::Description(
507 SFBool::getClassType(),
508 "firstFrame",
510 FirstFrameFieldId, FirstFrameFieldMask,
511 false,
512 (Field::SFDefaultFlags | Field::FStdAccess),
513 static_cast<FieldEditMethodSig>(&RenderOptions::editHandleFirstFrame),
514 static_cast<FieldGetMethodSig >(&RenderOptions::getHandleFirstFrame));
516 oType.addInitialDesc(pDesc);
518 pDesc = new SFBool::Description(
519 SFBool::getClassType(),
520 "depthOnlyPass",
522 DepthOnlyPassFieldId, DepthOnlyPassFieldMask,
523 false,
524 (Field::SFDefaultFlags | Field::FStdAccess),
525 static_cast<FieldEditMethodSig>(&RenderOptions::editHandleDepthOnlyPass),
526 static_cast<FieldGetMethodSig >(&RenderOptions::getHandleDepthOnlyPass));
528 oType.addInitialDesc(pDesc);
530 pDesc = new SFColor4f::Description(
531 SFColor4f::getClassType(),
532 "lightModelAmbient",
534 LightModelAmbientFieldId, LightModelAmbientFieldMask,
535 false,
536 (Field::SFDefaultFlags | Field::FStdAccess),
537 static_cast<FieldEditMethodSig>(&RenderOptions::editHandleLightModelAmbient),
538 static_cast<FieldGetMethodSig >(&RenderOptions::getHandleLightModelAmbient));
540 oType.addInitialDesc(pDesc);
542 pDesc = new SFColor4f::Description(
543 SFColor4f::getClassType(),
544 "fogColor",
546 FogColorFieldId, FogColorFieldMask,
547 false,
548 (Field::SFDefaultFlags | Field::FStdAccess),
549 static_cast<FieldEditMethodSig>(&RenderOptions::editHandleFogColor),
550 static_cast<FieldGetMethodSig >(&RenderOptions::getHandleFogColor));
552 oType.addInitialDesc(pDesc);
554 pDesc = new SFVec2f::Description(
555 SFVec2f::getClassType(),
556 "fogRange",
558 FogRangeFieldId, FogRangeFieldMask,
559 false,
560 (Field::SFDefaultFlags | Field::FStdAccess),
561 static_cast<FieldEditMethodSig>(&RenderOptions::editHandleFogRange),
562 static_cast<FieldGetMethodSig >(&RenderOptions::getHandleFogRange));
564 oType.addInitialDesc(pDesc);
566 pDesc = new SFReal32::Description(
567 SFReal32::getClassType(),
568 "fogDensity",
570 FogDensityFieldId, FogDensityFieldMask,
571 false,
572 (Field::SFDefaultFlags | Field::FStdAccess),
573 static_cast<FieldEditMethodSig>(&RenderOptions::editHandleFogDensity),
574 static_cast<FieldGetMethodSig >(&RenderOptions::getHandleFogDensity));
576 oType.addInitialDesc(pDesc);
578 pDesc = new SFInt32::Description(
579 SFInt32::getClassType(),
580 "fogMode",
582 FogModeFieldId, FogModeFieldMask,
583 false,
584 (Field::SFDefaultFlags | Field::FStdAccess),
585 static_cast<FieldEditMethodSig>(&RenderOptions::editHandleFogMode),
586 static_cast<FieldGetMethodSig >(&RenderOptions::getHandleFogMode));
588 oType.addInitialDesc(pDesc);
590 pDesc = new SFUInt32::Description(
591 SFUInt32::getClassType(),
592 "multiSample",
593 "number of multi-sample-buffer used for FSAA\n",
594 MultiSampleFieldId, MultiSampleFieldMask,
595 false,
596 (Field::SFDefaultFlags | Field::FStdAccess),
597 static_cast<FieldEditMethodSig>(&RenderOptions::editHandleMultiSample),
598 static_cast<FieldGetMethodSig >(&RenderOptions::getHandleMultiSample));
600 oType.addInitialDesc(pDesc);
602 pDesc = new SFUInt32::Description(
603 SFUInt32::getClassType(),
604 "multiSampleFilterMode",
605 "defindes the filter-method for multi-sample buffer, must be GL_FALSE/0 (off), GL_DONT_CARE, GL_FASTEST or GL_NICEST\n",
606 MultiSampleFilterModeFieldId, MultiSampleFilterModeFieldMask,
607 false,
608 (Field::SFDefaultFlags | Field::FStdAccess),
609 static_cast<FieldEditMethodSig>(&RenderOptions::editHandleMultiSampleFilterMode),
610 static_cast<FieldGetMethodSig >(&RenderOptions::getHandleMultiSampleFilterMode));
612 oType.addInitialDesc(pDesc);
616 RenderOptionsBase::TypeObject RenderOptionsBase::_type(
617 RenderOptionsBase::getClassname(),
618 Inherited::getClassname(),
619 "RenderOptions",
620 nsOSG, //Namespace
621 reinterpret_cast<PrototypeCreateF>(&RenderOptionsBase::createEmptyLocal),
622 reinterpret_cast<InitContainerF>(&RenderOptions::initMethod),
623 reinterpret_cast<ExitContainerF>(&RenderOptions::exitMethod),
624 reinterpret_cast<InitalInsertDescFunc>(
625 reinterpret_cast<void *>(&RenderOptions::classDescInserter)),
626 false,
628 "<?xml version=\"1.0\"?>\n"
629 "\n"
630 "<FieldContainer\n"
631 " name=\"RenderOptions\"\n"
632 " parent=\"Attachment\"\n"
633 " library=\"System\"\n"
634 " pointerfieldtypes=\"both\"\n"
635 " structure=\"concrete\"\n"
636 " systemcomponent=\"true\"\n"
637 " parentsystemcomponent=\"true\"\n"
638 "\tdecoratable=\"false\"\n"
639 " useLocalIncludes=\"false\"\n"
640 " docGroupBase=\"GrpSystemWindow\"\n"
641 " >\n"
642 "\n"
643 " <Field\n"
644 "\t name=\"renderProperties\"\n"
645 "\t type=\"MaterialMapKey\"\n"
646 "\t cardinality=\"single\"\n"
647 "\t visibility=\"external\"\n"
648 "\t defaultValue=\"0x0000\"\n"
649 "\t access=\"public\"\n"
650 " fieldHeader=\"OSGMaterialMapFields.h\"\n"
651 " typeHeader=\"OSGMaterialMapFields.h\"\n"
652 "\t >\n"
653 " </Field>\n"
654 " <Field\n"
655 "\t name=\"useGLFinish\"\n"
656 "\t type=\"bool\"\n"
657 "\t cardinality=\"single\"\n"
658 "\t visibility=\"external\"\n"
659 "\t defaultValue=\"false\"\n"
660 "\t access=\"public\"\n"
661 "\t >\n"
662 " </Field>\n"
663 " \n"
664 " <Field\n"
665 "\t name=\"statistic\"\n"
666 "\t type=\"bool\"\n"
667 "\t cardinality=\"single\"\n"
668 "\t visibility=\"external\"\n"
669 "\t defaultValue=\"false\"\n"
670 "\t access=\"public\"\n"
671 "\t >\n"
672 " </Field>\n"
673 " <Field\n"
674 "\t name=\"polygonMode\"\n"
675 "\t type=\"GLenum\"\n"
676 "\t cardinality=\"single\"\n"
677 "\t visibility=\"external\"\n"
678 "\t defaultValue=\"GL_FILL\"\n"
679 "\t defaultHeader=\"&quot;OSGGL.h&quot;\"\n"
680 "\t access=\"public\"\n"
681 "\t >\n"
682 " </Field>\n"
683 " <Field\n"
684 "\t name=\"twoSidedLighting\"\n"
685 "\t type=\"bool\"\n"
686 "\t cardinality=\"single\"\n"
687 "\t visibility=\"external\"\n"
688 "\t defaultValue=\"false\"\n"
689 "\t access=\"public\"\n"
690 "\t >\n"
691 " </Field>\n"
692 " <Field\n"
693 "\t name=\"specTexLighting\"\n"
694 "\t type=\"bool\"\n"
695 "\t cardinality=\"single\"\n"
696 "\t visibility=\"external\"\n"
697 "\t defaultValue=\"false\"\n"
698 "\t access=\"public\"\n"
699 "\t >\n"
700 " </Field>\n"
701 " <Field\n"
702 "\t name=\"sortTrans\"\n"
703 "\t type=\"bool\"\n"
704 "\t cardinality=\"single\"\n"
705 "\t visibility=\"external\"\n"
706 "\t defaultValue=\"true\"\n"
707 "\t access=\"public\"\n"
708 "\t >\n"
709 " </Field>\n"
710 " <Field\n"
711 "\t name=\"zWriteTrans\"\n"
712 "\t type=\"bool\"\n"
713 "\t cardinality=\"single\"\n"
714 "\t visibility=\"external\"\n"
715 "\t defaultValue=\"true\"\n"
716 "\t access=\"public\"\n"
717 "\t >\n"
718 " </Field>\n"
719 " <Field\n"
720 "\t name=\"localLights\"\n"
721 "\t type=\"bool\"\n"
722 "\t cardinality=\"single\"\n"
723 "\t visibility=\"external\"\n"
724 "\t defaultValue=\"true\"\n"
725 "\t access=\"public\"\n"
726 "\t >\n"
727 " </Field>\n"
728 " <Field\n"
729 "\t name=\"correctTwoSidedLighting\"\n"
730 "\t type=\"bool\"\n"
731 "\t cardinality=\"single\"\n"
732 "\t visibility=\"external\"\n"
733 "\t defaultValue=\"true\"\n"
734 "\t access=\"public\"\n"
735 "\t >\n"
736 " </Field>\n"
737 " <Field\n"
738 "\t name=\"occlusionCulling\"\n"
739 "\t type=\"bool\"\n"
740 "\t cardinality=\"single\"\n"
741 "\t visibility=\"external\"\n"
742 "\t defaultValue=\"false\"\n"
743 "\t access=\"public\"\n"
744 "\t >\n"
745 " </Field>\n"
746 " <Field\n"
747 "\t name=\"occlusionCullingMode\"\n"
748 "\t type=\"Int32\"\n"
749 "\t cardinality=\"single\"\n"
750 "\t visibility=\"external\"\n"
751 "\t defaultValue=\"1\"\n"
752 "\t access=\"public\"\n"
753 "\t >\n"
754 "\tOcclusionStopAndWait (1) or OcclusionMultiFrame (2)\n"
755 " </Field>\n"
756 " <Field\n"
757 "\t name=\"occlusionCullingPixels\"\n"
758 "\t type=\"UInt32\"\n"
759 "\t cardinality=\"single\"\n"
760 "\t visibility=\"external\"\n"
761 "\t defaultValue=\"0\"\n"
762 "\t access=\"public\"\n"
763 "\t >\n"
764 "\tculls objects with this number of visible pixels default is zero.\n"
765 " </Field>\n"
766 " <Field\n"
767 "\t name=\"antialiasing\"\n"
768 "\t type=\"bool\"\n"
769 "\t cardinality=\"single\"\n"
770 "\t visibility=\"external\"\n"
771 "\t defaultValue=\"false\"\n"
772 "\t access=\"public\"\n"
773 "\t >\n"
774 " </Field>\n"
775 " <Field\n"
776 "\t name=\"antialiasingDistance\"\n"
777 "\t type=\"Real32\"\n"
778 "\t cardinality=\"single\"\n"
779 "\t visibility=\"external\"\n"
780 "\t defaultValue=\"0.2\"\n"
781 "\t access=\"public\"\n"
782 "\t >\n"
783 " </Field>\n"
784 " <Field\n"
785 "\t name=\"antialiasingScale\"\n"
786 "\t type=\"Real32\"\n"
787 "\t cardinality=\"single\"\n"
788 "\t visibility=\"external\"\n"
789 "\t defaultValue=\"2.0\"\n"
790 "\t access=\"public\"\n"
791 "\t >\n"
792 " </Field>\n"
793 " <Field\n"
794 "\t name=\"antialiasingTrigger\"\n"
795 "\t type=\"UInt32\"\n"
796 "\t cardinality=\"single\"\n"
797 "\t visibility=\"external\"\n"
798 "\t defaultValue=\"0\"\n"
799 "\t access=\"public\"\n"
800 "\t >\n"
801 " </Field>\n"
802 " <Field\n"
803 "\t name=\"frustumCulling\"\n"
804 "\t type=\"bool\"\n"
805 "\t cardinality=\"single\"\n"
806 "\t visibility=\"external\"\n"
807 "\t defaultValue=\"false\"\n"
808 "\t access=\"public\"\n"
809 "\t >\n"
810 " </Field>\n"
811 " <Field\n"
812 "\t name=\"backfaceCulling\"\n"
813 "\t type=\"bool\"\n"
814 "\t cardinality=\"single\"\n"
815 "\t visibility=\"external\"\n"
816 "\t defaultValue=\"false\"\n"
817 "\t access=\"public\"\n"
818 "\t >\n"
819 " </Field>\n"
820 " <Field\n"
821 "\t name=\"smallFeatureCulling\"\n"
822 "\t type=\"bool\"\n"
823 "\t cardinality=\"single\"\n"
824 "\t visibility=\"external\"\n"
825 "\t access=\"public\"\n"
826 "\t >\n"
827 " </Field>\n"
828 " <Field\n"
829 "\t name=\"smallFeaturePixels\"\n"
830 "\t type=\"Real32\"\n"
831 "\t cardinality=\"single\"\n"
832 "\t visibility=\"external\"\n"
833 "\t access=\"public\"\n"
834 "\t >\n"
835 " </Field>\n"
836 " <Field\n"
837 "\t name=\"smallFeatureThreshold\"\n"
838 "\t type=\"UInt32\"\n"
839 "\t cardinality=\"single\"\n"
840 "\t visibility=\"external\"\n"
841 "\t access=\"public\"\n"
842 "\t >\n"
843 " </Field>\n"
844 " <Field\n"
845 "\t name=\"firstFrame\"\n"
846 "\t type=\"bool\"\n"
847 "\t cardinality=\"single\"\n"
848 "\t visibility=\"external\"\n"
849 "\t defaultValue=\"true\"\n"
850 "\t access=\"public\"\n"
851 "\t >\n"
852 " </Field>\n"
853 " <Field\n"
854 "\t name=\"depthOnlyPass\"\n"
855 "\t type=\"bool\"\n"
856 "\t cardinality=\"single\"\n"
857 "\t visibility=\"external\"\n"
858 "\t defaultValue=\"false\"\n"
859 "\t access=\"public\"\n"
860 "\t >\n"
861 " </Field>\n"
862 " <Field\n"
863 "\t name=\"lightModelAmbient\"\n"
864 "\t type=\"Color4f\"\n"
865 "\t cardinality=\"single\"\n"
866 "\t visibility=\"external\"\n"
867 "\t defaultValue=\"0.2f,0.2f,0.2f,1.0f\"\n"
868 "\t access=\"public\"\n"
869 "\t >\n"
870 " </Field>\n"
871 " <Field\n"
872 "\t name=\"fogColor\"\n"
873 "\t type=\"Color4f\"\n"
874 "\t cardinality=\"single\"\n"
875 "\t visibility=\"external\"\n"
876 "\t defaultValue=\"0,0,0,0\"\n"
877 "\t access=\"public\"\n"
878 "\t >\n"
879 " </Field>\n"
880 " <Field\n"
881 "\t name=\"fogRange\"\n"
882 "\t type=\"Vec2f\"\n"
883 "\t cardinality=\"single\"\n"
884 "\t visibility=\"external\"\n"
885 "\t defaultValue=\"0,1\"\n"
886 "\t access=\"public\"\n"
887 "\t >\n"
888 " </Field>\n"
889 " <Field\n"
890 "\t name=\"fogDensity\"\n"
891 "\t type=\"Real32\"\n"
892 "\t cardinality=\"single\"\n"
893 "\t visibility=\"external\"\n"
894 "\t defaultValue=\"1\"\n"
895 "\t access=\"public\"\n"
896 "\t >\n"
897 " </Field>\n"
898 " <Field\n"
899 "\t name=\"fogMode\"\n"
900 "\t type=\"Int32\"\n"
901 "\t cardinality=\"single\"\n"
902 "\t visibility=\"external\"\n"
903 "\t defaultValue=\"0\"\n"
904 "\t access=\"public\"\n"
905 "\t >\n"
906 " </Field>\n"
907 " <Field\n"
908 "\t name=\"multiSample\"\n"
909 "\t type=\"UInt32\"\n"
910 "\t cardinality=\"single\"\n"
911 "\t visibility=\"external\"\n"
912 "\t defaultValue=\"1\"\n"
913 "\t access=\"public\"\n"
914 "\t >\n"
915 "\tnumber of multi-sample-buffer used for FSAA\n"
916 " </Field>\n"
917 " <Field\n"
918 "\t name=\"multiSampleFilterMode\"\n"
919 "\t type=\"UInt32\"\n"
920 "\t cardinality=\"single\"\n"
921 "\t visibility=\"external\"\n"
922 "\t defaultValue=\"0\"\n"
923 "\t access=\"public\"\n"
924 "\t >\n"
925 "\tdefindes the filter-method for multi-sample buffer, must be GL_FALSE/0 (off), GL_DONT_CARE, GL_FASTEST or GL_NICEST\n"
926 " </Field>\n"
927 "</FieldContainer>\n",
931 /*------------------------------ get -----------------------------------*/
933 FieldContainerType &RenderOptionsBase::getType(void)
935 return _type;
938 const FieldContainerType &RenderOptionsBase::getType(void) const
940 return _type;
943 UInt32 RenderOptionsBase::getContainerSize(void) const
945 return sizeof(RenderOptions);
948 /*------------------------- decorator get ------------------------------*/
951 SFMaterialMapKey *RenderOptionsBase::editSFRenderProperties(void)
953 editSField(RenderPropertiesFieldMask);
955 return &_sfRenderProperties;
958 const SFMaterialMapKey *RenderOptionsBase::getSFRenderProperties(void) const
960 return &_sfRenderProperties;
964 SFBool *RenderOptionsBase::editSFUseGLFinish(void)
966 editSField(UseGLFinishFieldMask);
968 return &_sfUseGLFinish;
971 const SFBool *RenderOptionsBase::getSFUseGLFinish(void) const
973 return &_sfUseGLFinish;
977 SFBool *RenderOptionsBase::editSFStatistic(void)
979 editSField(StatisticFieldMask);
981 return &_sfStatistic;
984 const SFBool *RenderOptionsBase::getSFStatistic(void) const
986 return &_sfStatistic;
990 SFGLenum *RenderOptionsBase::editSFPolygonMode(void)
992 editSField(PolygonModeFieldMask);
994 return &_sfPolygonMode;
997 const SFGLenum *RenderOptionsBase::getSFPolygonMode(void) const
999 return &_sfPolygonMode;
1003 SFBool *RenderOptionsBase::editSFTwoSidedLighting(void)
1005 editSField(TwoSidedLightingFieldMask);
1007 return &_sfTwoSidedLighting;
1010 const SFBool *RenderOptionsBase::getSFTwoSidedLighting(void) const
1012 return &_sfTwoSidedLighting;
1016 SFBool *RenderOptionsBase::editSFSpecTexLighting(void)
1018 editSField(SpecTexLightingFieldMask);
1020 return &_sfSpecTexLighting;
1023 const SFBool *RenderOptionsBase::getSFSpecTexLighting(void) const
1025 return &_sfSpecTexLighting;
1029 SFBool *RenderOptionsBase::editSFSortTrans(void)
1031 editSField(SortTransFieldMask);
1033 return &_sfSortTrans;
1036 const SFBool *RenderOptionsBase::getSFSortTrans(void) const
1038 return &_sfSortTrans;
1042 SFBool *RenderOptionsBase::editSFZWriteTrans(void)
1044 editSField(ZWriteTransFieldMask);
1046 return &_sfZWriteTrans;
1049 const SFBool *RenderOptionsBase::getSFZWriteTrans(void) const
1051 return &_sfZWriteTrans;
1055 SFBool *RenderOptionsBase::editSFLocalLights(void)
1057 editSField(LocalLightsFieldMask);
1059 return &_sfLocalLights;
1062 const SFBool *RenderOptionsBase::getSFLocalLights(void) const
1064 return &_sfLocalLights;
1068 SFBool *RenderOptionsBase::editSFCorrectTwoSidedLighting(void)
1070 editSField(CorrectTwoSidedLightingFieldMask);
1072 return &_sfCorrectTwoSidedLighting;
1075 const SFBool *RenderOptionsBase::getSFCorrectTwoSidedLighting(void) const
1077 return &_sfCorrectTwoSidedLighting;
1081 SFBool *RenderOptionsBase::editSFOcclusionCulling(void)
1083 editSField(OcclusionCullingFieldMask);
1085 return &_sfOcclusionCulling;
1088 const SFBool *RenderOptionsBase::getSFOcclusionCulling(void) const
1090 return &_sfOcclusionCulling;
1094 SFInt32 *RenderOptionsBase::editSFOcclusionCullingMode(void)
1096 editSField(OcclusionCullingModeFieldMask);
1098 return &_sfOcclusionCullingMode;
1101 const SFInt32 *RenderOptionsBase::getSFOcclusionCullingMode(void) const
1103 return &_sfOcclusionCullingMode;
1107 SFUInt32 *RenderOptionsBase::editSFOcclusionCullingPixels(void)
1109 editSField(OcclusionCullingPixelsFieldMask);
1111 return &_sfOcclusionCullingPixels;
1114 const SFUInt32 *RenderOptionsBase::getSFOcclusionCullingPixels(void) const
1116 return &_sfOcclusionCullingPixels;
1120 SFBool *RenderOptionsBase::editSFAntialiasing(void)
1122 editSField(AntialiasingFieldMask);
1124 return &_sfAntialiasing;
1127 const SFBool *RenderOptionsBase::getSFAntialiasing(void) const
1129 return &_sfAntialiasing;
1133 SFReal32 *RenderOptionsBase::editSFAntialiasingDistance(void)
1135 editSField(AntialiasingDistanceFieldMask);
1137 return &_sfAntialiasingDistance;
1140 const SFReal32 *RenderOptionsBase::getSFAntialiasingDistance(void) const
1142 return &_sfAntialiasingDistance;
1146 SFReal32 *RenderOptionsBase::editSFAntialiasingScale(void)
1148 editSField(AntialiasingScaleFieldMask);
1150 return &_sfAntialiasingScale;
1153 const SFReal32 *RenderOptionsBase::getSFAntialiasingScale(void) const
1155 return &_sfAntialiasingScale;
1159 SFUInt32 *RenderOptionsBase::editSFAntialiasingTrigger(void)
1161 editSField(AntialiasingTriggerFieldMask);
1163 return &_sfAntialiasingTrigger;
1166 const SFUInt32 *RenderOptionsBase::getSFAntialiasingTrigger(void) const
1168 return &_sfAntialiasingTrigger;
1172 SFBool *RenderOptionsBase::editSFFrustumCulling(void)
1174 editSField(FrustumCullingFieldMask);
1176 return &_sfFrustumCulling;
1179 const SFBool *RenderOptionsBase::getSFFrustumCulling(void) const
1181 return &_sfFrustumCulling;
1185 SFBool *RenderOptionsBase::editSFBackfaceCulling(void)
1187 editSField(BackfaceCullingFieldMask);
1189 return &_sfBackfaceCulling;
1192 const SFBool *RenderOptionsBase::getSFBackfaceCulling(void) const
1194 return &_sfBackfaceCulling;
1198 SFBool *RenderOptionsBase::editSFSmallFeatureCulling(void)
1200 editSField(SmallFeatureCullingFieldMask);
1202 return &_sfSmallFeatureCulling;
1205 const SFBool *RenderOptionsBase::getSFSmallFeatureCulling(void) const
1207 return &_sfSmallFeatureCulling;
1211 SFReal32 *RenderOptionsBase::editSFSmallFeaturePixels(void)
1213 editSField(SmallFeaturePixelsFieldMask);
1215 return &_sfSmallFeaturePixels;
1218 const SFReal32 *RenderOptionsBase::getSFSmallFeaturePixels(void) const
1220 return &_sfSmallFeaturePixels;
1224 SFUInt32 *RenderOptionsBase::editSFSmallFeatureThreshold(void)
1226 editSField(SmallFeatureThresholdFieldMask);
1228 return &_sfSmallFeatureThreshold;
1231 const SFUInt32 *RenderOptionsBase::getSFSmallFeatureThreshold(void) const
1233 return &_sfSmallFeatureThreshold;
1237 SFBool *RenderOptionsBase::editSFFirstFrame(void)
1239 editSField(FirstFrameFieldMask);
1241 return &_sfFirstFrame;
1244 const SFBool *RenderOptionsBase::getSFFirstFrame(void) const
1246 return &_sfFirstFrame;
1250 SFBool *RenderOptionsBase::editSFDepthOnlyPass(void)
1252 editSField(DepthOnlyPassFieldMask);
1254 return &_sfDepthOnlyPass;
1257 const SFBool *RenderOptionsBase::getSFDepthOnlyPass(void) const
1259 return &_sfDepthOnlyPass;
1263 SFColor4f *RenderOptionsBase::editSFLightModelAmbient(void)
1265 editSField(LightModelAmbientFieldMask);
1267 return &_sfLightModelAmbient;
1270 const SFColor4f *RenderOptionsBase::getSFLightModelAmbient(void) const
1272 return &_sfLightModelAmbient;
1276 SFColor4f *RenderOptionsBase::editSFFogColor(void)
1278 editSField(FogColorFieldMask);
1280 return &_sfFogColor;
1283 const SFColor4f *RenderOptionsBase::getSFFogColor(void) const
1285 return &_sfFogColor;
1289 SFVec2f *RenderOptionsBase::editSFFogRange(void)
1291 editSField(FogRangeFieldMask);
1293 return &_sfFogRange;
1296 const SFVec2f *RenderOptionsBase::getSFFogRange(void) const
1298 return &_sfFogRange;
1302 SFReal32 *RenderOptionsBase::editSFFogDensity(void)
1304 editSField(FogDensityFieldMask);
1306 return &_sfFogDensity;
1309 const SFReal32 *RenderOptionsBase::getSFFogDensity(void) const
1311 return &_sfFogDensity;
1315 SFInt32 *RenderOptionsBase::editSFFogMode(void)
1317 editSField(FogModeFieldMask);
1319 return &_sfFogMode;
1322 const SFInt32 *RenderOptionsBase::getSFFogMode(void) const
1324 return &_sfFogMode;
1328 SFUInt32 *RenderOptionsBase::editSFMultiSample(void)
1330 editSField(MultiSampleFieldMask);
1332 return &_sfMultiSample;
1335 const SFUInt32 *RenderOptionsBase::getSFMultiSample(void) const
1337 return &_sfMultiSample;
1341 SFUInt32 *RenderOptionsBase::editSFMultiSampleFilterMode(void)
1343 editSField(MultiSampleFilterModeFieldMask);
1345 return &_sfMultiSampleFilterMode;
1348 const SFUInt32 *RenderOptionsBase::getSFMultiSampleFilterMode(void) const
1350 return &_sfMultiSampleFilterMode;
1358 /*------------------------------ access -----------------------------------*/
1360 SizeT RenderOptionsBase::getBinSize(ConstFieldMaskArg whichField)
1362 SizeT returnValue = Inherited::getBinSize(whichField);
1364 if(FieldBits::NoField != (RenderPropertiesFieldMask & whichField))
1366 returnValue += _sfRenderProperties.getBinSize();
1368 if(FieldBits::NoField != (UseGLFinishFieldMask & whichField))
1370 returnValue += _sfUseGLFinish.getBinSize();
1372 if(FieldBits::NoField != (StatisticFieldMask & whichField))
1374 returnValue += _sfStatistic.getBinSize();
1376 if(FieldBits::NoField != (PolygonModeFieldMask & whichField))
1378 returnValue += _sfPolygonMode.getBinSize();
1380 if(FieldBits::NoField != (TwoSidedLightingFieldMask & whichField))
1382 returnValue += _sfTwoSidedLighting.getBinSize();
1384 if(FieldBits::NoField != (SpecTexLightingFieldMask & whichField))
1386 returnValue += _sfSpecTexLighting.getBinSize();
1388 if(FieldBits::NoField != (SortTransFieldMask & whichField))
1390 returnValue += _sfSortTrans.getBinSize();
1392 if(FieldBits::NoField != (ZWriteTransFieldMask & whichField))
1394 returnValue += _sfZWriteTrans.getBinSize();
1396 if(FieldBits::NoField != (LocalLightsFieldMask & whichField))
1398 returnValue += _sfLocalLights.getBinSize();
1400 if(FieldBits::NoField != (CorrectTwoSidedLightingFieldMask & whichField))
1402 returnValue += _sfCorrectTwoSidedLighting.getBinSize();
1404 if(FieldBits::NoField != (OcclusionCullingFieldMask & whichField))
1406 returnValue += _sfOcclusionCulling.getBinSize();
1408 if(FieldBits::NoField != (OcclusionCullingModeFieldMask & whichField))
1410 returnValue += _sfOcclusionCullingMode.getBinSize();
1412 if(FieldBits::NoField != (OcclusionCullingPixelsFieldMask & whichField))
1414 returnValue += _sfOcclusionCullingPixels.getBinSize();
1416 if(FieldBits::NoField != (AntialiasingFieldMask & whichField))
1418 returnValue += _sfAntialiasing.getBinSize();
1420 if(FieldBits::NoField != (AntialiasingDistanceFieldMask & whichField))
1422 returnValue += _sfAntialiasingDistance.getBinSize();
1424 if(FieldBits::NoField != (AntialiasingScaleFieldMask & whichField))
1426 returnValue += _sfAntialiasingScale.getBinSize();
1428 if(FieldBits::NoField != (AntialiasingTriggerFieldMask & whichField))
1430 returnValue += _sfAntialiasingTrigger.getBinSize();
1432 if(FieldBits::NoField != (FrustumCullingFieldMask & whichField))
1434 returnValue += _sfFrustumCulling.getBinSize();
1436 if(FieldBits::NoField != (BackfaceCullingFieldMask & whichField))
1438 returnValue += _sfBackfaceCulling.getBinSize();
1440 if(FieldBits::NoField != (SmallFeatureCullingFieldMask & whichField))
1442 returnValue += _sfSmallFeatureCulling.getBinSize();
1444 if(FieldBits::NoField != (SmallFeaturePixelsFieldMask & whichField))
1446 returnValue += _sfSmallFeaturePixels.getBinSize();
1448 if(FieldBits::NoField != (SmallFeatureThresholdFieldMask & whichField))
1450 returnValue += _sfSmallFeatureThreshold.getBinSize();
1452 if(FieldBits::NoField != (FirstFrameFieldMask & whichField))
1454 returnValue += _sfFirstFrame.getBinSize();
1456 if(FieldBits::NoField != (DepthOnlyPassFieldMask & whichField))
1458 returnValue += _sfDepthOnlyPass.getBinSize();
1460 if(FieldBits::NoField != (LightModelAmbientFieldMask & whichField))
1462 returnValue += _sfLightModelAmbient.getBinSize();
1464 if(FieldBits::NoField != (FogColorFieldMask & whichField))
1466 returnValue += _sfFogColor.getBinSize();
1468 if(FieldBits::NoField != (FogRangeFieldMask & whichField))
1470 returnValue += _sfFogRange.getBinSize();
1472 if(FieldBits::NoField != (FogDensityFieldMask & whichField))
1474 returnValue += _sfFogDensity.getBinSize();
1476 if(FieldBits::NoField != (FogModeFieldMask & whichField))
1478 returnValue += _sfFogMode.getBinSize();
1480 if(FieldBits::NoField != (MultiSampleFieldMask & whichField))
1482 returnValue += _sfMultiSample.getBinSize();
1484 if(FieldBits::NoField != (MultiSampleFilterModeFieldMask & whichField))
1486 returnValue += _sfMultiSampleFilterMode.getBinSize();
1489 return returnValue;
1492 void RenderOptionsBase::copyToBin(BinaryDataHandler &pMem,
1493 ConstFieldMaskArg whichField)
1495 Inherited::copyToBin(pMem, whichField);
1497 if(FieldBits::NoField != (RenderPropertiesFieldMask & whichField))
1499 _sfRenderProperties.copyToBin(pMem);
1501 if(FieldBits::NoField != (UseGLFinishFieldMask & whichField))
1503 _sfUseGLFinish.copyToBin(pMem);
1505 if(FieldBits::NoField != (StatisticFieldMask & whichField))
1507 _sfStatistic.copyToBin(pMem);
1509 if(FieldBits::NoField != (PolygonModeFieldMask & whichField))
1511 _sfPolygonMode.copyToBin(pMem);
1513 if(FieldBits::NoField != (TwoSidedLightingFieldMask & whichField))
1515 _sfTwoSidedLighting.copyToBin(pMem);
1517 if(FieldBits::NoField != (SpecTexLightingFieldMask & whichField))
1519 _sfSpecTexLighting.copyToBin(pMem);
1521 if(FieldBits::NoField != (SortTransFieldMask & whichField))
1523 _sfSortTrans.copyToBin(pMem);
1525 if(FieldBits::NoField != (ZWriteTransFieldMask & whichField))
1527 _sfZWriteTrans.copyToBin(pMem);
1529 if(FieldBits::NoField != (LocalLightsFieldMask & whichField))
1531 _sfLocalLights.copyToBin(pMem);
1533 if(FieldBits::NoField != (CorrectTwoSidedLightingFieldMask & whichField))
1535 _sfCorrectTwoSidedLighting.copyToBin(pMem);
1537 if(FieldBits::NoField != (OcclusionCullingFieldMask & whichField))
1539 _sfOcclusionCulling.copyToBin(pMem);
1541 if(FieldBits::NoField != (OcclusionCullingModeFieldMask & whichField))
1543 _sfOcclusionCullingMode.copyToBin(pMem);
1545 if(FieldBits::NoField != (OcclusionCullingPixelsFieldMask & whichField))
1547 _sfOcclusionCullingPixels.copyToBin(pMem);
1549 if(FieldBits::NoField != (AntialiasingFieldMask & whichField))
1551 _sfAntialiasing.copyToBin(pMem);
1553 if(FieldBits::NoField != (AntialiasingDistanceFieldMask & whichField))
1555 _sfAntialiasingDistance.copyToBin(pMem);
1557 if(FieldBits::NoField != (AntialiasingScaleFieldMask & whichField))
1559 _sfAntialiasingScale.copyToBin(pMem);
1561 if(FieldBits::NoField != (AntialiasingTriggerFieldMask & whichField))
1563 _sfAntialiasingTrigger.copyToBin(pMem);
1565 if(FieldBits::NoField != (FrustumCullingFieldMask & whichField))
1567 _sfFrustumCulling.copyToBin(pMem);
1569 if(FieldBits::NoField != (BackfaceCullingFieldMask & whichField))
1571 _sfBackfaceCulling.copyToBin(pMem);
1573 if(FieldBits::NoField != (SmallFeatureCullingFieldMask & whichField))
1575 _sfSmallFeatureCulling.copyToBin(pMem);
1577 if(FieldBits::NoField != (SmallFeaturePixelsFieldMask & whichField))
1579 _sfSmallFeaturePixels.copyToBin(pMem);
1581 if(FieldBits::NoField != (SmallFeatureThresholdFieldMask & whichField))
1583 _sfSmallFeatureThreshold.copyToBin(pMem);
1585 if(FieldBits::NoField != (FirstFrameFieldMask & whichField))
1587 _sfFirstFrame.copyToBin(pMem);
1589 if(FieldBits::NoField != (DepthOnlyPassFieldMask & whichField))
1591 _sfDepthOnlyPass.copyToBin(pMem);
1593 if(FieldBits::NoField != (LightModelAmbientFieldMask & whichField))
1595 _sfLightModelAmbient.copyToBin(pMem);
1597 if(FieldBits::NoField != (FogColorFieldMask & whichField))
1599 _sfFogColor.copyToBin(pMem);
1601 if(FieldBits::NoField != (FogRangeFieldMask & whichField))
1603 _sfFogRange.copyToBin(pMem);
1605 if(FieldBits::NoField != (FogDensityFieldMask & whichField))
1607 _sfFogDensity.copyToBin(pMem);
1609 if(FieldBits::NoField != (FogModeFieldMask & whichField))
1611 _sfFogMode.copyToBin(pMem);
1613 if(FieldBits::NoField != (MultiSampleFieldMask & whichField))
1615 _sfMultiSample.copyToBin(pMem);
1617 if(FieldBits::NoField != (MultiSampleFilterModeFieldMask & whichField))
1619 _sfMultiSampleFilterMode.copyToBin(pMem);
1623 void RenderOptionsBase::copyFromBin(BinaryDataHandler &pMem,
1624 ConstFieldMaskArg whichField)
1626 Inherited::copyFromBin(pMem, whichField);
1628 if(FieldBits::NoField != (RenderPropertiesFieldMask & whichField))
1630 editSField(RenderPropertiesFieldMask);
1631 _sfRenderProperties.copyFromBin(pMem);
1633 if(FieldBits::NoField != (UseGLFinishFieldMask & whichField))
1635 editSField(UseGLFinishFieldMask);
1636 _sfUseGLFinish.copyFromBin(pMem);
1638 if(FieldBits::NoField != (StatisticFieldMask & whichField))
1640 editSField(StatisticFieldMask);
1641 _sfStatistic.copyFromBin(pMem);
1643 if(FieldBits::NoField != (PolygonModeFieldMask & whichField))
1645 editSField(PolygonModeFieldMask);
1646 _sfPolygonMode.copyFromBin(pMem);
1648 if(FieldBits::NoField != (TwoSidedLightingFieldMask & whichField))
1650 editSField(TwoSidedLightingFieldMask);
1651 _sfTwoSidedLighting.copyFromBin(pMem);
1653 if(FieldBits::NoField != (SpecTexLightingFieldMask & whichField))
1655 editSField(SpecTexLightingFieldMask);
1656 _sfSpecTexLighting.copyFromBin(pMem);
1658 if(FieldBits::NoField != (SortTransFieldMask & whichField))
1660 editSField(SortTransFieldMask);
1661 _sfSortTrans.copyFromBin(pMem);
1663 if(FieldBits::NoField != (ZWriteTransFieldMask & whichField))
1665 editSField(ZWriteTransFieldMask);
1666 _sfZWriteTrans.copyFromBin(pMem);
1668 if(FieldBits::NoField != (LocalLightsFieldMask & whichField))
1670 editSField(LocalLightsFieldMask);
1671 _sfLocalLights.copyFromBin(pMem);
1673 if(FieldBits::NoField != (CorrectTwoSidedLightingFieldMask & whichField))
1675 editSField(CorrectTwoSidedLightingFieldMask);
1676 _sfCorrectTwoSidedLighting.copyFromBin(pMem);
1678 if(FieldBits::NoField != (OcclusionCullingFieldMask & whichField))
1680 editSField(OcclusionCullingFieldMask);
1681 _sfOcclusionCulling.copyFromBin(pMem);
1683 if(FieldBits::NoField != (OcclusionCullingModeFieldMask & whichField))
1685 editSField(OcclusionCullingModeFieldMask);
1686 _sfOcclusionCullingMode.copyFromBin(pMem);
1688 if(FieldBits::NoField != (OcclusionCullingPixelsFieldMask & whichField))
1690 editSField(OcclusionCullingPixelsFieldMask);
1691 _sfOcclusionCullingPixels.copyFromBin(pMem);
1693 if(FieldBits::NoField != (AntialiasingFieldMask & whichField))
1695 editSField(AntialiasingFieldMask);
1696 _sfAntialiasing.copyFromBin(pMem);
1698 if(FieldBits::NoField != (AntialiasingDistanceFieldMask & whichField))
1700 editSField(AntialiasingDistanceFieldMask);
1701 _sfAntialiasingDistance.copyFromBin(pMem);
1703 if(FieldBits::NoField != (AntialiasingScaleFieldMask & whichField))
1705 editSField(AntialiasingScaleFieldMask);
1706 _sfAntialiasingScale.copyFromBin(pMem);
1708 if(FieldBits::NoField != (AntialiasingTriggerFieldMask & whichField))
1710 editSField(AntialiasingTriggerFieldMask);
1711 _sfAntialiasingTrigger.copyFromBin(pMem);
1713 if(FieldBits::NoField != (FrustumCullingFieldMask & whichField))
1715 editSField(FrustumCullingFieldMask);
1716 _sfFrustumCulling.copyFromBin(pMem);
1718 if(FieldBits::NoField != (BackfaceCullingFieldMask & whichField))
1720 editSField(BackfaceCullingFieldMask);
1721 _sfBackfaceCulling.copyFromBin(pMem);
1723 if(FieldBits::NoField != (SmallFeatureCullingFieldMask & whichField))
1725 editSField(SmallFeatureCullingFieldMask);
1726 _sfSmallFeatureCulling.copyFromBin(pMem);
1728 if(FieldBits::NoField != (SmallFeaturePixelsFieldMask & whichField))
1730 editSField(SmallFeaturePixelsFieldMask);
1731 _sfSmallFeaturePixels.copyFromBin(pMem);
1733 if(FieldBits::NoField != (SmallFeatureThresholdFieldMask & whichField))
1735 editSField(SmallFeatureThresholdFieldMask);
1736 _sfSmallFeatureThreshold.copyFromBin(pMem);
1738 if(FieldBits::NoField != (FirstFrameFieldMask & whichField))
1740 editSField(FirstFrameFieldMask);
1741 _sfFirstFrame.copyFromBin(pMem);
1743 if(FieldBits::NoField != (DepthOnlyPassFieldMask & whichField))
1745 editSField(DepthOnlyPassFieldMask);
1746 _sfDepthOnlyPass.copyFromBin(pMem);
1748 if(FieldBits::NoField != (LightModelAmbientFieldMask & whichField))
1750 editSField(LightModelAmbientFieldMask);
1751 _sfLightModelAmbient.copyFromBin(pMem);
1753 if(FieldBits::NoField != (FogColorFieldMask & whichField))
1755 editSField(FogColorFieldMask);
1756 _sfFogColor.copyFromBin(pMem);
1758 if(FieldBits::NoField != (FogRangeFieldMask & whichField))
1760 editSField(FogRangeFieldMask);
1761 _sfFogRange.copyFromBin(pMem);
1763 if(FieldBits::NoField != (FogDensityFieldMask & whichField))
1765 editSField(FogDensityFieldMask);
1766 _sfFogDensity.copyFromBin(pMem);
1768 if(FieldBits::NoField != (FogModeFieldMask & whichField))
1770 editSField(FogModeFieldMask);
1771 _sfFogMode.copyFromBin(pMem);
1773 if(FieldBits::NoField != (MultiSampleFieldMask & whichField))
1775 editSField(MultiSampleFieldMask);
1776 _sfMultiSample.copyFromBin(pMem);
1778 if(FieldBits::NoField != (MultiSampleFilterModeFieldMask & whichField))
1780 editSField(MultiSampleFilterModeFieldMask);
1781 _sfMultiSampleFilterMode.copyFromBin(pMem);
1785 //! create a new instance of the class
1786 RenderOptionsTransitPtr RenderOptionsBase::createLocal(BitVector bFlags)
1788 RenderOptionsTransitPtr fc;
1790 if(getClassType().getPrototype() != NULL)
1792 FieldContainerTransitPtr tmpPtr =
1793 getClassType().getPrototype()-> shallowCopyLocal(bFlags);
1795 fc = dynamic_pointer_cast<RenderOptions>(tmpPtr);
1798 return fc;
1801 //! create a new instance of the class, copy the container flags
1802 RenderOptionsTransitPtr RenderOptionsBase::createDependent(BitVector bFlags)
1804 RenderOptionsTransitPtr fc;
1806 if(getClassType().getPrototype() != NULL)
1808 FieldContainerTransitPtr tmpPtr =
1809 getClassType().getPrototype()-> shallowCopyDependent(bFlags);
1811 fc = dynamic_pointer_cast<RenderOptions>(tmpPtr);
1814 return fc;
1817 //! create a new instance of the class
1818 RenderOptionsTransitPtr RenderOptionsBase::create(void)
1820 RenderOptionsTransitPtr fc;
1822 if(getClassType().getPrototype() != NULL)
1824 FieldContainerTransitPtr tmpPtr =
1825 getClassType().getPrototype()-> shallowCopy();
1827 fc = dynamic_pointer_cast<RenderOptions>(tmpPtr);
1830 return fc;
1833 RenderOptions *RenderOptionsBase::createEmptyLocal(BitVector bFlags)
1835 RenderOptions *returnValue;
1837 newPtr<RenderOptions>(returnValue, bFlags);
1839 returnValue->_pFieldFlags->_bNamespaceMask &= ~bFlags;
1841 return returnValue;
1844 //! create an empty new instance of the class, do not copy the prototype
1845 RenderOptions *RenderOptionsBase::createEmpty(void)
1847 RenderOptions *returnValue;
1849 newPtr<RenderOptions>(returnValue, Thread::getCurrentLocalFlags());
1851 returnValue->_pFieldFlags->_bNamespaceMask &=
1852 ~Thread::getCurrentLocalFlags();
1854 return returnValue;
1858 FieldContainerTransitPtr RenderOptionsBase::shallowCopyLocal(
1859 BitVector bFlags) const
1861 RenderOptions *tmpPtr;
1863 newPtr(tmpPtr, dynamic_cast<const RenderOptions *>(this), bFlags);
1865 FieldContainerTransitPtr returnValue(tmpPtr);
1867 tmpPtr->_pFieldFlags->_bNamespaceMask &= ~bFlags;
1869 return returnValue;
1872 FieldContainerTransitPtr RenderOptionsBase::shallowCopyDependent(
1873 BitVector bFlags) const
1875 RenderOptions *tmpPtr;
1877 newPtr(tmpPtr, dynamic_cast<const RenderOptions *>(this), ~bFlags);
1879 FieldContainerTransitPtr returnValue(tmpPtr);
1881 tmpPtr->_pFieldFlags->_bNamespaceMask = bFlags;
1883 return returnValue;
1886 FieldContainerTransitPtr RenderOptionsBase::shallowCopy(void) const
1888 RenderOptions *tmpPtr;
1890 newPtr(tmpPtr,
1891 dynamic_cast<const RenderOptions *>(this),
1892 Thread::getCurrentLocalFlags());
1894 tmpPtr->_pFieldFlags->_bNamespaceMask &= ~Thread::getCurrentLocalFlags();
1896 FieldContainerTransitPtr returnValue(tmpPtr);
1898 return returnValue;
1904 /*------------------------- constructors ----------------------------------*/
1906 RenderOptionsBase::RenderOptionsBase(void) :
1907 Inherited(),
1908 _sfRenderProperties (MaterialMapKey(0x0000)),
1909 _sfUseGLFinish (bool(false)),
1910 _sfStatistic (bool(false)),
1911 _sfPolygonMode (GLenum(GL_FILL)),
1912 _sfTwoSidedLighting (bool(false)),
1913 _sfSpecTexLighting (bool(false)),
1914 _sfSortTrans (bool(true)),
1915 _sfZWriteTrans (bool(true)),
1916 _sfLocalLights (bool(true)),
1917 _sfCorrectTwoSidedLighting(bool(true)),
1918 _sfOcclusionCulling (bool(false)),
1919 _sfOcclusionCullingMode (Int32(1)),
1920 _sfOcclusionCullingPixels (UInt32(0)),
1921 _sfAntialiasing (bool(false)),
1922 _sfAntialiasingDistance (Real32(0.2)),
1923 _sfAntialiasingScale (Real32(2.0)),
1924 _sfAntialiasingTrigger (UInt32(0)),
1925 _sfFrustumCulling (bool(false)),
1926 _sfBackfaceCulling (bool(false)),
1927 _sfSmallFeatureCulling (),
1928 _sfSmallFeaturePixels (),
1929 _sfSmallFeatureThreshold (),
1930 _sfFirstFrame (bool(true)),
1931 _sfDepthOnlyPass (bool(false)),
1932 _sfLightModelAmbient (Color4f(0.2f,0.2f,0.2f,1.0f)),
1933 _sfFogColor (Color4f(0,0,0,0)),
1934 _sfFogRange (Vec2f(0,1)),
1935 _sfFogDensity (Real32(1)),
1936 _sfFogMode (Int32(0)),
1937 _sfMultiSample (UInt32(1)),
1938 _sfMultiSampleFilterMode (UInt32(0))
1942 RenderOptionsBase::RenderOptionsBase(const RenderOptionsBase &source) :
1943 Inherited(source),
1944 _sfRenderProperties (source._sfRenderProperties ),
1945 _sfUseGLFinish (source._sfUseGLFinish ),
1946 _sfStatistic (source._sfStatistic ),
1947 _sfPolygonMode (source._sfPolygonMode ),
1948 _sfTwoSidedLighting (source._sfTwoSidedLighting ),
1949 _sfSpecTexLighting (source._sfSpecTexLighting ),
1950 _sfSortTrans (source._sfSortTrans ),
1951 _sfZWriteTrans (source._sfZWriteTrans ),
1952 _sfLocalLights (source._sfLocalLights ),
1953 _sfCorrectTwoSidedLighting(source._sfCorrectTwoSidedLighting),
1954 _sfOcclusionCulling (source._sfOcclusionCulling ),
1955 _sfOcclusionCullingMode (source._sfOcclusionCullingMode ),
1956 _sfOcclusionCullingPixels (source._sfOcclusionCullingPixels ),
1957 _sfAntialiasing (source._sfAntialiasing ),
1958 _sfAntialiasingDistance (source._sfAntialiasingDistance ),
1959 _sfAntialiasingScale (source._sfAntialiasingScale ),
1960 _sfAntialiasingTrigger (source._sfAntialiasingTrigger ),
1961 _sfFrustumCulling (source._sfFrustumCulling ),
1962 _sfBackfaceCulling (source._sfBackfaceCulling ),
1963 _sfSmallFeatureCulling (source._sfSmallFeatureCulling ),
1964 _sfSmallFeaturePixels (source._sfSmallFeaturePixels ),
1965 _sfSmallFeatureThreshold (source._sfSmallFeatureThreshold ),
1966 _sfFirstFrame (source._sfFirstFrame ),
1967 _sfDepthOnlyPass (source._sfDepthOnlyPass ),
1968 _sfLightModelAmbient (source._sfLightModelAmbient ),
1969 _sfFogColor (source._sfFogColor ),
1970 _sfFogRange (source._sfFogRange ),
1971 _sfFogDensity (source._sfFogDensity ),
1972 _sfFogMode (source._sfFogMode ),
1973 _sfMultiSample (source._sfMultiSample ),
1974 _sfMultiSampleFilterMode (source._sfMultiSampleFilterMode )
1979 /*-------------------------- destructors ----------------------------------*/
1981 RenderOptionsBase::~RenderOptionsBase(void)
1986 GetFieldHandlePtr RenderOptionsBase::getHandleRenderProperties (void) const
1988 SFMaterialMapKey::GetHandlePtr returnValue(
1989 new SFMaterialMapKey::GetHandle(
1990 &_sfRenderProperties,
1991 this->getType().getFieldDesc(RenderPropertiesFieldId),
1992 const_cast<RenderOptionsBase *>(this)));
1994 return returnValue;
1997 EditFieldHandlePtr RenderOptionsBase::editHandleRenderProperties(void)
1999 SFMaterialMapKey::EditHandlePtr returnValue(
2000 new SFMaterialMapKey::EditHandle(
2001 &_sfRenderProperties,
2002 this->getType().getFieldDesc(RenderPropertiesFieldId),
2003 this));
2006 editSField(RenderPropertiesFieldMask);
2008 return returnValue;
2011 GetFieldHandlePtr RenderOptionsBase::getHandleUseGLFinish (void) const
2013 SFBool::GetHandlePtr returnValue(
2014 new SFBool::GetHandle(
2015 &_sfUseGLFinish,
2016 this->getType().getFieldDesc(UseGLFinishFieldId),
2017 const_cast<RenderOptionsBase *>(this)));
2019 return returnValue;
2022 EditFieldHandlePtr RenderOptionsBase::editHandleUseGLFinish (void)
2024 SFBool::EditHandlePtr returnValue(
2025 new SFBool::EditHandle(
2026 &_sfUseGLFinish,
2027 this->getType().getFieldDesc(UseGLFinishFieldId),
2028 this));
2031 editSField(UseGLFinishFieldMask);
2033 return returnValue;
2036 GetFieldHandlePtr RenderOptionsBase::getHandleStatistic (void) const
2038 SFBool::GetHandlePtr returnValue(
2039 new SFBool::GetHandle(
2040 &_sfStatistic,
2041 this->getType().getFieldDesc(StatisticFieldId),
2042 const_cast<RenderOptionsBase *>(this)));
2044 return returnValue;
2047 EditFieldHandlePtr RenderOptionsBase::editHandleStatistic (void)
2049 SFBool::EditHandlePtr returnValue(
2050 new SFBool::EditHandle(
2051 &_sfStatistic,
2052 this->getType().getFieldDesc(StatisticFieldId),
2053 this));
2056 editSField(StatisticFieldMask);
2058 return returnValue;
2061 GetFieldHandlePtr RenderOptionsBase::getHandlePolygonMode (void) const
2063 SFGLenum::GetHandlePtr returnValue(
2064 new SFGLenum::GetHandle(
2065 &_sfPolygonMode,
2066 this->getType().getFieldDesc(PolygonModeFieldId),
2067 const_cast<RenderOptionsBase *>(this)));
2069 return returnValue;
2072 EditFieldHandlePtr RenderOptionsBase::editHandlePolygonMode (void)
2074 SFGLenum::EditHandlePtr returnValue(
2075 new SFGLenum::EditHandle(
2076 &_sfPolygonMode,
2077 this->getType().getFieldDesc(PolygonModeFieldId),
2078 this));
2081 editSField(PolygonModeFieldMask);
2083 return returnValue;
2086 GetFieldHandlePtr RenderOptionsBase::getHandleTwoSidedLighting (void) const
2088 SFBool::GetHandlePtr returnValue(
2089 new SFBool::GetHandle(
2090 &_sfTwoSidedLighting,
2091 this->getType().getFieldDesc(TwoSidedLightingFieldId),
2092 const_cast<RenderOptionsBase *>(this)));
2094 return returnValue;
2097 EditFieldHandlePtr RenderOptionsBase::editHandleTwoSidedLighting(void)
2099 SFBool::EditHandlePtr returnValue(
2100 new SFBool::EditHandle(
2101 &_sfTwoSidedLighting,
2102 this->getType().getFieldDesc(TwoSidedLightingFieldId),
2103 this));
2106 editSField(TwoSidedLightingFieldMask);
2108 return returnValue;
2111 GetFieldHandlePtr RenderOptionsBase::getHandleSpecTexLighting (void) const
2113 SFBool::GetHandlePtr returnValue(
2114 new SFBool::GetHandle(
2115 &_sfSpecTexLighting,
2116 this->getType().getFieldDesc(SpecTexLightingFieldId),
2117 const_cast<RenderOptionsBase *>(this)));
2119 return returnValue;
2122 EditFieldHandlePtr RenderOptionsBase::editHandleSpecTexLighting(void)
2124 SFBool::EditHandlePtr returnValue(
2125 new SFBool::EditHandle(
2126 &_sfSpecTexLighting,
2127 this->getType().getFieldDesc(SpecTexLightingFieldId),
2128 this));
2131 editSField(SpecTexLightingFieldMask);
2133 return returnValue;
2136 GetFieldHandlePtr RenderOptionsBase::getHandleSortTrans (void) const
2138 SFBool::GetHandlePtr returnValue(
2139 new SFBool::GetHandle(
2140 &_sfSortTrans,
2141 this->getType().getFieldDesc(SortTransFieldId),
2142 const_cast<RenderOptionsBase *>(this)));
2144 return returnValue;
2147 EditFieldHandlePtr RenderOptionsBase::editHandleSortTrans (void)
2149 SFBool::EditHandlePtr returnValue(
2150 new SFBool::EditHandle(
2151 &_sfSortTrans,
2152 this->getType().getFieldDesc(SortTransFieldId),
2153 this));
2156 editSField(SortTransFieldMask);
2158 return returnValue;
2161 GetFieldHandlePtr RenderOptionsBase::getHandleZWriteTrans (void) const
2163 SFBool::GetHandlePtr returnValue(
2164 new SFBool::GetHandle(
2165 &_sfZWriteTrans,
2166 this->getType().getFieldDesc(ZWriteTransFieldId),
2167 const_cast<RenderOptionsBase *>(this)));
2169 return returnValue;
2172 EditFieldHandlePtr RenderOptionsBase::editHandleZWriteTrans (void)
2174 SFBool::EditHandlePtr returnValue(
2175 new SFBool::EditHandle(
2176 &_sfZWriteTrans,
2177 this->getType().getFieldDesc(ZWriteTransFieldId),
2178 this));
2181 editSField(ZWriteTransFieldMask);
2183 return returnValue;
2186 GetFieldHandlePtr RenderOptionsBase::getHandleLocalLights (void) const
2188 SFBool::GetHandlePtr returnValue(
2189 new SFBool::GetHandle(
2190 &_sfLocalLights,
2191 this->getType().getFieldDesc(LocalLightsFieldId),
2192 const_cast<RenderOptionsBase *>(this)));
2194 return returnValue;
2197 EditFieldHandlePtr RenderOptionsBase::editHandleLocalLights (void)
2199 SFBool::EditHandlePtr returnValue(
2200 new SFBool::EditHandle(
2201 &_sfLocalLights,
2202 this->getType().getFieldDesc(LocalLightsFieldId),
2203 this));
2206 editSField(LocalLightsFieldMask);
2208 return returnValue;
2211 GetFieldHandlePtr RenderOptionsBase::getHandleCorrectTwoSidedLighting (void) const
2213 SFBool::GetHandlePtr returnValue(
2214 new SFBool::GetHandle(
2215 &_sfCorrectTwoSidedLighting,
2216 this->getType().getFieldDesc(CorrectTwoSidedLightingFieldId),
2217 const_cast<RenderOptionsBase *>(this)));
2219 return returnValue;
2222 EditFieldHandlePtr RenderOptionsBase::editHandleCorrectTwoSidedLighting(void)
2224 SFBool::EditHandlePtr returnValue(
2225 new SFBool::EditHandle(
2226 &_sfCorrectTwoSidedLighting,
2227 this->getType().getFieldDesc(CorrectTwoSidedLightingFieldId),
2228 this));
2231 editSField(CorrectTwoSidedLightingFieldMask);
2233 return returnValue;
2236 GetFieldHandlePtr RenderOptionsBase::getHandleOcclusionCulling (void) const
2238 SFBool::GetHandlePtr returnValue(
2239 new SFBool::GetHandle(
2240 &_sfOcclusionCulling,
2241 this->getType().getFieldDesc(OcclusionCullingFieldId),
2242 const_cast<RenderOptionsBase *>(this)));
2244 return returnValue;
2247 EditFieldHandlePtr RenderOptionsBase::editHandleOcclusionCulling(void)
2249 SFBool::EditHandlePtr returnValue(
2250 new SFBool::EditHandle(
2251 &_sfOcclusionCulling,
2252 this->getType().getFieldDesc(OcclusionCullingFieldId),
2253 this));
2256 editSField(OcclusionCullingFieldMask);
2258 return returnValue;
2261 GetFieldHandlePtr RenderOptionsBase::getHandleOcclusionCullingMode (void) const
2263 SFInt32::GetHandlePtr returnValue(
2264 new SFInt32::GetHandle(
2265 &_sfOcclusionCullingMode,
2266 this->getType().getFieldDesc(OcclusionCullingModeFieldId),
2267 const_cast<RenderOptionsBase *>(this)));
2269 return returnValue;
2272 EditFieldHandlePtr RenderOptionsBase::editHandleOcclusionCullingMode(void)
2274 SFInt32::EditHandlePtr returnValue(
2275 new SFInt32::EditHandle(
2276 &_sfOcclusionCullingMode,
2277 this->getType().getFieldDesc(OcclusionCullingModeFieldId),
2278 this));
2281 editSField(OcclusionCullingModeFieldMask);
2283 return returnValue;
2286 GetFieldHandlePtr RenderOptionsBase::getHandleOcclusionCullingPixels (void) const
2288 SFUInt32::GetHandlePtr returnValue(
2289 new SFUInt32::GetHandle(
2290 &_sfOcclusionCullingPixels,
2291 this->getType().getFieldDesc(OcclusionCullingPixelsFieldId),
2292 const_cast<RenderOptionsBase *>(this)));
2294 return returnValue;
2297 EditFieldHandlePtr RenderOptionsBase::editHandleOcclusionCullingPixels(void)
2299 SFUInt32::EditHandlePtr returnValue(
2300 new SFUInt32::EditHandle(
2301 &_sfOcclusionCullingPixels,
2302 this->getType().getFieldDesc(OcclusionCullingPixelsFieldId),
2303 this));
2306 editSField(OcclusionCullingPixelsFieldMask);
2308 return returnValue;
2311 GetFieldHandlePtr RenderOptionsBase::getHandleAntialiasing (void) const
2313 SFBool::GetHandlePtr returnValue(
2314 new SFBool::GetHandle(
2315 &_sfAntialiasing,
2316 this->getType().getFieldDesc(AntialiasingFieldId),
2317 const_cast<RenderOptionsBase *>(this)));
2319 return returnValue;
2322 EditFieldHandlePtr RenderOptionsBase::editHandleAntialiasing (void)
2324 SFBool::EditHandlePtr returnValue(
2325 new SFBool::EditHandle(
2326 &_sfAntialiasing,
2327 this->getType().getFieldDesc(AntialiasingFieldId),
2328 this));
2331 editSField(AntialiasingFieldMask);
2333 return returnValue;
2336 GetFieldHandlePtr RenderOptionsBase::getHandleAntialiasingDistance (void) const
2338 SFReal32::GetHandlePtr returnValue(
2339 new SFReal32::GetHandle(
2340 &_sfAntialiasingDistance,
2341 this->getType().getFieldDesc(AntialiasingDistanceFieldId),
2342 const_cast<RenderOptionsBase *>(this)));
2344 return returnValue;
2347 EditFieldHandlePtr RenderOptionsBase::editHandleAntialiasingDistance(void)
2349 SFReal32::EditHandlePtr returnValue(
2350 new SFReal32::EditHandle(
2351 &_sfAntialiasingDistance,
2352 this->getType().getFieldDesc(AntialiasingDistanceFieldId),
2353 this));
2356 editSField(AntialiasingDistanceFieldMask);
2358 return returnValue;
2361 GetFieldHandlePtr RenderOptionsBase::getHandleAntialiasingScale (void) const
2363 SFReal32::GetHandlePtr returnValue(
2364 new SFReal32::GetHandle(
2365 &_sfAntialiasingScale,
2366 this->getType().getFieldDesc(AntialiasingScaleFieldId),
2367 const_cast<RenderOptionsBase *>(this)));
2369 return returnValue;
2372 EditFieldHandlePtr RenderOptionsBase::editHandleAntialiasingScale(void)
2374 SFReal32::EditHandlePtr returnValue(
2375 new SFReal32::EditHandle(
2376 &_sfAntialiasingScale,
2377 this->getType().getFieldDesc(AntialiasingScaleFieldId),
2378 this));
2381 editSField(AntialiasingScaleFieldMask);
2383 return returnValue;
2386 GetFieldHandlePtr RenderOptionsBase::getHandleAntialiasingTrigger (void) const
2388 SFUInt32::GetHandlePtr returnValue(
2389 new SFUInt32::GetHandle(
2390 &_sfAntialiasingTrigger,
2391 this->getType().getFieldDesc(AntialiasingTriggerFieldId),
2392 const_cast<RenderOptionsBase *>(this)));
2394 return returnValue;
2397 EditFieldHandlePtr RenderOptionsBase::editHandleAntialiasingTrigger(void)
2399 SFUInt32::EditHandlePtr returnValue(
2400 new SFUInt32::EditHandle(
2401 &_sfAntialiasingTrigger,
2402 this->getType().getFieldDesc(AntialiasingTriggerFieldId),
2403 this));
2406 editSField(AntialiasingTriggerFieldMask);
2408 return returnValue;
2411 GetFieldHandlePtr RenderOptionsBase::getHandleFrustumCulling (void) const
2413 SFBool::GetHandlePtr returnValue(
2414 new SFBool::GetHandle(
2415 &_sfFrustumCulling,
2416 this->getType().getFieldDesc(FrustumCullingFieldId),
2417 const_cast<RenderOptionsBase *>(this)));
2419 return returnValue;
2422 EditFieldHandlePtr RenderOptionsBase::editHandleFrustumCulling (void)
2424 SFBool::EditHandlePtr returnValue(
2425 new SFBool::EditHandle(
2426 &_sfFrustumCulling,
2427 this->getType().getFieldDesc(FrustumCullingFieldId),
2428 this));
2431 editSField(FrustumCullingFieldMask);
2433 return returnValue;
2436 GetFieldHandlePtr RenderOptionsBase::getHandleBackfaceCulling (void) const
2438 SFBool::GetHandlePtr returnValue(
2439 new SFBool::GetHandle(
2440 &_sfBackfaceCulling,
2441 this->getType().getFieldDesc(BackfaceCullingFieldId),
2442 const_cast<RenderOptionsBase *>(this)));
2444 return returnValue;
2447 EditFieldHandlePtr RenderOptionsBase::editHandleBackfaceCulling(void)
2449 SFBool::EditHandlePtr returnValue(
2450 new SFBool::EditHandle(
2451 &_sfBackfaceCulling,
2452 this->getType().getFieldDesc(BackfaceCullingFieldId),
2453 this));
2456 editSField(BackfaceCullingFieldMask);
2458 return returnValue;
2461 GetFieldHandlePtr RenderOptionsBase::getHandleSmallFeatureCulling (void) const
2463 SFBool::GetHandlePtr returnValue(
2464 new SFBool::GetHandle(
2465 &_sfSmallFeatureCulling,
2466 this->getType().getFieldDesc(SmallFeatureCullingFieldId),
2467 const_cast<RenderOptionsBase *>(this)));
2469 return returnValue;
2472 EditFieldHandlePtr RenderOptionsBase::editHandleSmallFeatureCulling(void)
2474 SFBool::EditHandlePtr returnValue(
2475 new SFBool::EditHandle(
2476 &_sfSmallFeatureCulling,
2477 this->getType().getFieldDesc(SmallFeatureCullingFieldId),
2478 this));
2481 editSField(SmallFeatureCullingFieldMask);
2483 return returnValue;
2486 GetFieldHandlePtr RenderOptionsBase::getHandleSmallFeaturePixels (void) const
2488 SFReal32::GetHandlePtr returnValue(
2489 new SFReal32::GetHandle(
2490 &_sfSmallFeaturePixels,
2491 this->getType().getFieldDesc(SmallFeaturePixelsFieldId),
2492 const_cast<RenderOptionsBase *>(this)));
2494 return returnValue;
2497 EditFieldHandlePtr RenderOptionsBase::editHandleSmallFeaturePixels(void)
2499 SFReal32::EditHandlePtr returnValue(
2500 new SFReal32::EditHandle(
2501 &_sfSmallFeaturePixels,
2502 this->getType().getFieldDesc(SmallFeaturePixelsFieldId),
2503 this));
2506 editSField(SmallFeaturePixelsFieldMask);
2508 return returnValue;
2511 GetFieldHandlePtr RenderOptionsBase::getHandleSmallFeatureThreshold (void) const
2513 SFUInt32::GetHandlePtr returnValue(
2514 new SFUInt32::GetHandle(
2515 &_sfSmallFeatureThreshold,
2516 this->getType().getFieldDesc(SmallFeatureThresholdFieldId),
2517 const_cast<RenderOptionsBase *>(this)));
2519 return returnValue;
2522 EditFieldHandlePtr RenderOptionsBase::editHandleSmallFeatureThreshold(void)
2524 SFUInt32::EditHandlePtr returnValue(
2525 new SFUInt32::EditHandle(
2526 &_sfSmallFeatureThreshold,
2527 this->getType().getFieldDesc(SmallFeatureThresholdFieldId),
2528 this));
2531 editSField(SmallFeatureThresholdFieldMask);
2533 return returnValue;
2536 GetFieldHandlePtr RenderOptionsBase::getHandleFirstFrame (void) const
2538 SFBool::GetHandlePtr returnValue(
2539 new SFBool::GetHandle(
2540 &_sfFirstFrame,
2541 this->getType().getFieldDesc(FirstFrameFieldId),
2542 const_cast<RenderOptionsBase *>(this)));
2544 return returnValue;
2547 EditFieldHandlePtr RenderOptionsBase::editHandleFirstFrame (void)
2549 SFBool::EditHandlePtr returnValue(
2550 new SFBool::EditHandle(
2551 &_sfFirstFrame,
2552 this->getType().getFieldDesc(FirstFrameFieldId),
2553 this));
2556 editSField(FirstFrameFieldMask);
2558 return returnValue;
2561 GetFieldHandlePtr RenderOptionsBase::getHandleDepthOnlyPass (void) const
2563 SFBool::GetHandlePtr returnValue(
2564 new SFBool::GetHandle(
2565 &_sfDepthOnlyPass,
2566 this->getType().getFieldDesc(DepthOnlyPassFieldId),
2567 const_cast<RenderOptionsBase *>(this)));
2569 return returnValue;
2572 EditFieldHandlePtr RenderOptionsBase::editHandleDepthOnlyPass (void)
2574 SFBool::EditHandlePtr returnValue(
2575 new SFBool::EditHandle(
2576 &_sfDepthOnlyPass,
2577 this->getType().getFieldDesc(DepthOnlyPassFieldId),
2578 this));
2581 editSField(DepthOnlyPassFieldMask);
2583 return returnValue;
2586 GetFieldHandlePtr RenderOptionsBase::getHandleLightModelAmbient (void) const
2588 SFColor4f::GetHandlePtr returnValue(
2589 new SFColor4f::GetHandle(
2590 &_sfLightModelAmbient,
2591 this->getType().getFieldDesc(LightModelAmbientFieldId),
2592 const_cast<RenderOptionsBase *>(this)));
2594 return returnValue;
2597 EditFieldHandlePtr RenderOptionsBase::editHandleLightModelAmbient(void)
2599 SFColor4f::EditHandlePtr returnValue(
2600 new SFColor4f::EditHandle(
2601 &_sfLightModelAmbient,
2602 this->getType().getFieldDesc(LightModelAmbientFieldId),
2603 this));
2606 editSField(LightModelAmbientFieldMask);
2608 return returnValue;
2611 GetFieldHandlePtr RenderOptionsBase::getHandleFogColor (void) const
2613 SFColor4f::GetHandlePtr returnValue(
2614 new SFColor4f::GetHandle(
2615 &_sfFogColor,
2616 this->getType().getFieldDesc(FogColorFieldId),
2617 const_cast<RenderOptionsBase *>(this)));
2619 return returnValue;
2622 EditFieldHandlePtr RenderOptionsBase::editHandleFogColor (void)
2624 SFColor4f::EditHandlePtr returnValue(
2625 new SFColor4f::EditHandle(
2626 &_sfFogColor,
2627 this->getType().getFieldDesc(FogColorFieldId),
2628 this));
2631 editSField(FogColorFieldMask);
2633 return returnValue;
2636 GetFieldHandlePtr RenderOptionsBase::getHandleFogRange (void) const
2638 SFVec2f::GetHandlePtr returnValue(
2639 new SFVec2f::GetHandle(
2640 &_sfFogRange,
2641 this->getType().getFieldDesc(FogRangeFieldId),
2642 const_cast<RenderOptionsBase *>(this)));
2644 return returnValue;
2647 EditFieldHandlePtr RenderOptionsBase::editHandleFogRange (void)
2649 SFVec2f::EditHandlePtr returnValue(
2650 new SFVec2f::EditHandle(
2651 &_sfFogRange,
2652 this->getType().getFieldDesc(FogRangeFieldId),
2653 this));
2656 editSField(FogRangeFieldMask);
2658 return returnValue;
2661 GetFieldHandlePtr RenderOptionsBase::getHandleFogDensity (void) const
2663 SFReal32::GetHandlePtr returnValue(
2664 new SFReal32::GetHandle(
2665 &_sfFogDensity,
2666 this->getType().getFieldDesc(FogDensityFieldId),
2667 const_cast<RenderOptionsBase *>(this)));
2669 return returnValue;
2672 EditFieldHandlePtr RenderOptionsBase::editHandleFogDensity (void)
2674 SFReal32::EditHandlePtr returnValue(
2675 new SFReal32::EditHandle(
2676 &_sfFogDensity,
2677 this->getType().getFieldDesc(FogDensityFieldId),
2678 this));
2681 editSField(FogDensityFieldMask);
2683 return returnValue;
2686 GetFieldHandlePtr RenderOptionsBase::getHandleFogMode (void) const
2688 SFInt32::GetHandlePtr returnValue(
2689 new SFInt32::GetHandle(
2690 &_sfFogMode,
2691 this->getType().getFieldDesc(FogModeFieldId),
2692 const_cast<RenderOptionsBase *>(this)));
2694 return returnValue;
2697 EditFieldHandlePtr RenderOptionsBase::editHandleFogMode (void)
2699 SFInt32::EditHandlePtr returnValue(
2700 new SFInt32::EditHandle(
2701 &_sfFogMode,
2702 this->getType().getFieldDesc(FogModeFieldId),
2703 this));
2706 editSField(FogModeFieldMask);
2708 return returnValue;
2711 GetFieldHandlePtr RenderOptionsBase::getHandleMultiSample (void) const
2713 SFUInt32::GetHandlePtr returnValue(
2714 new SFUInt32::GetHandle(
2715 &_sfMultiSample,
2716 this->getType().getFieldDesc(MultiSampleFieldId),
2717 const_cast<RenderOptionsBase *>(this)));
2719 return returnValue;
2722 EditFieldHandlePtr RenderOptionsBase::editHandleMultiSample (void)
2724 SFUInt32::EditHandlePtr returnValue(
2725 new SFUInt32::EditHandle(
2726 &_sfMultiSample,
2727 this->getType().getFieldDesc(MultiSampleFieldId),
2728 this));
2731 editSField(MultiSampleFieldMask);
2733 return returnValue;
2736 GetFieldHandlePtr RenderOptionsBase::getHandleMultiSampleFilterMode (void) const
2738 SFUInt32::GetHandlePtr returnValue(
2739 new SFUInt32::GetHandle(
2740 &_sfMultiSampleFilterMode,
2741 this->getType().getFieldDesc(MultiSampleFilterModeFieldId),
2742 const_cast<RenderOptionsBase *>(this)));
2744 return returnValue;
2747 EditFieldHandlePtr RenderOptionsBase::editHandleMultiSampleFilterMode(void)
2749 SFUInt32::EditHandlePtr returnValue(
2750 new SFUInt32::EditHandle(
2751 &_sfMultiSampleFilterMode,
2752 this->getType().getFieldDesc(MultiSampleFilterModeFieldId),
2753 this));
2756 editSField(MultiSampleFilterModeFieldMask);
2758 return returnValue;
2762 #ifdef OSG_MT_CPTR_ASPECT
2763 void RenderOptionsBase::execSyncV( FieldContainer &oFrom,
2764 ConstFieldMaskArg whichField,
2765 AspectOffsetStore &oOffsets,
2766 ConstFieldMaskArg syncMode,
2767 const UInt32 uiSyncInfo)
2769 RenderOptions *pThis = static_cast<RenderOptions *>(this);
2771 pThis->execSync(static_cast<RenderOptions *>(&oFrom),
2772 whichField,
2773 oOffsets,
2774 syncMode,
2775 uiSyncInfo);
2777 #endif
2780 #ifdef OSG_MT_CPTR_ASPECT
2781 FieldContainer *RenderOptionsBase::createAspectCopy(
2782 const FieldContainer *pRefAspect) const
2784 RenderOptions *returnValue;
2786 newAspectCopy(returnValue,
2787 dynamic_cast<const RenderOptions *>(pRefAspect),
2788 dynamic_cast<const RenderOptions *>(this));
2790 return returnValue;
2792 #endif
2794 void RenderOptionsBase::resolveLinks(void)
2796 Inherited::resolveLinks();
2802 OSG_END_NAMESPACE