VTK  9.3.0
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:
37  void PrintSelf(ostream& os, vtkIndent indent) override;
38 
43  void Render(const vtkRenderState* s) override;
44 
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 
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
Convenient class for post-processing passes.
a simple class to control print indentation
Definition: vtkIndent.h:29
Internal class which encapsulates OpenGL FramebufferObject.
OpenGL rendering window.
Context in which a vtkRenderPass will render.
Avergae frames to simulate motion blur.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int ViewportWidth
Cache viewport values for depth peeling.
static vtkSimpleMotionBlurPass * New()
void Render(const vtkRenderState *s) override
Perform rendering according to a render state s.
int ViewportY
Cache viewport values for depth peeling.
virtual void SetSubFrames(int subFrames)
Set the number of sub frames for doing motion blur.
int ViewportX
Cache viewport values for depth peeling.
void ReleaseGraphicsResources(vtkWindow *w) override
Release graphics resources and ask components to release their own resources.
int ViewportHeight
Cache viewport values for depth peeling.
vtkOpenGLFramebufferObject * FrameBufferObject
Graphics resources.
vtkSimpleMotionBlurPass()
Default constructor.
~vtkSimpleMotionBlurPass() override
Destructor.
abstracts an OpenGL texture object.
window superclass for vtkRenderWindow
Definition: vtkWindow.h:28