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 //---------------------------------------------------------------------------
41 //---------------------------------------------------------------------------
46 #include <boost/bind.hpp>
48 #include "OSGConfig.h"
53 #include "OSGWindow.h"
55 #include "OSGGLFuncProtos.h"
57 #include "OSGDrawEnv.h"
59 #include "OSGUniformBufferObjBaseChunk.h"
63 // Documentation for this class is emitted in the
64 // OSGUniformBufferObjBaseChunkBase.cpp file.
65 // To modify it, please change the .fcd file (OSGUniformBufferObjBaseChunk.fcd) and
66 // regenerate the base file.
68 /***************************************************************************\
70 \***************************************************************************/
72 StateChunkClass
UniformBufferObjBaseChunk::_class("UniformBuffer",
73 osgMaxUniformBufferBindings
, // number if slots
76 volatile UInt16
UniformBufferObjBaseChunk::_uiChunkCounter
= 1;
78 /***************************************************************************\
80 \***************************************************************************/
82 void UniformBufferObjBaseChunk::initMethod(InitPhase ePhase
)
84 Inherited::initMethod(ePhase
);
86 if(ePhase
== TypeObject::SystemPost
)
92 /***************************************************************************\
94 \***************************************************************************/
96 /*-------------------------------------------------------------------------*\
98 \*-------------------------------------------------------------------------*/
100 /*----------------------- constructors & destructors ----------------------*/
102 UniformBufferObjBaseChunk::UniformBufferObjBaseChunk(void) :
108 UniformBufferObjBaseChunk::UniformBufferObjBaseChunk(const UniformBufferObjBaseChunk
&source
) :
114 UniformBufferObjBaseChunk::~UniformBufferObjBaseChunk(void)
118 /*----------------------------- class specific ----------------------------*/
120 const StateChunkClass
*UniformBufferObjBaseChunk::getClass(void) const
125 void UniformBufferObjBaseChunk::changed(ConstFieldMaskArg whichField
,
129 Inherited::changed(whichField
, origin
, details
);
132 /*----------------------------- onCreate --------------------------------*/
134 void UniformBufferObjBaseChunk::onCreate(const UniformBufferObjBaseChunk
*source
)
136 Inherited::onCreate(source
);
138 if(GlobalSystemState
== Startup
)
141 _uiChunkId
= _uiChunkCounter
++;
144 void UniformBufferObjBaseChunk::onCreateAspect(const UniformBufferObjBaseChunk
*createAspect
,
145 const UniformBufferObjBaseChunk
*source
)
147 Inherited::onCreateAspect(createAspect
, source
);
149 _uiChunkId
= createAspect
->_uiChunkId
;
152 /*------------------------------ Output ----------------------------------*/
154 void UniformBufferObjBaseChunk::dump( UInt32
,
155 const BitVector
) const
157 SLOG
<< "Dump UniformBufferObjBaseChunk NI" << std::endl
;