1 /*---------------------------------------------------------------------------*\
5 * Copyright (C) 2000-2013 by the OpenSG Forum *
9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, carsten_neumann@gmx.net *
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 \*---------------------------------------------------------------------------*/
39 /*****************************************************************************\
40 *****************************************************************************
42 ** This file is automatically generated. **
44 ** Any changes made to this file WILL be lost when it is **
45 ** regenerated, which can become necessary at any time. **
47 ** Do not change this file, changes should be done in the derived **
48 ** class LayeredTextureBuffer
50 *****************************************************************************
51 \*****************************************************************************/
54 #ifndef _OSGLAYEREDTEXTUREBUFFERBASE_H_
55 #define _OSGLAYEREDTEXTUREBUFFERBASE_H_
61 #include "OSGConfig.h"
62 #include "OSGSystemDef.h"
64 //#include "OSGBaseTypes.h"
66 #include "OSGFrameBufferAttachment.h" // Parent
68 #include "OSGTextureObjChunkFields.h" // Texture type
69 #include "OSGBaseFields.h" // TexTarget type
70 #include "OSGSysFields.h" // Level type
72 #include "OSGLayeredTextureBufferFields.h"
77 class LayeredTextureBuffer
;
79 //! \brief LayeredTextureBuffer Base Class.
81 class OSG_SYSTEM_DLLMAPPING LayeredTextureBufferBase
: public FrameBufferAttachment
85 typedef FrameBufferAttachment Inherited
;
86 typedef FrameBufferAttachment ParentContainer
;
88 typedef Inherited::TypeObject TypeObject
;
89 typedef TypeObject::InitPhase InitPhase
;
91 OSG_GEN_INTERNALPTR(LayeredTextureBuffer
);
93 /*========================== PUBLIC =================================*/
99 TextureFieldId
= Inherited::NextFieldId
,
100 TexTargetFieldId
= TextureFieldId
+ 1,
101 LevelFieldId
= TexTargetFieldId
+ 1,
102 ZoffsetFieldId
= LevelFieldId
+ 1,
103 NextFieldId
= ZoffsetFieldId
+ 1
106 static const OSG::BitVector TextureFieldMask
=
107 (TypeTraits
<BitVector
>::One
<< TextureFieldId
);
108 static const OSG::BitVector TexTargetFieldMask
=
109 (TypeTraits
<BitVector
>::One
<< TexTargetFieldId
);
110 static const OSG::BitVector LevelFieldMask
=
111 (TypeTraits
<BitVector
>::One
<< LevelFieldId
);
112 static const OSG::BitVector ZoffsetFieldMask
=
113 (TypeTraits
<BitVector
>::One
<< ZoffsetFieldId
);
114 static const OSG::BitVector NextFieldMask
=
115 (TypeTraits
<BitVector
>::One
<< NextFieldId
);
117 typedef SFUnrecTextureObjChunkPtr SFTextureType
;
118 typedef SFGLenum SFTexTargetType
;
119 typedef SFUInt32 SFLevelType
;
120 typedef SFUInt32 SFZoffsetType
;
122 /*---------------------------------------------------------------------*/
123 /*! \name Class Get */
126 static FieldContainerType
&getClassType (void);
127 static UInt32
getClassTypeId (void);
128 static UInt16
getClassGroupId(void);
131 /*---------------------------------------------------------------------*/
132 /*! \name FieldContainer Get */
135 virtual FieldContainerType
&getType (void);
136 virtual const FieldContainerType
&getType (void) const;
138 virtual UInt32
getContainerSize(void) const;
141 /*---------------------------------------------------------------------*/
142 /*! \name Field Get */
145 const SFUnrecTextureObjChunkPtr
*getSFTexture (void) const;
146 SFUnrecTextureObjChunkPtr
*editSFTexture (void);
148 SFGLenum
*editSFTexTarget (void);
149 const SFGLenum
*getSFTexTarget (void) const;
151 SFUInt32
*editSFLevel (void);
152 const SFUInt32
*getSFLevel (void) const;
154 SFUInt32
*editSFZoffset (void);
155 const SFUInt32
*getSFZoffset (void) const;
158 TextureObjChunk
* getTexture (void) const;
160 GLenum
&editTexTarget (void);
161 const GLenum
&getTexTarget (void) const;
163 UInt32
&editLevel (void);
164 UInt32
getLevel (void) const;
166 UInt32
&editZoffset (void);
167 UInt32
getZoffset (void) const;
170 /*---------------------------------------------------------------------*/
171 /*! \name Field Set */
174 void setTexture (TextureObjChunk
* const value
);
175 void setTexTarget (const GLenum
&value
);
176 void setLevel (const UInt32 value
);
177 void setZoffset (const UInt32 value
);
180 /*---------------------------------------------------------------------*/
181 /*! \name Ptr Field Set */
185 /*---------------------------------------------------------------------*/
186 /*! \name Ptr MField Set */
190 /*---------------------------------------------------------------------*/
191 /*! \name Binary Access */
194 virtual SizeT
getBinSize (ConstFieldMaskArg whichField
);
195 virtual void copyToBin (BinaryDataHandler
&pMem
,
196 ConstFieldMaskArg whichField
);
197 virtual void copyFromBin(BinaryDataHandler
&pMem
,
198 ConstFieldMaskArg whichField
);
202 /*---------------------------------------------------------------------*/
203 /*! \name Construction */
206 static LayeredTextureBufferTransitPtr
create (void);
207 static LayeredTextureBuffer
*createEmpty (void);
209 static LayeredTextureBufferTransitPtr
createLocal (
210 BitVector bFlags
= FCLocal::All
);
212 static LayeredTextureBuffer
*createEmptyLocal(
213 BitVector bFlags
= FCLocal::All
);
215 static LayeredTextureBufferTransitPtr
createDependent (BitVector bFlags
);
218 /*---------------------------------------------------------------------*/
222 virtual FieldContainerTransitPtr
shallowCopy (void) const;
223 virtual FieldContainerTransitPtr
shallowCopyLocal(
224 BitVector bFlags
= FCLocal::All
) const;
225 virtual FieldContainerTransitPtr
shallowCopyDependent(
226 BitVector bFlags
) const;
229 /*========================= PROTECTED ===============================*/
233 static TypeObject _type
;
235 static void classDescInserter(TypeObject
&oType
);
236 static const Char8
*getClassname (void );
238 /*---------------------------------------------------------------------*/
242 SFUnrecTextureObjChunkPtr _sfTexture
;
243 SFGLenum _sfTexTarget
;
248 /*---------------------------------------------------------------------*/
249 /*! \name Constructors */
252 LayeredTextureBufferBase(void);
253 LayeredTextureBufferBase(const LayeredTextureBufferBase
&source
);
256 /*---------------------------------------------------------------------*/
257 /*! \name Destructors */
260 virtual ~LayeredTextureBufferBase(void);
263 /*---------------------------------------------------------------------*/
264 /*! \name onCreate */
267 void onCreate(const LayeredTextureBuffer
*source
= NULL
);
270 /*---------------------------------------------------------------------*/
271 /*! \name Generic Field Access */
274 GetFieldHandlePtr
getHandleTexture (void) const;
275 EditFieldHandlePtr
editHandleTexture (void);
276 GetFieldHandlePtr
getHandleTexTarget (void) const;
277 EditFieldHandlePtr
editHandleTexTarget (void);
278 GetFieldHandlePtr
getHandleLevel (void) const;
279 EditFieldHandlePtr
editHandleLevel (void);
280 GetFieldHandlePtr
getHandleZoffset (void) const;
281 EditFieldHandlePtr
editHandleZoffset (void);
284 /*---------------------------------------------------------------------*/
288 #ifdef OSG_MT_CPTR_ASPECT
289 virtual void execSyncV( FieldContainer
&oFrom
,
290 ConstFieldMaskArg whichField
,
291 AspectOffsetStore
&oOffsets
,
292 ConstFieldMaskArg syncMode
,
293 const UInt32 uiSyncInfo
);
295 void execSync ( LayeredTextureBufferBase
*pFrom
,
296 ConstFieldMaskArg whichField
,
297 AspectOffsetStore
&oOffsets
,
298 ConstFieldMaskArg syncMode
,
299 const UInt32 uiSyncInfo
);
303 /*---------------------------------------------------------------------*/
308 /*---------------------------------------------------------------------*/
309 /*! \name Aspect Create */
312 #ifdef OSG_MT_CPTR_ASPECT
313 virtual FieldContainer
*createAspectCopy(
314 const FieldContainer
*pRefAspect
) const;
318 /*---------------------------------------------------------------------*/
322 /*---------------------------------------------------------------------*/
326 virtual void resolveLinks(void);
329 /*========================== PRIVATE ================================*/
332 /*---------------------------------------------------------------------*/
334 // prohibit default functions (move to 'public' if you need one)
335 void operator =(const LayeredTextureBufferBase
&source
);
338 typedef LayeredTextureBufferBase
*LayeredTextureBufferBaseP
;
342 #endif /* _OSGLAYEREDTEXTUREBUFFERBASE_H_ */