openscenegraph
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:
53 GLint _numGroupsX, _numGroupsY, _numGroupsZ;
54
55};
56
57}
58#endif
59
Definition CopyOp:41
@ SHALLOW_COPY
Definition CopyOp:47
Definition DispatchCompute:27
void setComputeGroups(GLint numGroupsX, GLint numGroupsY, GLint numGroupsZ)
Definition DispatchCompute:47
META_Node(osg, DispatchCompute)
virtual void compileGLObjects(RenderInfo &) const
Definition DispatchCompute:40
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
Definition DispatchCompute:50
GLint _numGroupsX
Definition DispatchCompute:53
virtual void drawImplementation(RenderInfo &renderInfo) const
Definition Drawable:89
Definition RenderInfo:28
Definition VertexArrayState:25
author: Julien Valentin 2017 (mp3butcher@hotmail.com)
Definition AlphaFunc:19
#define OSG_EXPORT
Definition osg/Export:39