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