Open Inventor Release 2025.2.0
 
Loading...
Searching...
No Matches
SoComputeShaderScheduler.h
1/*==============================================================================
2** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), **
3** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. **
4** **
5** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS **
6** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR **
7** WRITTEN AUTHORIZATION OF FEI S.A.S. **
8** **
9** RESTRICTED RIGHTS LEGEND **
10** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS **
11** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN **
12** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT **
13** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN **
14** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. **
15** **
16** COPYRIGHT (C) 1996-2025 BY FEI S.A.S, **
17** BORDEAUX, FRANCE **
18** ALL RIGHTS RESERVED **
19==============================================================================*/
20
21#pragma once
22
23#include <Inventor/nodes/SoNode.h>
24#include <Inventor/fields/SoSFEnum.h>
25#include <Inventor/fields/SoSFVec3i32.h>
26#include <Inventor/fields/SoSFTrigger.h>
27#include <Inventor/renderer/RendererResourceMacro.h>
28
30class SoNotList;
31
64class SoComputeShaderScheduler : public SoNode
65{
66 SO_NODE_HEADER(SoComputeShaderScheduler);
67 RENDERER_RESOURCE(SoComputeShaderScheduler);
68
69public:
73 enum Policy
74 {
79
86 };
87
95
102
109
111
115 virtual SbBool affectsState() const
116 {
117 return FALSE;
118 }
119
120private:
121 virtual void GLRender(SoGLRenderAction* action);
122
123private:
124 static void initClass();
125 static void exitClass();
126
139 SoSFVec3i32 workGroupSize;
140
141 virtual void fieldHasChanged(SoField* field);
142 virtual void notify(SoNotList* list);
143
144 virtual bool shouldCompute(SoGLRenderAction* action);
145
155 static void computeWorkGroups(SoState* state, const SbVec3i32& totalComputeSize, SbVec3i32& numWorkGroups, SbVec3i32& workGroupSize);
156
157private:
159
160private:
161 bool m_triggerCalled;
162};
3D vector class.
Definition SbVec.h:1517
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Compute shader s...
@ ON_TRIGGER
The computation is executed only if the trigger field is touched.
@ EACH_FRAME
The computation is executed each time this node is traversed by a rendering action.
SoSFTrigger trigger
Trigger field to execute the shader computation.
SoSFVec3i32 numWorkGroups
Specifies the number of local work groups dispatched in the X, Y and Z dimensions for the computation...
SoSFEnum policy
Specifies the policy used for scheduling the computation.
virtual SbBool affectsState() const
Returns false.
Base class for all fields.
Definition SoField.h:234
Renders a scene graph using Open Inventor's Render Engine.
Field containing an enumerated value.
Definition SoSFEnum.h:89
Field used to trigger engines or connection networks.
Definition SoSFTrigger.h:85
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Field containing...
Definition SoSFVec3i32.h:48
Traversal state.
Definition SoState.h:74
int SbBool
Boolean type.
Definition SbBase.h:87