VTK
dox
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
=========================================================================*/
29
#ifndef vtkSimpleMotionBlurPass_h
30
#define vtkSimpleMotionBlurPass_h
31
32
#include "vtkRenderingOpenGL2Module.h"
// For export macro
33
#include "
vtkDepthImageProcessingPass.h
"
34
35
class
vtkOpenGLFramebufferObject
;
36
class
vtkOpenGLHelper
;
37
class
vtkOpenGLRenderWindow
;
38
class
vtkTextureObject
;
39
40
class
VTKRENDERINGOPENGL2_EXPORT
vtkSimpleMotionBlurPass
:
public
vtkDepthImageProcessingPass
41
{
42
public
:
43
static
vtkSimpleMotionBlurPass
*
New
();
44
vtkTypeMacro(
vtkSimpleMotionBlurPass
,
vtkDepthImageProcessingPass
);
45
void
PrintSelf
(ostream& os,
vtkIndent
indent)
override
;
46
51
void
Render
(
const
vtkRenderState
*s)
override
;
52
58
void
ReleaseGraphicsResources
(
vtkWindow
*w)
override
;
59
61
69
vtkGetMacro(SubFrames,
int
);
70
virtual
void
SetSubFrames(
int
subFrames);
72
77
vtkSetMacro(DepthFormat,
int
);
78
85
vtkSetMacro(ColorFormat,
int
);
86
87
// Get the depth texture object
88
vtkGetObjectMacro(DepthTexture,
vtkTextureObject
);
89
90
// Get the Color texture object
91
vtkGetObjectMacro(ColorTexture,
vtkTextureObject
);
92
93
protected
:
97
vtkSimpleMotionBlurPass
();
98
102
~
vtkSimpleMotionBlurPass
()
override
;
103
107
vtkOpenGLFramebufferObject
*
FrameBufferObject
;
108
vtkTextureObject
*
ColorTexture
;
// render target for the scene
109
vtkTextureObject
*AccumulationTexture[2];
// where we add the colors
110
vtkTextureObject
*
DepthTexture
;
// render target for the depth
111
113
116
int
ViewportX
;
117
int
ViewportY
;
118
int
ViewportWidth
;
119
int
ViewportHeight
;
121
122
int
DepthFormat
;
123
int
ColorFormat
;
124
125
int
SubFrames
;
// number of sub frames
126
int
CurrentSubFrame
;
// what one are we on
127
int
ActiveAccumulationTexture
;
128
vtkOpenGLHelper
*
BlendProgram
;
129
130
private
:
131
vtkSimpleMotionBlurPass
(
const
vtkSimpleMotionBlurPass
&) =
delete
;
132
void
operator=(
const
vtkSimpleMotionBlurPass
&) =
delete
;
133
};
134
135
#endif
vtkDepthImageProcessingPass
Convenient class for post-processing passes. Based on vtkImageProcessingPass, but writes depth as wel...
Definition:
vtkDepthImageProcessingPass.h:62
vtkSimpleMotionBlurPass::ViewportY
int ViewportY
Definition:
vtkSimpleMotionBlurPass.h:117
vtkSimpleMotionBlurPass::ColorTexture
vtkTextureObject * ColorTexture
Definition:
vtkSimpleMotionBlurPass.h:108
vtkObject::New
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
vtkRenderPass::Render
virtual void Render(const vtkRenderState *s)=0
Perform rendering according to a render state s.
vtkOpenGLFramebufferObject
Internal class which encapsulates OpenGL FramebufferObject.
Definition:
vtkOpenGLFramebufferObject.h:182
vtkSimpleMotionBlurPass::ViewportHeight
int ViewportHeight
Definition:
vtkSimpleMotionBlurPass.h:119
vtkImageProcessingPass::ReleaseGraphicsResources
void ReleaseGraphicsResources(vtkWindow *w) override
Release graphics resources and ask components to release their own resources.
vtkSimpleMotionBlurPass::ViewportX
int ViewportX
Cache viewport values for depth peeling.
Definition:
vtkSimpleMotionBlurPass.h:116
vtkSimpleMotionBlurPass::CurrentSubFrame
int CurrentSubFrame
Definition:
vtkSimpleMotionBlurPass.h:126
vtkWindow
window superclass for vtkRenderWindow
Definition:
vtkWindow.h:34
vtkSimpleMotionBlurPass::DepthFormat
int DepthFormat
Definition:
vtkSimpleMotionBlurPass.h:122
vtkSimpleMotionBlurPass::FrameBufferObject
vtkOpenGLFramebufferObject * FrameBufferObject
Graphics resources.
Definition:
vtkSimpleMotionBlurPass.h:107
vtkOpenGLHelper
Definition:
vtkOpenGLHelper.h:30
vtkIndent
a simple class to control print indentation
Definition:
vtkIndent.h:33
vtkTextureObject
abstracts an OpenGL texture object.
Definition:
vtkTextureObject.h:41
vtkSimpleMotionBlurPass
Avergae frames to simulate motion blur.
Definition:
vtkSimpleMotionBlurPass.h:40
vtkSimpleMotionBlurPass::ColorFormat
int ColorFormat
Definition:
vtkSimpleMotionBlurPass.h:123
vtkSimpleMotionBlurPass::SubFrames
int SubFrames
Definition:
vtkSimpleMotionBlurPass.h:125
vtkDepthImageProcessingPass::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkSimpleMotionBlurPass::ViewportWidth
int ViewportWidth
Definition:
vtkSimpleMotionBlurPass.h:118
vtkOpenGLRenderWindow
OpenGL rendering window.
Definition:
vtkOpenGLRenderWindow.h:50
vtkRenderState
Context in which a vtkRenderPass will render.
Definition:
vtkRenderState.h:40
vtkSimpleMotionBlurPass::DepthTexture
vtkTextureObject * DepthTexture
Definition:
vtkSimpleMotionBlurPass.h:110
vtkSimpleMotionBlurPass::BlendProgram
vtkOpenGLHelper * BlendProgram
Definition:
vtkSimpleMotionBlurPass.h:128
vtkSimpleMotionBlurPass::ActiveAccumulationTexture
int ActiveAccumulationTexture
Definition:
vtkSimpleMotionBlurPass.h:127
vtkDepthImageProcessingPass.h
Generated by
1.8.16