changed: gcc8 base update
[opensg.git] / Source / System / State / Base / OSGShaderStorageBufferObjBaseChunk.cpp
blobb11eb4c52fa4d2011f9202811c087b32dc6af8e6
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 // Includes
41 //---------------------------------------------------------------------------
43 #include <cstdlib>
44 #include <cstdio>
46 #include <boost/bind.hpp>
48 #include "OSGConfig.h"
50 #include "OSGGL.h"
51 #include "OSGGLU.h"
52 #include "OSGGLEXT.h"
53 #include "OSGWindow.h"
55 #include "OSGGLFuncProtos.h"
57 #include "OSGDrawEnv.h"
59 #include "OSGShaderStorageBufferObjBaseChunk.h"
61 OSG_BEGIN_NAMESPACE
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 /***************************************************************************\
69 * Class variables *
70 \***************************************************************************/
72 StateChunkClass ShaderStorageBufferObjBaseChunk::_class("ShaderStorageBuffer",
73 osgMaxShaderStorageBufferBindings, // number if slots
74 30); // priority
76 volatile UInt16 ShaderStorageBufferObjBaseChunk::_uiChunkCounter = 1;
78 /***************************************************************************\
79 * Class methods *
80 \***************************************************************************/
82 void ShaderStorageBufferObjBaseChunk::initMethod(InitPhase ePhase)
84 Inherited::initMethod(ePhase);
86 if(ePhase == TypeObject::SystemPost)
92 /***************************************************************************\
93 * Instance methods *
94 \***************************************************************************/
96 /*-------------------------------------------------------------------------*\
97 - private -
98 \*-------------------------------------------------------------------------*/
100 /*----------------------- constructors & destructors ----------------------*/
102 ShaderStorageBufferObjBaseChunk::ShaderStorageBufferObjBaseChunk(void) :
103 Inherited(),
104 _uiChunkId(0)
108 ShaderStorageBufferObjBaseChunk::ShaderStorageBufferObjBaseChunk(const ShaderStorageBufferObjBaseChunk &source) :
109 Inherited(source),
110 _uiChunkId(0)
114 ShaderStorageBufferObjBaseChunk::~ShaderStorageBufferObjBaseChunk(void)
118 /*----------------------------- class specific ----------------------------*/
120 const StateChunkClass *ShaderStorageBufferObjBaseChunk::getClass(void) const
122 return &_class;
125 void ShaderStorageBufferObjBaseChunk::changed(ConstFieldMaskArg whichField,
126 UInt32 origin,
127 BitVector details)
129 Inherited::changed(whichField, origin, details);
132 /*----------------------------- onCreate --------------------------------*/
134 void ShaderStorageBufferObjBaseChunk::onCreate(const ShaderStorageBufferObjBaseChunk *source)
136 Inherited::onCreate(source);
138 if(GlobalSystemState == Startup)
139 return;
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;
160 OSG_END_NAMESPACE