VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtVariableRateShadingImageUpdater.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2020 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvOsg/DtOsgChannel.h>
14 
15 namespace makVrv
16 {
18  class DtVariableRateShadingImage;
19  class DtGlProgram;
20 
21 
26  class DT_DLL_VRVOSG DtVariableRateShadingImageUpdater : public osg::Drawable
27  {
28  private:
31 
34 
37 
38  public:
41 
43  virtual void drawImplementation(osg::RenderInfo& info) const;
44 
46  virtual void releaseGLObjects(osg::State* state/* =0 */) const;
47 
49  virtual void shouldUpdate(bool shouldUpdate);
50 
52  virtual void restoreLastFboTarget(GLenum fboTarget);
53 
54  protected:
57 
60  virtual void update(osg::State* state) const;
61 
63  virtual void initProgram(osg::State* state) const;
64 
65  protected:
67 
70 
73 
75  mutable std::string myVertexShaderSource;
76 
78  mutable std::string myFragmentShaderSource;
79 
82 
84  mutable bool myShouldUpdate;
85 
88  };
89 
95  {
96  private:
99 
102 
103  public:
106  osg::Camera::DrawCallback* nextCallback);
107 
109  virtual void operator () (osg::RenderInfo& renderInfo) const;
110 
112  osg::Camera::DrawCallback* nextDrawCallback();
113 
114  protected:
117 
118  protected:
121 
124  };
125 }
Wrapper around Nvidia Variable Rate Shading Image functionality Creates a texture of the correct size...
Definition: DtVariableRateShadingImage.h:75
DtDe & myDe
Definition: DtVariableRateShadingImageUpdater.h:66
std::string myVertexShaderSource
vertex shader source
Definition: DtVariableRateShadingImageUpdater.h:75
Contains makVrv::DtOsgChannel class.
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
Base class for GPU updates of the variable rate shading image Draw a full screen quad using a shader ...
Definition: DtVariableRateShadingImageUpdater.h:26
A convenience class to represent an OpenGL Shader Program.
Definition: DtGlProgram.h:66
osg::ref_ptr< osg::Camera::DrawCallback > myNextCallback
next/nested callback
Definition: DtVariableRateShadingImageUpdater.h:123
A helper classes for creating a RTT target, optionally including depth buffer.
DtVariableRateShadingImage * myVariableRateShadingImage
handle to the vrs images so we can bind it&#39;s textures fbo
Definition: DtVariableRateShadingImageUpdater.h:69
A camera draw callback for invoking a VRS image update Typically this would be used as a predraw call...
Definition: DtVariableRateShadingImageUpdater.h:94
std::string myFragmentShaderSource
fragment shader source
Definition: DtVariableRateShadingImageUpdater.h:78
unsigned int GLenum
Definition: DtGlTextureBufferObject.h:19
osg::ref_ptr< DtVariableRateShadingImageUpdater > myShadingRateImageUpdater
VRS image updater to invoke on draw.
Definition: DtVariableRateShadingImageUpdater.h:120
bool myShouldUpdate
should we update on the next drawImplementation
Definition: DtVariableRateShadingImageUpdater.h:84
osg::ref_ptr< osg::StateSet > myVrsFillStateSet
state set to encapsulate state changes when doing vrs fill
Definition: DtVariableRateShadingImageUpdater.h:81
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:76
GLenum myRestoreFboTarget
the framebuffer target to bind last fbo to
Definition: DtVariableRateShadingImageUpdater.h:87
DtGlProgram * myProgram
shader to update the vrs texture image
Definition: DtVariableRateShadingImageUpdater.h:72

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)