fixed: gcc8 compile issues
[opensg.git] / Source / Contrib / ComputeBase / ComputeShader / OSGComputeShaderAlgorithm.h
blobdee5f2e8a28a9c9fa9567e232f3adb72dd618850
1 /*---------------------------------------------------------------------------*\
2 * OpenSG *
3 * *
4 * *
5 * Copyright (C) 2000-2002 by the OpenSG Forum *
6 * *
7 * www.opensg.org *
8 * *
9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de *
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 #ifndef _OSGCOMPUTESHADERALGORITHM_H_
40 #define _OSGCOMPUTESHADERALGORITHM_H_
42 #include <queue>
44 #include "OSGComputeShaderAlgorithmBase.h"
46 OSG_BEGIN_NAMESPACE
48 class DrawEnv;
49 class Action;
51 //! Stage
52 //! \ingroup GrpSystemNodeCoresMisc
54 class OSG_CONTRIBCOMPUTEBASE_DLLMAPPING ComputeShaderAlgorithm :
55 public ComputeShaderAlgorithmBase
57 /*========================== PUBLIC =================================*/
59 public:
61 /*---------------------------------------------------------------------*/
62 /*! \name Sync */
63 /*! \{ */
65 virtual void changed(ConstFieldMaskArg whichField,
66 UInt32 origin,
67 BitVector detail);
69 /*! \} */
70 /*---------------------------------------------------------------------*/
71 /*! \name Execute */
72 /*! \{ */
74 virtual Action::ResultE renderEnter(Action *pAction );
75 virtual Action::ResultE renderLeave(Action *pAction );
77 virtual void execute (HardwareContext *pContext,
78 DrawEnv *pEnv );
80 /*! \} */
81 /*---------------------------------------------------------------------*/
82 /*! \name Execute */
83 /*! \{ */
85 /*! \} */
86 /*---------------------------------------------------------------------*/
87 /*! \name Dump */
88 /*! \{ */
90 virtual void dump( UInt32 uiIndent = 0,
91 const BitVector bvFlags = 0) const;
93 /*! \} */
94 /*========================= PROTECTED ===============================*/
96 protected:
98 static UInt32 _arbComputeShader;
99 static UInt32 _arbComputeVariableGroupSize;
100 static UInt32 _arbShaderImageLoadStore;
102 static UInt32 FuncIdDispatchCompute;
103 static UInt32 FuncIdDispatchComputeGroupSize;
104 static UInt32 FuncIdMemoryBarrier;
106 typedef ComputeShaderAlgorithmBase Inherited;
108 /*---------------------------------------------------------------------*/
109 /*! \name Constructors */
110 /*! \{ */
112 ComputeShaderAlgorithm(void);
113 ComputeShaderAlgorithm(const ComputeShaderAlgorithm &source);
115 /*! \} */
116 /*---------------------------------------------------------------------*/
117 /*! \name Destructors */
118 /*! \{ */
120 virtual ~ComputeShaderAlgorithm(void);
122 /*! \} */
123 /*---------------------------------------------------------------------*/
124 /*! \name Draw */
125 /*! \{ */
127 /*! \} */
128 /*---------------------------------------------------------------------*/
129 /*! \name Init */
130 /*! \{ */
132 static void initMethod(InitPhase ePhase);
134 /*! \} */
135 /*========================== PRIVATE ================================*/
137 private:
139 friend class FieldContainer;
140 friend class ComputeShaderAlgorithmBase;
142 /*---------------------------------------------------------------------*/
143 /*! \name thread local */
144 /*! \{ */
146 /*! \} */
147 /*---------------------------------------------------------------------*/
148 /*! \name load thread */
149 /*! \{ */
151 /*! \} */
152 /*---------------------------------------------------------------------*/
154 /*!\brief prohibit default function (move to 'public' if needed) */
155 void operator =(const ComputeShaderAlgorithm &source);
158 typedef ComputeShaderAlgorithm *ComputeShaderAlgorithmP;
160 OSG_END_NAMESPACE
162 #include "OSGComputeShaderAlgorithmBase.inl"
163 #include "OSGComputeShaderAlgorithm.inl"
165 #endif /* _OSGCOMPUTESHADERALGORITHM_H_ */