changed: gcc8 base update
[opensg.git] / Source / System / Window / FrameBufferObjects / OSGTextureBufferBase.h
blobf35e37d2639d20e50689cd48fdec0fa2b9b0ae97
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 TextureBuffer
49 ** **
50 *****************************************************************************
51 \*****************************************************************************/
54 #ifndef _OSGTEXTUREBUFFERBASE_H_
55 #define _OSGTEXTUREBUFFERBASE_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 "OSGTextureBufferFields.h"
74 OSG_BEGIN_NAMESPACE
77 class TextureBuffer;
79 //! \brief TextureBuffer Base Class.
81 class OSG_SYSTEM_DLLMAPPING TextureBufferBase : 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(TextureBuffer);
93 /*========================== PUBLIC =================================*/
95 public:
97 enum
99 TextureFieldId = Inherited::NextFieldId,
100 TexTargetFieldId = TextureFieldId + 1,
101 LevelFieldId = TexTargetFieldId + 1,
102 LayerFieldId = LevelFieldId + 1,
103 NextFieldId = LayerFieldId + 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 LayerFieldMask =
113 (TypeTraits<BitVector>::One << LayerFieldId);
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 SFLayerType;
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 *editSFLayer (void);
155 const SFUInt32 *getSFLayer (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 &editLayer (void);
167 UInt32 getLayer (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 setLayer (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 TextureBufferTransitPtr create (void);
207 static TextureBuffer *createEmpty (void);
209 static TextureBufferTransitPtr createLocal (
210 BitVector bFlags = FCLocal::All);
212 static TextureBuffer *createEmptyLocal(
213 BitVector bFlags = FCLocal::All);
215 static TextureBufferTransitPtr 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 _sfLayer;
247 /*! \} */
248 /*---------------------------------------------------------------------*/
249 /*! \name Constructors */
250 /*! \{ */
252 TextureBufferBase(void);
253 TextureBufferBase(const TextureBufferBase &source);
255 /*! \} */
256 /*---------------------------------------------------------------------*/
257 /*! \name Destructors */
258 /*! \{ */
260 virtual ~TextureBufferBase(void);
262 /*! \} */
263 /*---------------------------------------------------------------------*/
264 /*! \name onCreate */
265 /*! \{ */
267 void onCreate(const TextureBuffer *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 getHandleLayer (void) const;
281 EditFieldHandlePtr editHandleLayer (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 ( TextureBufferBase *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 TextureBufferBase &source);
338 typedef TextureBufferBase *TextureBufferBaseP;
340 OSG_END_NAMESPACE
342 #endif /* _OSGTEXTUREBUFFERBASE_H_ */