1 /*---------------------------------------------------------------------------*\
5 * Copyright (C) 2000-2013 by the OpenSG Forum *
7 * contact: dirk@opensg.org, gerrit.voss@vossg.org, carsten_neumann@gmx.net *
9 \*---------------------------------------------------------------------------*/
10 /*---------------------------------------------------------------------------*\
13 * This library is free software; you can redistribute it and/or modify it *
14 * under the terms of the GNU Library General Public License as published *
15 * by the Free Software Foundation, version 2. *
17 * This library is distributed in the hope that it will be useful, but *
18 * WITHOUT ANY WARRANTY; without even the implied warranty of *
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
20 * Library General Public License for more details. *
22 * You should have received a copy of the GNU Library General Public *
23 * License along with this library; if not, write to the Free Software *
24 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
26 \*---------------------------------------------------------------------------*/
27 /*---------------------------------------------------------------------------*\
35 \*---------------------------------------------------------------------------*/
37 /*****************************************************************************\
38 *****************************************************************************
40 ** This file is automatically generated. **
42 ** Any changes made to this file WILL be lost when it is **
43 ** regenerated, which can become necessary at any time. **
45 ** Do not change this file, changes should be done in the derived **
46 ** class ComputeShaderChunk!
48 *****************************************************************************
49 \*****************************************************************************/
55 //! access the type of the class
57 OSG::FieldContainerType &ComputeShaderChunkBase::getClassType(void)
62 //! access the numerical type of the class
64 OSG::UInt32 ComputeShaderChunkBase::getClassTypeId(void)
70 OSG::UInt16 ComputeShaderChunkBase::getClassGroupId(void)
72 return _type.getGroupId();
75 /*------------------------------ get -----------------------------------*/
77 //! Get the value of the ComputeShaderChunk::_sfComputeProgram field.
80 std::string &ComputeShaderChunkBase::editComputeProgram(void)
82 editSField(ComputeProgramFieldMask);
84 return _sfComputeProgram.getValue();
87 //! Get the value of the ComputeShaderChunk::_sfComputeProgram field.
89 const std::string &ComputeShaderChunkBase::getComputeProgram(void) const
91 return _sfComputeProgram.getValue();
94 //! Set the value of the ComputeShaderChunk::_sfComputeProgram field.
96 void ComputeShaderChunkBase::setComputeProgram(const std::string &value)
98 editSField(ComputeProgramFieldMask);
100 _sfComputeProgram.setValue(value);
102 //! Get the value of the ComputeShaderChunk::_sfGLId field.
105 UInt32 &ComputeShaderChunkBase::editGLId(void)
107 editSField(GLIdFieldMask);
109 return _sfGLId.getValue();
112 //! Get the value of the ComputeShaderChunk::_sfGLId field.
114 UInt32 ComputeShaderChunkBase::getGLId(void) const
116 return _sfGLId.getValue();
119 //! Set the value of the ComputeShaderChunk::_sfGLId field.
121 void ComputeShaderChunkBase::setGLId(const UInt32 value)
123 editSField(GLIdFieldMask);
125 _sfGLId.setValue(value);
129 //! Get the value of the \a index element the ComputeShaderChunk::_mfVariableLocations field.
131 Int32 ComputeShaderChunkBase::getVariableLocations(const UInt32 index) const
133 return _mfVariableLocations[index];
137 MFInt32 ::reference ComputeShaderChunkBase::editVariableLocations(const UInt32 index)
139 editMField(VariableLocationsFieldMask, _mfVariableLocations);
141 return _mfVariableLocations[index];
144 //! Get the value of the \a index element the ComputeShaderChunk::_mfProceduralVariableLocations field.
146 Int32 ComputeShaderChunkBase::getProceduralVariableLocations(const UInt32 index) const
148 return _mfProceduralVariableLocations[index];
152 MFInt32 ::reference ComputeShaderChunkBase::editProceduralVariableLocations(const UInt32 index)
154 editMField(ProceduralVariableLocationsFieldMask, _mfProceduralVariableLocations);
156 return _mfProceduralVariableLocations[index];
160 #ifdef OSG_MT_CPTR_ASPECT
162 void ComputeShaderChunkBase::execSync ( ComputeShaderChunkBase *pFrom,
163 ConstFieldMaskArg whichField,
164 AspectOffsetStore &oOffsets,
165 ConstFieldMaskArg syncMode,
166 const UInt32 uiSyncInfo)
168 Inherited::execSync(pFrom, whichField, oOffsets, syncMode, uiSyncInfo);
170 if(FieldBits::NoField != (ComputeShaderFieldMask & whichField))
171 _mfComputeShader.syncWith(pFrom->_mfComputeShader,
176 if(FieldBits::NoField != (ComputeProgramFieldMask & whichField))
177 _sfComputeProgram.syncWith(pFrom->_sfComputeProgram);
179 if(FieldBits::NoField != (VariablesFieldMask & whichField))
180 _sfVariables.syncWith(pFrom->_sfVariables);
182 if(FieldBits::NoField != (VariableLocationsFieldMask & whichField))
183 _mfVariableLocations.syncWith(pFrom->_mfVariableLocations,
188 if(FieldBits::NoField != (ProceduralVariableLocationsFieldMask & whichField))
189 _mfProceduralVariableLocations.syncWith(pFrom->_mfProceduralVariableLocations,
194 if(FieldBits::NoField != (GLIdFieldMask & whichField))
195 _sfGLId.syncWith(pFrom->_sfGLId);
201 const Char8 *ComputeShaderChunkBase::getClassname(void)
203 return "ComputeShaderChunk";
205 OSG_GEN_CONTAINERPTR(ComputeShaderChunk);