VTK  9.3.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 
26 VTK_ABI_NAMESPACE_BEGIN
28 class vtkOpenGLHelper;
30 class vtkTextureObject;
31 
32 class VTKRENDERINGOPENGL2_EXPORT vtkSimpleMotionBlurPass : public vtkDepthImageProcessingPass
33 {
34 public:
35  static vtkSimpleMotionBlurPass* New();
37  void PrintSelf(ostream& os, vtkIndent indent) override;
38 
43  void Render(const vtkRenderState* s) override;
44 
50  void ReleaseGraphicsResources(vtkWindow* w) override;
51 
53 
61  vtkGetMacro(SubFrames, int);
62  virtual void SetSubFrames(int subFrames);
64 
69  vtkSetMacro(DepthFormat, int);
70 
77  vtkSetMacro(ColorFormat, int);
78 
79  // Get the depth texture object
80  vtkGetObjectMacro(DepthTexture, vtkTextureObject);
81 
82  // Get the Color texture object
83  vtkGetObjectMacro(ColorTexture, vtkTextureObject);
84 
85 protected:
90 
94  ~vtkSimpleMotionBlurPass() override;
95 
100  vtkTextureObject* ColorTexture; // render target for the scene
101  vtkTextureObject* AccumulationTexture[2]; // where we add the colors
102  vtkTextureObject* DepthTexture; // render target for the depth
103 
105 
113 
116 
117  int SubFrames; // number of sub frames
118  int CurrentSubFrame; // what one are we on
121 
122 private:
124  void operator=(const vtkSimpleMotionBlurPass&) = delete;
125 };
126 
127 VTK_ABI_NAMESPACE_END
128 #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:27
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.
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.