VR-Forces 5.0.2 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtIndirectDrawComponent.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2021 VT-MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvOsg/vrvOsg.h>
13 
14 #include <osg/StateSet>
15 #include <osg/Uniform>
16 
17 #include <string>
18 
19 namespace osg
20 {
21  class RenderInfo;
22 }
23 
24 namespace makVrv
25 {
26  class DtDe;
27  class DtGlBuffer;
28  class DtIndirectShaderConstants;
29 
33  {
34  public:
37 
39  virtual ~DtIndirectDrawComponent();
40  private:
42  DtIndirectDrawComponent() = delete;
43 
46 
48  DtIndirectDrawComponent&operator=(const DtIndirectDrawComponent& rhs) = delete;
49 
50  public:
52  virtual void update(osg::RenderInfo& renderInfo);
53 
55  virtual void apply(osg::RenderInfo& renderInfo) = 0;
56 
58  virtual void draw(osg::RenderInfo& renderInfo, const int offsetCommandBuffer, GLenum indicesType, int maxCommands
59  , DtGlBuffer* gpuShaderUbo, int gpuShaderBinding, DtIndirectShaderConstants* shaderConstants);
60 
62  virtual void releaseGLObjects(osg::State* state);
63 
65  virtual bool shouldDraw(bool isShadowPass);
66 
67  protected:
69  virtual std::string indicesTypeToString(int indicesType);
70 
71  protected:
73 
75  };
76 }
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
DtDe & myDe
Definition: DtIndirectDrawComponent.h:72
A generic OpenGL buffer. This can be: -&gt; a vertex buffer -&gt; an index buffer -&gt; a shader storage buffe...
Definition: DtGlBuffer.h:29
unsigned int GLenum
Definition: DtGlTextureBufferObject.h:18
Contains DLL export macros.
Interface class to manage/configure drawing of a subset of rendering components within an indirect ge...
Definition: DtIndirectDrawComponent.h:32
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:70
Definition: DtIndirectShaderConstants.h:42
osg::ref_ptr< osg::StateSet > myStateSet
Definition: DtIndirectDrawComponent.h:74

Document ID: Generated on Sun Dec 4 20:22:03 EST 2022 from SVN revision 249613
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)