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 #ifndef _OSGUNIFORMBUFFEROBJBASECHUNK_H_
40 #define _OSGUNIFORMBUFFEROBJBASECHUNK_H_
45 #include "OSGUniformBufferObjBaseChunkBase.h"
49 /*! \brief UniformBufferObjBaseChunk class. See \ref
50 PageSystemUniformBufferObjBaseChunk for a description.
53 class OSG_SYSTEM_DLLMAPPING UniformBufferObjBaseChunk
: public UniformBufferObjBaseChunkBase
57 /*========================== PUBLIC =================================*/
61 typedef UniformBufferObjBaseChunkBase Inherited
;
62 typedef UniformBufferObjBaseChunk Self
;
64 /*---------------------------------------------------------------------*/
65 /*! \name Chunk Class Access */
68 virtual const StateChunkClass
*getClass(void) const;
71 /*---------------------------------------------------------------------*/
72 /*! \name Static Chunk Class Access */
75 static UInt32
getStaticClassId(void);
76 static const StateChunkClass
*getStaticClass (void);
79 /*---------------------------------------------------------------------*/
83 virtual UInt16
getChunkId(void);
87 /*---------------------------------------------------------------------*/
91 virtual void changed(ConstFieldMaskArg whichField
,
96 /*---------------------------------------------------------------------*/
100 virtual void dump( UInt32 uiIndent
= 0,
101 const BitVector bvFlags
= 0) const;
104 /*---------------------------------------------------------------------*/
108 virtual void validate (DrawEnv
*pEnv
) = 0;
109 virtual Int32
getOpenGLId (DrawEnv
*pEnv
) = 0;
112 /*========================= PROTECTED ===============================*/
117 // Variables should all be in UniformBufferObjBaseChunkBase.
118 /*---------------------------------------------------------------------*/
122 void onCreate (const UniformBufferObjBaseChunk
*source
= NULL
);
123 void onCreateAspect(const UniformBufferObjBaseChunk
*createAspect
,
124 const UniformBufferObjBaseChunk
*source
= NULL
);
127 /*---------------------------------------------------------------------*/
128 /*! \name Constructors */
131 UniformBufferObjBaseChunk(void);
132 UniformBufferObjBaseChunk(const UniformBufferObjBaseChunk
&source
);
135 /*---------------------------------------------------------------------*/
136 /*! \name Destructors */
139 virtual ~UniformBufferObjBaseChunk(void);
142 /*---------------------------------------------------------------------*/
146 static void initMethod(InitPhase ePhase
);
148 static StateChunkClass _class
;
149 static volatile UInt16 _uiChunkCounter
;
152 /*========================== PRIVATE ================================*/
156 friend class FieldContainer
;
157 friend class UniformBufferObjBaseChunkBase
;
159 // prohibit default functions (move to 'public' if you need one)
160 void operator =(const UniformBufferObjBaseChunk
&source
);
163 typedef UniformBufferObjBaseChunk
*UniformBufferObjBaseChunkP
;
167 #include "OSGUniformBufferObjBaseChunkBase.inl"
168 #include "OSGUniformBufferObjBaseChunk.inl"
170 #endif /* _OSGUNIFORMBUFFEROBJBASECHUNK_H_ */