VTK  9.7.1
vtkSimpleMotionBlurPass.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
20 #ifndef vtkSimpleMotionBlurPass_h
21 #define vtkSimpleMotionBlurPass_h
22 
24 #include "vtkRenderingOpenGL2Module.h" // For export macro
25 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
26 
27 VTK_ABI_NAMESPACE_BEGIN
29 class vtkOpenGLHelper;
31 class vtkTextureObject;
32 
33 class VTKRENDERINGOPENGL2_EXPORT VTK_MARSHALAUTO vtkSimpleMotionBlurPass
35 {
36 public:
37  static vtkSimpleMotionBlurPass* New();
39  void PrintSelf(ostream& os, vtkIndent indent) override;
40 
45  void Render(const vtkRenderState* s) override;
46 
52  void ReleaseGraphicsResources(vtkWindow* w) override;
53 
55 
63  vtkGetMacro(SubFrames, int);
64  virtual void SetSubFrames(int subFrames);
66 
71  vtkSetMacro(DepthFormat, int);
72 
79  vtkSetMacro(ColorFormat, int);
80 
81  // Get the depth texture object
82  vtkGetObjectMacro(DepthTexture, vtkTextureObject);
83 
84  // Get the Color texture object
85  vtkGetObjectMacro(ColorTexture, vtkTextureObject);
86 
87 protected:
92 
96  ~vtkSimpleMotionBlurPass() override;
97 
102  vtkTextureObject* ColorTexture; // render target for the scene
103  vtkTextureObject* AccumulationTexture[2]; // where we add the colors
104  vtkTextureObject* DepthTexture; // render target for the depth
105 
107 
115 
118 
119  int SubFrames; // number of sub frames
120  int CurrentSubFrame; // what one are we on
123 
124 private:
126  void operator=(const vtkSimpleMotionBlurPass&) = delete;
127 };
128 
129 VTK_ABI_NAMESPACE_END
130 #endif
OpenGL rendering window.
Avergae frames to simulate motion blur.
int ViewportX
Cache viewport values for depth peeling.
int ViewportHeight
Cache viewport values for depth peeling.
void ReleaseGraphicsResources(vtkWindow *w) override
Release graphics resources and ask components to release their own resources.
window superclass for vtkRenderWindow
Definition: vtkWindow.h:41
Context in which a vtkRenderPass will render.
vtkOpenGLFramebufferObject * FrameBufferObject
Graphics resources.
a simple class to control print indentation
Definition: vtkIndent.h:28
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
Internal class which encapsulates OpenGL FramebufferObject.
abstracts an OpenGL texture object.
virtual void Render(const vtkRenderState *s)=0
Perform rendering according to a render state s.
int ViewportWidth
Cache viewport values for depth peeling.
#define VTK_MARSHALAUTO
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
Convenient class for post-processing passes.
int ViewportY
Cache viewport values for depth peeling.