changed: gcc8 base update
[opensg.git] / Source / System / Window / FrameBufferObjects / OSGRenderBufferBase.cpp
blobef2135f0fdeeda6d3c39f6fc63443b6189a48f21
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 RenderBuffer!
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 "OSGImage.h" // Image Class
67 #include "OSGRenderBufferBase.h"
68 #include "OSGRenderBuffer.h"
70 #include <boost/bind.hpp>
72 OSG_BEGIN_NAMESPACE
74 /***************************************************************************\
75 * Description *
76 \***************************************************************************/
78 /*! \class OSG::RenderBuffer
79 Render buffer. Wraps OpenGL render buffer objects. RENDERBUFFER
80 A renderbuffer is a data storage object containing a single image of a renderable internal format.
82 \see TextureBuffer
85 /***************************************************************************\
86 * Field Documentation *
87 \***************************************************************************/
89 /*! \var GLenum RenderBufferBase::_sfGLId
90 The OpenGL texture id for this buffer object.
93 /*! \var GLenum RenderBufferBase::_sfInternalFormat
97 /*! \var Image * RenderBufferBase::_sfImage
98 Image object used if readback is enabled.
101 /*! \var UInt32 RenderBufferBase::_sfColorSamples
105 /*! \var UInt32 RenderBufferBase::_sfCoverageSamples
109 /*! \var bool RenderBufferBase::_sfFixedSampleLocation
114 /***************************************************************************\
115 * FieldType/FieldTrait Instantiation *
116 \***************************************************************************/
118 #if !defined(OSG_DO_DOC) || defined(OSG_DOC_DEV)
119 PointerType FieldTraits<RenderBuffer *, nsOSG>::_type(
120 "RenderBufferPtr",
121 "FrameBufferAttachmentPtr",
122 RenderBuffer::getClassType(),
123 nsOSG);
124 #endif
126 OSG_FIELDTRAITS_GETTYPE_NS(RenderBuffer *, nsOSG)
128 OSG_EXPORT_PTR_SFIELD_FULL(PointerSField,
129 RenderBuffer *,
130 nsOSG)
132 OSG_EXPORT_PTR_MFIELD_FULL(PointerMField,
133 RenderBuffer *,
134 nsOSG)
136 /***************************************************************************\
137 * Field Description *
138 \***************************************************************************/
140 void RenderBufferBase::classDescInserter(TypeObject &oType)
142 FieldDescriptionBase *pDesc = NULL;
145 pDesc = new SFGLenum::Description(
146 SFGLenum::getClassType(),
147 "GLId",
148 "The OpenGL texture id for this buffer object.\n",
149 GLIdFieldId, GLIdFieldMask,
150 true,
151 (Field::FClusterLocal),
152 static_cast<FieldEditMethodSig>(&RenderBuffer::editHandleGLId),
153 static_cast<FieldGetMethodSig >(&RenderBuffer::getHandleGLId));
155 oType.addInitialDesc(pDesc);
157 pDesc = new SFGLenum::Description(
158 SFGLenum::getClassType(),
159 "internalFormat",
161 InternalFormatFieldId, InternalFormatFieldMask,
162 false,
163 (Field::SFDefaultFlags | Field::FStdAccess),
164 static_cast<FieldEditMethodSig>(&RenderBuffer::editHandleInternalFormat),
165 static_cast<FieldGetMethodSig >(&RenderBuffer::getHandleInternalFormat));
167 oType.addInitialDesc(pDesc);
169 pDesc = new SFUnrecImagePtr::Description(
170 SFUnrecImagePtr::getClassType(),
171 "image",
172 "Image object used if readback is enabled.\n",
173 ImageFieldId, ImageFieldMask,
174 false,
175 (Field::SFDefaultFlags | Field::FStdAccess),
176 static_cast<FieldEditMethodSig>(&RenderBuffer::editHandleImage),
177 static_cast<FieldGetMethodSig >(&RenderBuffer::getHandleImage));
179 oType.addInitialDesc(pDesc);
181 pDesc = new SFUInt32::Description(
182 SFUInt32::getClassType(),
183 "colorSamples",
185 ColorSamplesFieldId, ColorSamplesFieldMask,
186 false,
187 (Field::SFDefaultFlags | Field::FStdAccess),
188 static_cast<FieldEditMethodSig>(&RenderBuffer::editHandleColorSamples),
189 static_cast<FieldGetMethodSig >(&RenderBuffer::getHandleColorSamples));
191 oType.addInitialDesc(pDesc);
193 pDesc = new SFUInt32::Description(
194 SFUInt32::getClassType(),
195 "coverageSamples",
197 CoverageSamplesFieldId, CoverageSamplesFieldMask,
198 false,
199 (Field::SFDefaultFlags | Field::FStdAccess),
200 static_cast<FieldEditMethodSig>(&RenderBuffer::editHandleCoverageSamples),
201 static_cast<FieldGetMethodSig >(&RenderBuffer::getHandleCoverageSamples));
203 oType.addInitialDesc(pDesc);
205 pDesc = new SFBool::Description(
206 SFBool::getClassType(),
207 "fixedSampleLocation",
209 FixedSampleLocationFieldId, FixedSampleLocationFieldMask,
210 false,
211 (Field::SFDefaultFlags | Field::FStdAccess),
212 static_cast<FieldEditMethodSig>(&RenderBuffer::editHandleFixedSampleLocation),
213 static_cast<FieldGetMethodSig >(&RenderBuffer::getHandleFixedSampleLocation));
215 oType.addInitialDesc(pDesc);
219 RenderBufferBase::TypeObject RenderBufferBase::_type(
220 RenderBufferBase::getClassname(),
221 Inherited::getClassname(),
222 "RenderBuffer",
223 nsOSG, //Namespace
224 reinterpret_cast<PrototypeCreateF>(&RenderBufferBase::createEmptyLocal),
225 reinterpret_cast<InitContainerF>(&RenderBuffer::initMethod),
226 reinterpret_cast<ExitContainerF>(&RenderBuffer::exitMethod),
227 reinterpret_cast<InitalInsertDescFunc>(
228 reinterpret_cast<void *>(&RenderBuffer::classDescInserter)),
229 false,
231 "<?xml version=\"1.0\"?>\n"
232 "\n"
233 "<FieldContainer\n"
234 " name=\"RenderBuffer\"\n"
235 " parent=\"FrameBufferAttachment\"\n"
236 " library=\"System\"\n"
237 " pointerfieldtypes=\"both\"\n"
238 " structure=\"concrete\"\n"
239 " systemcomponent=\"true\"\n"
240 " parentsystemcomponent=\"true\"\n"
241 " decoratable=\"false\"\n"
242 " docGroupBase=\"GrpSystemWindowFBO\"\n"
243 " >\n"
244 " Render buffer. Wraps OpenGL render buffer objects. RENDERBUFFER\n"
245 " A renderbuffer is a data storage object containing a single image of a renderable internal format.\n"
246 " \n"
247 " \\see TextureBuffer\n"
248 " <Field\n"
249 " name=\"GLId\"\n"
250 " type=\"GLenum\"\n"
251 " cardinality=\"single\"\n"
252 " visibility=\"internal\"\n"
253 " access=\"public\"\n"
254 " defaultValue=\"0\"\n"
255 " fieldFlags=\"FClusterLocal\"\n"
256 " >\n"
257 " The OpenGL texture id for this buffer object.\n"
258 " </Field>\n"
259 " <Field\n"
260 " name=\"internalFormat\"\n"
261 " type=\"GLenum\"\n"
262 " cardinality=\"single\"\n"
263 " visibility=\"external\"\n"
264 " access=\"public\"\n"
265 " defaultValue=\"GL_NONE\"\n"
266 " >\n"
267 " </Field>\n"
268 " <Field\n"
269 " name=\"image\"\n"
270 " type=\"ImagePtr\"\n"
271 " cardinality=\"single\"\n"
272 " visibility=\"external\"\n"
273 " access=\"public\"\n"
274 " >\n"
275 " Image object used if readback is enabled.\n"
276 " </Field>\n"
277 "\n"
278 " <Field\n"
279 " name=\"colorSamples\"\n"
280 " type=\"UInt32\"\n"
281 " cardinality=\"single\"\n"
282 " visibility=\"external\"\n"
283 " access=\"public\"\n"
284 " defaultValue=\"0\"\n"
285 " >\n"
286 " </Field>\n"
287 "\n"
288 " <Field\n"
289 " name=\"coverageSamples\"\n"
290 " type=\"UInt32\"\n"
291 " cardinality=\"single\"\n"
292 " visibility=\"external\"\n"
293 " access=\"public\"\n"
294 " defaultValue=\"0\"\n"
295 " >\n"
296 " </Field>\n"
297 "\n"
298 " <Field\n"
299 " name=\"fixedSampleLocation\"\n"
300 " type=\"bool\"\n"
301 " cardinality=\"single\"\n"
302 " visibility=\"external\"\n"
303 " access=\"public\"\n"
304 " defaultValue=\"true\"\n"
305 " >\n"
306 " </Field>\n"
307 "\n"
308 "</FieldContainer>\n",
309 "Render buffer. Wraps OpenGL render buffer objects. RENDERBUFFER\n"
310 "A renderbuffer is a data storage object containing a single image of a renderable internal format.\n"
311 "\n"
312 "\\see TextureBuffer\n"
315 /*------------------------------ get -----------------------------------*/
317 FieldContainerType &RenderBufferBase::getType(void)
319 return _type;
322 const FieldContainerType &RenderBufferBase::getType(void) const
324 return _type;
327 UInt32 RenderBufferBase::getContainerSize(void) const
329 return sizeof(RenderBuffer);
332 /*------------------------- decorator get ------------------------------*/
335 SFGLenum *RenderBufferBase::editSFGLId(void)
337 editSField(GLIdFieldMask);
339 return &_sfGLId;
342 const SFGLenum *RenderBufferBase::getSFGLId(void) const
344 return &_sfGLId;
348 SFGLenum *RenderBufferBase::editSFInternalFormat(void)
350 editSField(InternalFormatFieldMask);
352 return &_sfInternalFormat;
355 const SFGLenum *RenderBufferBase::getSFInternalFormat(void) const
357 return &_sfInternalFormat;
361 //! Get the RenderBuffer::_sfImage field.
362 const SFUnrecImagePtr *RenderBufferBase::getSFImage(void) const
364 return &_sfImage;
367 SFUnrecImagePtr *RenderBufferBase::editSFImage (void)
369 editSField(ImageFieldMask);
371 return &_sfImage;
374 //! Get the value of the RenderBuffer::_sfImage field.
375 Image * RenderBufferBase::getImage(void) const
377 return _sfImage.getValue();
380 //! Set the value of the RenderBuffer::_sfImage field.
381 void RenderBufferBase::setImage(Image * const value)
383 editSField(ImageFieldMask);
385 _sfImage.setValue(value);
389 SFUInt32 *RenderBufferBase::editSFColorSamples(void)
391 editSField(ColorSamplesFieldMask);
393 return &_sfColorSamples;
396 const SFUInt32 *RenderBufferBase::getSFColorSamples(void) const
398 return &_sfColorSamples;
402 SFUInt32 *RenderBufferBase::editSFCoverageSamples(void)
404 editSField(CoverageSamplesFieldMask);
406 return &_sfCoverageSamples;
409 const SFUInt32 *RenderBufferBase::getSFCoverageSamples(void) const
411 return &_sfCoverageSamples;
415 SFBool *RenderBufferBase::editSFFixedSampleLocation(void)
417 editSField(FixedSampleLocationFieldMask);
419 return &_sfFixedSampleLocation;
422 const SFBool *RenderBufferBase::getSFFixedSampleLocation(void) const
424 return &_sfFixedSampleLocation;
432 /*------------------------------ access -----------------------------------*/
434 SizeT RenderBufferBase::getBinSize(ConstFieldMaskArg whichField)
436 SizeT returnValue = Inherited::getBinSize(whichField);
438 if(FieldBits::NoField != (GLIdFieldMask & whichField))
440 returnValue += _sfGLId.getBinSize();
442 if(FieldBits::NoField != (InternalFormatFieldMask & whichField))
444 returnValue += _sfInternalFormat.getBinSize();
446 if(FieldBits::NoField != (ImageFieldMask & whichField))
448 returnValue += _sfImage.getBinSize();
450 if(FieldBits::NoField != (ColorSamplesFieldMask & whichField))
452 returnValue += _sfColorSamples.getBinSize();
454 if(FieldBits::NoField != (CoverageSamplesFieldMask & whichField))
456 returnValue += _sfCoverageSamples.getBinSize();
458 if(FieldBits::NoField != (FixedSampleLocationFieldMask & whichField))
460 returnValue += _sfFixedSampleLocation.getBinSize();
463 return returnValue;
466 void RenderBufferBase::copyToBin(BinaryDataHandler &pMem,
467 ConstFieldMaskArg whichField)
469 Inherited::copyToBin(pMem, whichField);
471 if(FieldBits::NoField != (GLIdFieldMask & whichField))
473 _sfGLId.copyToBin(pMem);
475 if(FieldBits::NoField != (InternalFormatFieldMask & whichField))
477 _sfInternalFormat.copyToBin(pMem);
479 if(FieldBits::NoField != (ImageFieldMask & whichField))
481 _sfImage.copyToBin(pMem);
483 if(FieldBits::NoField != (ColorSamplesFieldMask & whichField))
485 _sfColorSamples.copyToBin(pMem);
487 if(FieldBits::NoField != (CoverageSamplesFieldMask & whichField))
489 _sfCoverageSamples.copyToBin(pMem);
491 if(FieldBits::NoField != (FixedSampleLocationFieldMask & whichField))
493 _sfFixedSampleLocation.copyToBin(pMem);
497 void RenderBufferBase::copyFromBin(BinaryDataHandler &pMem,
498 ConstFieldMaskArg whichField)
500 Inherited::copyFromBin(pMem, whichField);
502 if(FieldBits::NoField != (GLIdFieldMask & whichField))
504 editSField(GLIdFieldMask);
505 _sfGLId.copyFromBin(pMem);
507 if(FieldBits::NoField != (InternalFormatFieldMask & whichField))
509 editSField(InternalFormatFieldMask);
510 _sfInternalFormat.copyFromBin(pMem);
512 if(FieldBits::NoField != (ImageFieldMask & whichField))
514 editSField(ImageFieldMask);
515 _sfImage.copyFromBin(pMem);
517 if(FieldBits::NoField != (ColorSamplesFieldMask & whichField))
519 editSField(ColorSamplesFieldMask);
520 _sfColorSamples.copyFromBin(pMem);
522 if(FieldBits::NoField != (CoverageSamplesFieldMask & whichField))
524 editSField(CoverageSamplesFieldMask);
525 _sfCoverageSamples.copyFromBin(pMem);
527 if(FieldBits::NoField != (FixedSampleLocationFieldMask & whichField))
529 editSField(FixedSampleLocationFieldMask);
530 _sfFixedSampleLocation.copyFromBin(pMem);
534 //! create a new instance of the class
535 RenderBufferTransitPtr RenderBufferBase::createLocal(BitVector bFlags)
537 RenderBufferTransitPtr fc;
539 if(getClassType().getPrototype() != NULL)
541 FieldContainerTransitPtr tmpPtr =
542 getClassType().getPrototype()-> shallowCopyLocal(bFlags);
544 fc = dynamic_pointer_cast<RenderBuffer>(tmpPtr);
547 return fc;
550 //! create a new instance of the class, copy the container flags
551 RenderBufferTransitPtr RenderBufferBase::createDependent(BitVector bFlags)
553 RenderBufferTransitPtr fc;
555 if(getClassType().getPrototype() != NULL)
557 FieldContainerTransitPtr tmpPtr =
558 getClassType().getPrototype()-> shallowCopyDependent(bFlags);
560 fc = dynamic_pointer_cast<RenderBuffer>(tmpPtr);
563 return fc;
566 //! create a new instance of the class
567 RenderBufferTransitPtr RenderBufferBase::create(void)
569 RenderBufferTransitPtr fc;
571 if(getClassType().getPrototype() != NULL)
573 FieldContainerTransitPtr tmpPtr =
574 getClassType().getPrototype()-> shallowCopy();
576 fc = dynamic_pointer_cast<RenderBuffer>(tmpPtr);
579 return fc;
582 RenderBuffer *RenderBufferBase::createEmptyLocal(BitVector bFlags)
584 RenderBuffer *returnValue;
586 newPtr<RenderBuffer>(returnValue, bFlags);
588 returnValue->_pFieldFlags->_bNamespaceMask &= ~bFlags;
590 return returnValue;
593 //! create an empty new instance of the class, do not copy the prototype
594 RenderBuffer *RenderBufferBase::createEmpty(void)
596 RenderBuffer *returnValue;
598 newPtr<RenderBuffer>(returnValue, Thread::getCurrentLocalFlags());
600 returnValue->_pFieldFlags->_bNamespaceMask &=
601 ~Thread::getCurrentLocalFlags();
603 return returnValue;
607 FieldContainerTransitPtr RenderBufferBase::shallowCopyLocal(
608 BitVector bFlags) const
610 RenderBuffer *tmpPtr;
612 newPtr(tmpPtr, dynamic_cast<const RenderBuffer *>(this), bFlags);
614 FieldContainerTransitPtr returnValue(tmpPtr);
616 tmpPtr->_pFieldFlags->_bNamespaceMask &= ~bFlags;
618 return returnValue;
621 FieldContainerTransitPtr RenderBufferBase::shallowCopyDependent(
622 BitVector bFlags) const
624 RenderBuffer *tmpPtr;
626 newPtr(tmpPtr, dynamic_cast<const RenderBuffer *>(this), ~bFlags);
628 FieldContainerTransitPtr returnValue(tmpPtr);
630 tmpPtr->_pFieldFlags->_bNamespaceMask = bFlags;
632 return returnValue;
635 FieldContainerTransitPtr RenderBufferBase::shallowCopy(void) const
637 RenderBuffer *tmpPtr;
639 newPtr(tmpPtr,
640 dynamic_cast<const RenderBuffer *>(this),
641 Thread::getCurrentLocalFlags());
643 tmpPtr->_pFieldFlags->_bNamespaceMask &= ~Thread::getCurrentLocalFlags();
645 FieldContainerTransitPtr returnValue(tmpPtr);
647 return returnValue;
653 /*------------------------- constructors ----------------------------------*/
655 RenderBufferBase::RenderBufferBase(void) :
656 Inherited(),
657 _sfGLId (GLenum(0)),
658 _sfInternalFormat (GLenum(GL_NONE)),
659 _sfImage (NULL),
660 _sfColorSamples (UInt32(0)),
661 _sfCoverageSamples (UInt32(0)),
662 _sfFixedSampleLocation (bool(true))
666 RenderBufferBase::RenderBufferBase(const RenderBufferBase &source) :
667 Inherited(source),
668 _sfGLId (source._sfGLId ),
669 _sfInternalFormat (source._sfInternalFormat ),
670 _sfImage (NULL),
671 _sfColorSamples (source._sfColorSamples ),
672 _sfCoverageSamples (source._sfCoverageSamples ),
673 _sfFixedSampleLocation (source._sfFixedSampleLocation )
678 /*-------------------------- destructors ----------------------------------*/
680 RenderBufferBase::~RenderBufferBase(void)
684 void RenderBufferBase::onCreate(const RenderBuffer *source)
686 Inherited::onCreate(source);
688 if(source != NULL)
690 RenderBuffer *pThis = static_cast<RenderBuffer *>(this);
692 pThis->setImage(source->getImage());
696 GetFieldHandlePtr RenderBufferBase::getHandleGLId (void) const
698 SFGLenum::GetHandlePtr returnValue(
699 new SFGLenum::GetHandle(
700 &_sfGLId,
701 this->getType().getFieldDesc(GLIdFieldId),
702 const_cast<RenderBufferBase *>(this)));
704 return returnValue;
707 EditFieldHandlePtr RenderBufferBase::editHandleGLId (void)
709 SFGLenum::EditHandlePtr returnValue(
710 new SFGLenum::EditHandle(
711 &_sfGLId,
712 this->getType().getFieldDesc(GLIdFieldId),
713 this));
716 editSField(GLIdFieldMask);
718 return returnValue;
721 GetFieldHandlePtr RenderBufferBase::getHandleInternalFormat (void) const
723 SFGLenum::GetHandlePtr returnValue(
724 new SFGLenum::GetHandle(
725 &_sfInternalFormat,
726 this->getType().getFieldDesc(InternalFormatFieldId),
727 const_cast<RenderBufferBase *>(this)));
729 return returnValue;
732 EditFieldHandlePtr RenderBufferBase::editHandleInternalFormat (void)
734 SFGLenum::EditHandlePtr returnValue(
735 new SFGLenum::EditHandle(
736 &_sfInternalFormat,
737 this->getType().getFieldDesc(InternalFormatFieldId),
738 this));
741 editSField(InternalFormatFieldMask);
743 return returnValue;
746 GetFieldHandlePtr RenderBufferBase::getHandleImage (void) const
748 SFUnrecImagePtr::GetHandlePtr returnValue(
749 new SFUnrecImagePtr::GetHandle(
750 &_sfImage,
751 this->getType().getFieldDesc(ImageFieldId),
752 const_cast<RenderBufferBase *>(this)));
754 return returnValue;
757 EditFieldHandlePtr RenderBufferBase::editHandleImage (void)
759 SFUnrecImagePtr::EditHandlePtr returnValue(
760 new SFUnrecImagePtr::EditHandle(
761 &_sfImage,
762 this->getType().getFieldDesc(ImageFieldId),
763 this));
765 returnValue->setSetMethod(
766 boost::bind(&RenderBuffer::setImage,
767 static_cast<RenderBuffer *>(this), _1));
769 editSField(ImageFieldMask);
771 return returnValue;
774 GetFieldHandlePtr RenderBufferBase::getHandleColorSamples (void) const
776 SFUInt32::GetHandlePtr returnValue(
777 new SFUInt32::GetHandle(
778 &_sfColorSamples,
779 this->getType().getFieldDesc(ColorSamplesFieldId),
780 const_cast<RenderBufferBase *>(this)));
782 return returnValue;
785 EditFieldHandlePtr RenderBufferBase::editHandleColorSamples (void)
787 SFUInt32::EditHandlePtr returnValue(
788 new SFUInt32::EditHandle(
789 &_sfColorSamples,
790 this->getType().getFieldDesc(ColorSamplesFieldId),
791 this));
794 editSField(ColorSamplesFieldMask);
796 return returnValue;
799 GetFieldHandlePtr RenderBufferBase::getHandleCoverageSamples (void) const
801 SFUInt32::GetHandlePtr returnValue(
802 new SFUInt32::GetHandle(
803 &_sfCoverageSamples,
804 this->getType().getFieldDesc(CoverageSamplesFieldId),
805 const_cast<RenderBufferBase *>(this)));
807 return returnValue;
810 EditFieldHandlePtr RenderBufferBase::editHandleCoverageSamples(void)
812 SFUInt32::EditHandlePtr returnValue(
813 new SFUInt32::EditHandle(
814 &_sfCoverageSamples,
815 this->getType().getFieldDesc(CoverageSamplesFieldId),
816 this));
819 editSField(CoverageSamplesFieldMask);
821 return returnValue;
824 GetFieldHandlePtr RenderBufferBase::getHandleFixedSampleLocation (void) const
826 SFBool::GetHandlePtr returnValue(
827 new SFBool::GetHandle(
828 &_sfFixedSampleLocation,
829 this->getType().getFieldDesc(FixedSampleLocationFieldId),
830 const_cast<RenderBufferBase *>(this)));
832 return returnValue;
835 EditFieldHandlePtr RenderBufferBase::editHandleFixedSampleLocation(void)
837 SFBool::EditHandlePtr returnValue(
838 new SFBool::EditHandle(
839 &_sfFixedSampleLocation,
840 this->getType().getFieldDesc(FixedSampleLocationFieldId),
841 this));
844 editSField(FixedSampleLocationFieldMask);
846 return returnValue;
850 #ifdef OSG_MT_CPTR_ASPECT
851 void RenderBufferBase::execSyncV( FieldContainer &oFrom,
852 ConstFieldMaskArg whichField,
853 AspectOffsetStore &oOffsets,
854 ConstFieldMaskArg syncMode,
855 const UInt32 uiSyncInfo)
857 RenderBuffer *pThis = static_cast<RenderBuffer *>(this);
859 pThis->execSync(static_cast<RenderBuffer *>(&oFrom),
860 whichField,
861 oOffsets,
862 syncMode,
863 uiSyncInfo);
865 #endif
868 #ifdef OSG_MT_CPTR_ASPECT
869 FieldContainer *RenderBufferBase::createAspectCopy(
870 const FieldContainer *pRefAspect) const
872 RenderBuffer *returnValue;
874 newAspectCopy(returnValue,
875 dynamic_cast<const RenderBuffer *>(pRefAspect),
876 dynamic_cast<const RenderBuffer *>(this));
878 return returnValue;
880 #endif
882 void RenderBufferBase::resolveLinks(void)
884 Inherited::resolveLinks();
886 static_cast<RenderBuffer *>(this)->setImage(NULL);
892 OSG_END_NAMESPACE