VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtIndirectClearBufferProgram.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Copyright (c) 2021 MAK Technologies, Inc.
3  * All rights reserved.
4  *****************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvOsg/vrvOsg.h>
13 
15 
16 #include <vrvMath/DtVector3.h>
17 
18 #include <tbb/atomic.h>
19 
20 namespace makVrv
21 {
22  class DtGlBuffer;
23  class DtGlProgram;
24 
34  {
35  public:
38 
41 
43  static DtIndirectClearBufferProgram* instance(DtDe& de);
44 
45  public:
52 
53  public:
55  virtual void clearBuffer(DtGlBuffer* buffer, unsigned int clearValue);
56 
58  virtual void deleteShaders();
59 
61  virtual void incrementNumUsers();
62 
64  virtual void decrementNumUsers();
65 
66  protected:
68  virtual void initializeShadersIfNecessary(void);
69  protected:
72 
75 
77  tbb::atomic<int> myNumUsers;
78 
82 
85 
86  protected:
88  static const std::string theShaderFilePath;
89  };
90 }
Virtual base class. Allows for RTTI and proper virtual destruction. Used by Creators, Factories, Providers, Assemblers and User Interfaces.
Definition: DtVirtualBaseClass.h:19
DtDe & myDe
reference to de
Definition: DtIndirectClearBufferProgram.h:84
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
static const std::string theShaderFilePath
the shader file path
Definition: DtIndirectClearBufferProgram.h:88
tbb::atomic< int > myNumUsers
the ref count (users)
Definition: DtIndirectClearBufferProgram.h:77
A convenience class to represent an OpenGL Shader Program.
Definition: DtGlProgram.h:66
int myBufferSizeLoc
locations of some uniforms
Definition: DtIndirectClearBufferProgram.h:80
3 dimensional vector
int myClearValueLoc
Definition: DtIndirectClearBufferProgram.h:81
Contains makVrv::DtVirtualBaseClass class.
DtGlProgram * myClearProgram
handle to the actual gl program
Definition: DtIndirectClearBufferProgram.h:71
A generic OpenGL buffer. This can be: -&gt; a vertex buffer -&gt; an index buffer -&gt; a shader storage buffe...
Definition: DtGlBuffer.h:29
This class clears buffers using compute shader Theoretically, there are performance gains to be achie...
Definition: DtIndirectClearBufferProgram.h:33
Contains DLL export macros.
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:72
DtVector3< int > myWorkGroupLocalSize
local work group sisze
Definition: DtIndirectClearBufferProgram.h:74

Document ID: Generated on Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)