fixed: auto_ptr -> unique_ptr
[opensg.git] / Source / System / Window / FrameBufferObjects / OSGLayeredTextureBufferBase.h
blobe4957e373059c62942d373430056266eb50522f5
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 LayeredTextureBuffer
49 ** **
50 *****************************************************************************
51 \*****************************************************************************/
54 #ifndef _OSGLAYEREDTEXTUREBUFFERBASE_H_
55 #define _OSGLAYEREDTEXTUREBUFFERBASE_H_
56 #ifdef __sgi
57 #pragma once
58 #endif
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"
74 OSG_BEGIN_NAMESPACE
77 class LayeredTextureBuffer;
79 //! \brief LayeredTextureBuffer Base Class.
81 class OSG_SYSTEM_DLLMAPPING LayeredTextureBufferBase : public FrameBufferAttachment
83 public:
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 =================================*/
95 public:
97 enum
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 */
124 /*! \{ */
126 static FieldContainerType &getClassType (void);
127 static UInt32 getClassTypeId (void);
128 static UInt16 getClassGroupId(void);
130 /*! \} */
131 /*---------------------------------------------------------------------*/
132 /*! \name FieldContainer Get */
133 /*! \{ */
135 virtual FieldContainerType &getType (void);
136 virtual const FieldContainerType &getType (void) const;
138 virtual UInt32 getContainerSize(void) const;
140 /*! \} */
141 /*---------------------------------------------------------------------*/
142 /*! \name Field Get */
143 /*! \{ */
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;
169 /*! \} */
170 /*---------------------------------------------------------------------*/
171 /*! \name Field Set */
172 /*! \{ */
174 void setTexture (TextureObjChunk * const value);
175 void setTexTarget (const GLenum &value);
176 void setLevel (const UInt32 value);
177 void setZoffset (const UInt32 value);
179 /*! \} */
180 /*---------------------------------------------------------------------*/
181 /*! \name Ptr Field Set */
182 /*! \{ */
184 /*! \} */
185 /*---------------------------------------------------------------------*/
186 /*! \name Ptr MField Set */
187 /*! \{ */
189 /*! \} */
190 /*---------------------------------------------------------------------*/
191 /*! \name Binary Access */
192 /*! \{ */
194 virtual SizeT getBinSize (ConstFieldMaskArg whichField);
195 virtual void copyToBin (BinaryDataHandler &pMem,
196 ConstFieldMaskArg whichField);
197 virtual void copyFromBin(BinaryDataHandler &pMem,
198 ConstFieldMaskArg whichField);
201 /*! \} */
202 /*---------------------------------------------------------------------*/
203 /*! \name Construction */
204 /*! \{ */
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);
217 /*! \} */
218 /*---------------------------------------------------------------------*/
219 /*! \name Copy */
220 /*! \{ */
222 virtual FieldContainerTransitPtr shallowCopy (void) const;
223 virtual FieldContainerTransitPtr shallowCopyLocal(
224 BitVector bFlags = FCLocal::All) const;
225 virtual FieldContainerTransitPtr shallowCopyDependent(
226 BitVector bFlags) const;
228 /*! \} */
229 /*========================= PROTECTED ===============================*/
231 protected:
233 static TypeObject _type;
235 static void classDescInserter(TypeObject &oType);
236 static const Char8 *getClassname (void );
238 /*---------------------------------------------------------------------*/
239 /*! \name Fields */
240 /*! \{ */
242 SFUnrecTextureObjChunkPtr _sfTexture;
243 SFGLenum _sfTexTarget;
244 SFUInt32 _sfLevel;
245 SFUInt32 _sfZoffset;
247 /*! \} */
248 /*---------------------------------------------------------------------*/
249 /*! \name Constructors */
250 /*! \{ */
252 LayeredTextureBufferBase(void);
253 LayeredTextureBufferBase(const LayeredTextureBufferBase &source);
255 /*! \} */
256 /*---------------------------------------------------------------------*/
257 /*! \name Destructors */
258 /*! \{ */
260 virtual ~LayeredTextureBufferBase(void);
262 /*! \} */
263 /*---------------------------------------------------------------------*/
264 /*! \name onCreate */
265 /*! \{ */
267 void onCreate(const LayeredTextureBuffer *source = NULL);
269 /*! \} */
270 /*---------------------------------------------------------------------*/
271 /*! \name Generic Field Access */
272 /*! \{ */
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);
283 /*! \} */
284 /*---------------------------------------------------------------------*/
285 /*! \name Sync */
286 /*! \{ */
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);
300 #endif
302 /*! \} */
303 /*---------------------------------------------------------------------*/
304 /*! \name Edit */
305 /*! \{ */
307 /*! \} */
308 /*---------------------------------------------------------------------*/
309 /*! \name Aspect Create */
310 /*! \{ */
312 #ifdef OSG_MT_CPTR_ASPECT
313 virtual FieldContainer *createAspectCopy(
314 const FieldContainer *pRefAspect) const;
315 #endif
317 /*! \} */
318 /*---------------------------------------------------------------------*/
319 /*! \name Edit */
320 /*! \{ */
321 /*! \} */
322 /*---------------------------------------------------------------------*/
323 /*! \name Sync */
324 /*! \{ */
326 virtual void resolveLinks(void);
328 /*! \} */
329 /*========================== PRIVATE ================================*/
331 private:
332 /*---------------------------------------------------------------------*/
334 // prohibit default functions (move to 'public' if you need one)
335 void operator =(const LayeredTextureBufferBase &source);
338 typedef LayeredTextureBufferBase *LayeredTextureBufferBaseP;
340 OSG_END_NAMESPACE
342 #endif /* _OSGLAYEREDTEXTUREBUFFERBASE_H_ */