VTK
9.6.1
Main Page
Related Pages
Topics
Namespaces
Classes
Files
File List
File Members
Rendering
OpenGL2
vtkOpenGLFXAAFilter.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
3
27
28
#ifndef vtkOpenGLFXAAFilter_h
29
#define vtkOpenGLFXAAFilter_h
30
31
#include "
vtkFXAAOptions.h
"
// For DebugOptions enum
32
#include "
vtkObject.h
"
33
#include "vtkRenderingOpenGL2Module.h"
// For export macro
34
35
#include <string>
// For std::string
36
37
VTK_ABI_NAMESPACE_BEGIN
38
class
vtkFXAAOptions
;
39
class
vtkOpenGLRenderer
;
40
class
vtkOpenGLRenderTimer
;
41
class
vtkShaderProgram
;
42
class
vtkTextureObject
;
43
class
vtkOpenGLQuadHelper
;
44
45
class
VTKRENDERINGOPENGL2_EXPORT
vtkOpenGLFXAAFilter
:
public
vtkObject
46
{
47
public
:
48
static
vtkOpenGLFXAAFilter
*
New
();
49
vtkTypeMacro(
vtkOpenGLFXAAFilter
,
vtkObject
);
50
void
PrintSelf
(ostream& os,
vtkIndent
indent)
override
;
51
55
void
Execute
(
vtkOpenGLRenderer
* ren);
56
60
void
ReleaseGraphicsResources
();
61
67
void
UpdateConfiguration
(
vtkFXAAOptions
* opts);
68
70
74
vtkSetClampMacro(
RelativeContrastThreshold
,
float
, 0.f, 1.f);
75
vtkGetMacro(
RelativeContrastThreshold
,
float
);
76
vtkSetClampMacro(
HardContrastThreshold
,
float
, 0.f, 1.f);
77
vtkGetMacro(
HardContrastThreshold
,
float
);
78
vtkSetClampMacro(
SubpixelBlendLimit
,
float
, 0.f, 1.f);
79
vtkGetMacro(
SubpixelBlendLimit
,
float
);
80
vtkSetClampMacro(
SubpixelContrastThreshold
,
float
, 0.f, 1.f);
81
vtkGetMacro(
SubpixelContrastThreshold
,
float
);
82
virtual
void
SetUseHighQualityEndpoints
(
bool
val);
83
vtkGetMacro(
UseHighQualityEndpoints
,
bool
);
84
vtkBooleanMacro(
UseHighQualityEndpoints
,
bool
);
85
vtkSetClampMacro(
EndpointSearchIterations
,
int
, 0,
VTK_INT_MAX
);
86
vtkGetMacro(
EndpointSearchIterations
,
int
);
87
virtual
void
SetDebugOptionValue
(
vtkFXAAOptions::DebugOption
opt);
88
vtkGetMacro(
DebugOptionValue
,
vtkFXAAOptions::DebugOption
);
90
91
protected
:
92
vtkOpenGLFXAAFilter
();
93
~vtkOpenGLFXAAFilter
()
override
;
94
95
void
Prepare
();
96
void
FreeGLObjects
();
97
void
CreateGLObjects
();
98
void
LoadInput
();
99
void
ApplyFilter
();
100
void
SubstituteFragmentShader
(std::string& fragShader);
101
void
Finalize
();
102
103
void
StartTimeQuery
(
vtkOpenGLRenderTimer
* timer);
104
void
EndTimeQuery
(
vtkOpenGLRenderTimer
* timer);
105
void
PrintBenchmark
();
106
107
// Cache GL state that we modify
108
bool
BlendState
;
109
bool
DepthTestState
;
110
111
int
Viewport
[4];
// x, y, width, height
112
113
// Used to measure execution time:
114
vtkOpenGLRenderTimer
*
PreparationTimer
;
115
vtkOpenGLRenderTimer
*
FXAATimer
;
116
117
// Parameters:
118
float
RelativeContrastThreshold
;
119
float
HardContrastThreshold
;
120
float
SubpixelBlendLimit
;
121
float
SubpixelContrastThreshold
;
122
int
EndpointSearchIterations
;
123
124
bool
UseHighQualityEndpoints
;
125
vtkFXAAOptions::DebugOption
DebugOptionValue
;
126
127
// Set to true when the shader definitions change so we know when to rebuild.
128
bool
NeedToRebuildShader
;
129
130
vtkOpenGLRenderer
*
Renderer
;
131
vtkTextureObject
*
Input
;
132
133
vtkOpenGLQuadHelper
*
QHelper
;
134
135
private
:
136
vtkOpenGLFXAAFilter
(
const
vtkOpenGLFXAAFilter
&) =
delete
;
137
void
operator=(
const
vtkOpenGLFXAAFilter
&) =
delete
;
138
};
139
140
VTK_ABI_NAMESPACE_END
141
#endif
// vtkOpenGLFXAAFilter_h
vtkFXAAOptions
Configuration for FXAA implementations.
Definition
vtkFXAAOptions.h:21
vtkFXAAOptions::DebugOption
DebugOption
Debugging options that affect the output color buffer.
Definition
vtkFXAAOptions.h:28
vtkIndent
a simple class to control print indentation
Definition
vtkIndent.h:29
vtkObject::vtkObject
vtkObject()
vtkOpenGLFXAAFilter::SetDebugOptionValue
virtual void SetDebugOptionValue(vtkFXAAOptions::DebugOption opt)
Parameter for tuning the FXAA implementation.
vtkOpenGLFXAAFilter::DebugOptionValue
vtkFXAAOptions::DebugOption DebugOptionValue
Definition
vtkOpenGLFXAAFilter.h:125
vtkOpenGLFXAAFilter::Input
vtkTextureObject * Input
Definition
vtkOpenGLFXAAFilter.h:131
vtkOpenGLFXAAFilter::Execute
void Execute(vtkOpenGLRenderer *ren)
Perform FXAA on the current render buffer in ren.
vtkOpenGLFXAAFilter::Viewport
int Viewport[4]
Definition
vtkOpenGLFXAAFilter.h:111
vtkOpenGLFXAAFilter::QHelper
vtkOpenGLQuadHelper * QHelper
Definition
vtkOpenGLFXAAFilter.h:133
vtkOpenGLFXAAFilter::NeedToRebuildShader
bool NeedToRebuildShader
Definition
vtkOpenGLFXAAFilter.h:128
vtkOpenGLFXAAFilter::EndpointSearchIterations
int EndpointSearchIterations
Definition
vtkOpenGLFXAAFilter.h:122
vtkOpenGLFXAAFilter::PrintBenchmark
void PrintBenchmark()
vtkOpenGLFXAAFilter::vtkOpenGLFXAAFilter
vtkOpenGLFXAAFilter()
vtkOpenGLFXAAFilter::EndTimeQuery
void EndTimeQuery(vtkOpenGLRenderTimer *timer)
vtkOpenGLFXAAFilter::~vtkOpenGLFXAAFilter
~vtkOpenGLFXAAFilter() override
vtkOpenGLFXAAFilter::SubpixelBlendLimit
float SubpixelBlendLimit
Definition
vtkOpenGLFXAAFilter.h:120
vtkOpenGLFXAAFilter::FXAATimer
vtkOpenGLRenderTimer * FXAATimer
Definition
vtkOpenGLFXAAFilter.h:115
vtkOpenGLFXAAFilter::UpdateConfiguration
void UpdateConfiguration(vtkFXAAOptions *opts)
Copy the configuration values from opts into this filter.
vtkOpenGLFXAAFilter::HardContrastThreshold
float HardContrastThreshold
Definition
vtkOpenGLFXAAFilter.h:119
vtkOpenGLFXAAFilter::RelativeContrastThreshold
float RelativeContrastThreshold
Definition
vtkOpenGLFXAAFilter.h:118
vtkOpenGLFXAAFilter::PreparationTimer
vtkOpenGLRenderTimer * PreparationTimer
Definition
vtkOpenGLFXAAFilter.h:114
vtkOpenGLFXAAFilter::Renderer
vtkOpenGLRenderer * Renderer
Definition
vtkOpenGLFXAAFilter.h:130
vtkOpenGLFXAAFilter::UseHighQualityEndpoints
bool UseHighQualityEndpoints
Definition
vtkOpenGLFXAAFilter.h:124
vtkOpenGLFXAAFilter::BlendState
bool BlendState
Definition
vtkOpenGLFXAAFilter.h:108
vtkOpenGLFXAAFilter::ReleaseGraphicsResources
void ReleaseGraphicsResources()
Release all OpenGL state.
vtkOpenGLFXAAFilter::ApplyFilter
void ApplyFilter()
vtkOpenGLFXAAFilter::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkOpenGLFXAAFilter::SubpixelContrastThreshold
float SubpixelContrastThreshold
Definition
vtkOpenGLFXAAFilter.h:121
vtkOpenGLFXAAFilter::Prepare
void Prepare()
vtkOpenGLFXAAFilter::SubstituteFragmentShader
void SubstituteFragmentShader(std::string &fragShader)
vtkOpenGLFXAAFilter::StartTimeQuery
void StartTimeQuery(vtkOpenGLRenderTimer *timer)
vtkOpenGLFXAAFilter::SetUseHighQualityEndpoints
virtual void SetUseHighQualityEndpoints(bool val)
Parameter for tuning the FXAA implementation.
vtkOpenGLFXAAFilter::DepthTestState
bool DepthTestState
Definition
vtkOpenGLFXAAFilter.h:109
vtkOpenGLFXAAFilter::CreateGLObjects
void CreateGLObjects()
vtkOpenGLFXAAFilter::LoadInput
void LoadInput()
vtkOpenGLFXAAFilter::Finalize
void Finalize()
vtkOpenGLFXAAFilter::New
static vtkOpenGLFXAAFilter * New()
vtkOpenGLFXAAFilter::FreeGLObjects
void FreeGLObjects()
vtkOpenGLQuadHelper
Class to make rendering a full screen quad easier.
Definition
vtkOpenGLQuadHelper.h:53
vtkOpenGLRenderTimer
Asynchronously measures GPU execution time for a single event.
Definition
vtkOpenGLRenderTimer.h:27
vtkOpenGLRenderer
OpenGL renderer.
Definition
vtkOpenGLRenderer.h:47
vtkShaderProgram
The ShaderProgram uses one or more Shader objects.
Definition
vtkShaderProgram.h:42
vtkTextureObject
In case DepthTextureCompare is true, specify the comparison function in use.
Definition
vtkTextureObject.h:34
vtkFXAAOptions.h
vtkObject.h
VTK_INT_MAX
#define VTK_INT_MAX
Definition
vtkType.h:197
Generated on
for VTK by
1.16.1