VTK
9.1.0
Rendering
OpenGL2
vtkSimpleMotionBlurPass.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
Module: vtkSimpleMotionBlurPass.h
5
6
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7
All rights reserved.
8
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10
This software is distributed WITHOUT ANY WARRANTY; without even
11
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12
PURPOSE. See the above copyright notice for more information.
13
14
=========================================================================*/
48
#ifndef vtkSimpleMotionBlurPass_h
49
#define vtkSimpleMotionBlurPass_h
50
51
#include "
vtkDepthImageProcessingPass.h
"
52
#include "vtkRenderingOpenGL2Module.h"
// For export macro
53
54
class
vtkOpenGLFramebufferObject
;
55
class
vtkOpenGLHelper
;
56
class
vtkOpenGLRenderWindow
;
57
class
vtkTextureObject
;
58
59
class
VTKRENDERINGOPENGL2_EXPORT
vtkSimpleMotionBlurPass
:
public
vtkDepthImageProcessingPass
60
{
61
public
:
62
static
vtkSimpleMotionBlurPass
*
New
();
63
vtkTypeMacro(
vtkSimpleMotionBlurPass
,
vtkDepthImageProcessingPass
);
64
void
PrintSelf
(ostream& os,
vtkIndent
indent)
override
;
65
70
void
Render
(
const
vtkRenderState
* s)
override
;
71
77
void
ReleaseGraphicsResources
(
vtkWindow
* w)
override
;
78
80
88
vtkGetMacro(SubFrames,
int
);
89
virtual
void
SetSubFrames
(
int
subFrames);
91
96
vtkSetMacro(DepthFormat,
int
);
97
104
vtkSetMacro(ColorFormat,
int
);
105
106
// Get the depth texture object
107
vtkGetObjectMacro(DepthTexture,
vtkTextureObject
);
108
109
// Get the Color texture object
110
vtkGetObjectMacro(ColorTexture,
vtkTextureObject
);
111
112
protected
:
116
vtkSimpleMotionBlurPass
();
117
121
~vtkSimpleMotionBlurPass
()
override
;
122
126
vtkOpenGLFramebufferObject
*
FrameBufferObject
;
127
vtkTextureObject
*
ColorTexture
;
// render target for the scene
128
vtkTextureObject
* AccumulationTexture[2];
// where we add the colors
129
vtkTextureObject
*
DepthTexture
;
// render target for the depth
130
132
135
int
ViewportX
;
136
int
ViewportY
;
137
int
ViewportWidth
;
138
int
ViewportHeight
;
140
141
int
DepthFormat
;
142
int
ColorFormat
;
143
144
int
SubFrames
;
// number of sub frames
145
int
CurrentSubFrame
;
// what one are we on
146
int
ActiveAccumulationTexture
;
147
vtkOpenGLHelper
*
BlendProgram
;
148
149
private
:
150
vtkSimpleMotionBlurPass
(
const
vtkSimpleMotionBlurPass
&) =
delete
;
151
void
operator=(
const
vtkSimpleMotionBlurPass
&) =
delete
;
152
};
153
154
#endif
vtkDepthImageProcessingPass
Convenient class for post-processing passes.
Definition:
vtkDepthImageProcessingPass.h:46
vtkSimpleMotionBlurPass::ViewportY
int ViewportY
Cache viewport values for depth peeling.
Definition:
vtkSimpleMotionBlurPass.h:136
vtkSimpleMotionBlurPass::vtkSimpleMotionBlurPass
vtkSimpleMotionBlurPass()
Default constructor.
vtkSimpleMotionBlurPass::ColorTexture
vtkTextureObject * ColorTexture
Definition:
vtkSimpleMotionBlurPass.h:127
vtkOpenGLFramebufferObject
Internal class which encapsulates OpenGL FramebufferObject.
Definition:
vtkOpenGLFramebufferObject.h:182
vtkSimpleMotionBlurPass::ViewportHeight
int ViewportHeight
Cache viewport values for depth peeling.
Definition:
vtkSimpleMotionBlurPass.h:138
vtkSimpleMotionBlurPass::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkSimpleMotionBlurPass::ViewportX
int ViewportX
Cache viewport values for depth peeling.
Definition:
vtkSimpleMotionBlurPass.h:135
vtkSimpleMotionBlurPass::CurrentSubFrame
int CurrentSubFrame
Definition:
vtkSimpleMotionBlurPass.h:145
vtkSimpleMotionBlurPass::ReleaseGraphicsResources
void ReleaseGraphicsResources(vtkWindow *w) override
Release graphics resources and ask components to release their own resources.
vtkWindow
window superclass for vtkRenderWindow
Definition:
vtkWindow.h:39
vtkSimpleMotionBlurPass::SetSubFrames
virtual void SetSubFrames(int subFrames)
Set the number of sub frames for doing motion blur.
vtkSimpleMotionBlurPass::DepthFormat
int DepthFormat
Definition:
vtkSimpleMotionBlurPass.h:141
vtkSimpleMotionBlurPass::FrameBufferObject
vtkOpenGLFramebufferObject * FrameBufferObject
Graphics resources.
Definition:
vtkSimpleMotionBlurPass.h:126
vtkOpenGLHelper
Definition:
vtkOpenGLHelper.h:31
vtkIndent
a simple class to control print indentation
Definition:
vtkIndent.h:113
vtkTextureObject
abstracts an OpenGL texture object.
Definition:
vtkTextureObject.h:60
vtkSimpleMotionBlurPass
Avergae frames to simulate motion blur.
Definition:
vtkSimpleMotionBlurPass.h:60
vtkSimpleMotionBlurPass::ColorFormat
int ColorFormat
Definition:
vtkSimpleMotionBlurPass.h:142
vtkSimpleMotionBlurPass::SubFrames
int SubFrames
Definition:
vtkSimpleMotionBlurPass.h:144
vtkSimpleMotionBlurPass::Render
void Render(const vtkRenderState *s) override
Perform rendering according to a render state s.
vtkSimpleMotionBlurPass::~vtkSimpleMotionBlurPass
~vtkSimpleMotionBlurPass() override
Destructor.
vtkSimpleMotionBlurPass::ViewportWidth
int ViewportWidth
Cache viewport values for depth peeling.
Definition:
vtkSimpleMotionBlurPass.h:137
vtkOpenGLRenderWindow
OpenGL rendering window.
Definition:
vtkOpenGLRenderWindow.h:83
vtkRenderState
Context in which a vtkRenderPass will render.
Definition:
vtkRenderState.h:41
vtkSimpleMotionBlurPass::DepthTexture
vtkTextureObject * DepthTexture
Definition:
vtkSimpleMotionBlurPass.h:129
vtkSimpleMotionBlurPass::BlendProgram
vtkOpenGLHelper * BlendProgram
Definition:
vtkSimpleMotionBlurPass.h:147
vtkSimpleMotionBlurPass::New
static vtkSimpleMotionBlurPass * New()
vtkSimpleMotionBlurPass::ActiveAccumulationTexture
int ActiveAccumulationTexture
Definition:
vtkSimpleMotionBlurPass.h:146
vtkDepthImageProcessingPass.h
Generated on Fri Nov 5 2021 00:11:17 for VTK by
1.8.20