1 /*---------------------------------------------------------------------------*\
5 * Copyright (C) 2003 by the OpenSG Forum *
9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de *
11 \*---------------------------------------------------------------------------*/
12 /*---------------------------------------------------------------------------*\
15 * This library is free software; you can redistribute it and/or modify it *
16 * under the terms of the GNU Library General Public License as published *
17 * by the Free Software Foundation, version 2. *
19 * This library is distributed in the hope that it will be useful, but *
20 * WITHOUT ANY WARRANTY; without even the implied warranty of *
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
22 * Library General Public License for more details. *
24 * You should have received a copy of the GNU Library General Public *
25 * License along with this library; if not, write to the Free Software *
26 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
28 \*---------------------------------------------------------------------------*/
29 /*---------------------------------------------------------------------------*\
37 \*---------------------------------------------------------------------------*/
41 template <class ParentT> inline
42 bool ComputeElementHandlerMixin<ParentT>::requestRun(void)
44 Self::editSField(Self::RequestRunFieldMask);
49 template <class ParentT> inline
50 void ComputeElementHandlerMixin<ParentT>::changed(ConstFieldMaskArg whichField,
55 if(0x0000 != (whichField & RequestRunFieldMask))
57 Window::requestStageRun(_iStageId);
61 Inherited::changed(whichField, origin, details);
65 template <class ParentT> inline
66 void ComputeElementHandlerMixin<ParentT>::setData(TraversalData *pData,
68 RenderActionBase *pAction )
70 Inherited::setData(pData, iDataSlotId, pAction);
74 template <class ParentT> inline
75 void ComputeElementHandlerMixin<ParentT>::setData(
76 HardwareContextData *pData,
78 HardwareContext *pContext )
80 HardwareContextData *pStoredData =
81 pContext->template getData<HardwareContextData *>(this->_iDataSlotId);
83 OSG_ASSERT(iDataSlotId == this->_iDataSlotId);
85 if(pStoredData == NULL)
87 pContext->setData(pData, this->_iDataSlotId);
89 if(this->hasDestroyedFunctor(
90 boost::bind(&ContextDataSlotHandler::clearData,
94 this->_iDataSlotId)) == false)
96 this->addDestroyedFunctor(
97 boost::bind(&ContextDataSlotHandler::clearData,
98 static_cast<ContextDataSlotHandler *>(pContext),
101 this->_iDataSlotId), "");
103 pContext->addDestroyedFunctorFor(
104 boost::bind(&Self::template clearDestroyedFunctorFor<
105 ContextDataSlotHandler>,
113 /*-------------------------------------------------------------------------*/
116 /*-------------------------------------------------------------------------*/
119 /*-------------------------------------------------------------------------*/
123 /*-------------------------------------------------------------------------*/
126 template <class ParentT> inline
127 ComputeElementHandlerMixin<ParentT>::ComputeElementHandlerMixin(void) :
131 _tmpStatus = StageValidator::Finished;
135 template <class ParentT> inline
136 ComputeElementHandlerMixin<ParentT>::ComputeElementHandlerMixin(
137 const ComputeElementHandlerMixin &source) :
142 _tmpStatus = StageValidator::Finished;
146 template <class ParentT> inline
147 ComputeElementHandlerMixin<ParentT>::~ComputeElementHandlerMixin(void)
151 template <class ParentT> inline
152 void ComputeElementHandlerMixin<ParentT>::dump( UInt32 uiIndent,
153 const BitVector bvFlags ) const
157 /*-------------------------------------------------------------------------*/
160 /*-------------------------------------------------------------------------*/
163 /*-------------------------------------------------------------------------*/