VTK  9.7.1
vtkSobelGradientMagnitudePass.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
51 #ifndef vtkSobelGradientMagnitudePass_h
52 #define vtkSobelGradientMagnitudePass_h
53 
54 #include "vtkImageProcessingPass.h"
55 #include "vtkRenderingOpenGL2Module.h" // For export macro
56 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
57 
58 VTK_ABI_NAMESPACE_BEGIN
59 class vtkDepthPeelingPassLayerList; // Pimpl
61 class vtkOpenGLHelper;
63 class vtkTextureObject;
64 
65 class VTKRENDERINGOPENGL2_EXPORT VTK_MARSHALAUTO vtkSobelGradientMagnitudePass
66  : public vtkImageProcessingPass
67 {
68 public:
71  void PrintSelf(ostream& os, vtkIndent indent) override;
72 
77  void Render(const vtkRenderState* s) override;
78 
84  void ReleaseGraphicsResources(vtkWindow* w) override;
85 
86 protected:
91 
96 
101  vtkTextureObject* Pass1; // render target for the scene
102  vtkTextureObject* Gx1; // render target 0 for the first shader
103  vtkTextureObject* Gy1; // render target 1 for the first shader
104 
105  // Structures for the various cell types we render.
106  vtkOpenGLHelper* Program1; // shader to compute Gx1 and Gy1
107  vtkOpenGLHelper* Program2; // shader to compute |G| from Gx1 and Gy1
108 
109 private:
111  void operator=(const vtkSobelGradientMagnitudePass&) = delete;
112 };
113 
114 VTK_ABI_NAMESPACE_END
115 #endif
OpenGL rendering window.
void ReleaseGraphicsResources(vtkWindow *w) override
Release graphics resources and ask components to release their own resources.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
Convenient class for post-processing passes.
window superclass for vtkRenderWindow
Definition: vtkWindow.h:41
Context in which a vtkRenderPass will render.
Implement a post-processing edge detection with a Sobel gradient magnitude render pass...
a simple class to control print indentation
Definition: vtkIndent.h:28
Internal class which encapsulates OpenGL FramebufferObject.
vtkOpenGLFramebufferObject * FrameBufferObject
Graphics resources.
abstracts an OpenGL texture object.
virtual void Render(const vtkRenderState *s)=0
Perform rendering according to a render state s.
#define VTK_MARSHALAUTO
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...