OpenSceneGraph 3.6.5
DispatchCompute
Go to the documentation of this file.
1/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2014 Robert Osfield
2 * Copyright (C) 2017 Julien Valentin
3 *
4 * This library is open source and may be redistributed and/or modified under
5 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
6 * (at your option) any later version. The full license is in LICENSE file
7 * included with this distribution, and on the openscenegraph.org website.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * OpenSceneGraph Public License for more details.
13*/
14
15#ifndef OSG_DispatchCompute
16#define OSG_DispatchCompute 1
17
18#include <osg/Export>
19
20#include <osg/Geometry>
21
22namespace osg
23{
24
27{
28 public:
29 DispatchCompute(GLint numGroupsX=0, GLint numGroupsY=0, GLint numGroupsZ=0):
30 Drawable(),
31 _numGroupsX(numGroupsX),
32 _numGroupsY(numGroupsY),
33 _numGroupsZ(numGroupsZ)
34 {}
35
37
39
40 virtual void compileGLObjects(RenderInfo&) const {}
41
43
44 virtual void drawImplementation(RenderInfo& renderInfo) const;
45
47 void setComputeGroups( GLint numGroupsX, GLint numGroupsY, GLint numGroupsZ ) { _numGroupsX=numGroupsX; _numGroupsY=numGroupsY; _numGroupsZ=numGroupsZ; }
48
50 void getComputeGroups( GLint& numGroupsX, GLint& numGroupsY, GLint& numGroupsZ ) const{ numGroupsX=_numGroupsX; numGroupsY=_numGroupsY; numGroupsZ=_numGroupsZ; }
51
52 protected:
54
55};
56
57}
58#endif
59
The core osg library provides the basic scene graph classes such as Nodes, State and Drawables,...
Definition AlphaFunc:19
Copy Op(erator) used to control whether shallow or deep copy is used during copy construction and clo...
Definition CopyOp:41
@ SHALLOW_COPY
Definition CopyOp:47
void setComputeGroups(GLint numGroupsX, GLint numGroupsY, GLint numGroupsZ)
Set compute shader work groups.
Definition DispatchCompute:47
META_Node(osg, DispatchCompute)
GLint _numGroupsZ
Definition DispatchCompute:53
virtual void compileGLObjects(RenderInfo &) const
Immediately compile this Drawable into an OpenGL Display List/VertexBufferObjects.
Definition DispatchCompute:40
GLint _numGroupsY
Definition DispatchCompute:53
DispatchCompute(GLint numGroupsX=0, GLint numGroupsY=0, GLint numGroupsZ=0)
Definition DispatchCompute:29
virtual VertexArrayState * createVertexArrayStateImplememtation(RenderInfo &) const
Definition DispatchCompute:42
DispatchCompute(const DispatchCompute &, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
void getComputeGroups(GLint &numGroupsX, GLint &numGroupsY, GLint &numGroupsZ) const
Get compute shader work groups.
Definition DispatchCompute:50
GLint _numGroupsX
Definition DispatchCompute:53
virtual void drawImplementation(RenderInfo &renderInfo) const
drawImplementation(RenderInfo&) is a pure virtual method for the actual implementation of OpenGL draw...
Pure virtual base class for drawable geometry.
Definition Drawable:89
Definition RenderInfo:28
Definition VertexArrayState:25
#define OSG_EXPORT
Definition Export:39

osg logo
Generated at Wed Jul 23 2025 00:00:00 for the OpenSceneGraph by doxygen 1.14.0.