VTK  9.3.0
vtkFramebufferPass.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
14 #ifndef vtkFramebufferPass_h
15 #define vtkFramebufferPass_h
16 
18 #include "vtkRenderingOpenGL2Module.h" // For export macro
19 
20 VTK_ABI_NAMESPACE_BEGIN
22 class vtkOpenGLHelper;
24 class vtkTextureObject;
25 
26 class VTKRENDERINGOPENGL2_EXPORT vtkFramebufferPass : public vtkDepthImageProcessingPass
27 {
28 public:
31  void PrintSelf(ostream& os, vtkIndent indent) override;
32 
37  void Render(const vtkRenderState* s) override;
38 
45 
50  vtkSetMacro(DepthFormat, int);
51 
58  vtkSetMacro(ColorFormat, int);
59 
60  // Get the depth texture object
61  vtkGetObjectMacro(DepthTexture, vtkTextureObject);
62 
63  // Get the Color texture object
64  vtkGetObjectMacro(ColorTexture, vtkTextureObject);
65 
66 protected:
71 
75  ~vtkFramebufferPass() override;
76 
81  vtkTextureObject* ColorTexture; // render target for the scene
82  vtkTextureObject* DepthTexture; // render target for the depth
83 
85 
88  int ViewportX;
89  int ViewportY;
93 
96 
97 private:
98  vtkFramebufferPass(const vtkFramebufferPass&) = delete;
99  void operator=(const vtkFramebufferPass&) = delete;
100 };
101 
102 VTK_ABI_NAMESPACE_END
103 #endif
Convenient class for post-processing passes.
Render into a FO.
int ViewportY
Cache viewport values for depth peeling.
~vtkFramebufferPass() override
Destructor.
static vtkFramebufferPass * New()
int ViewportX
Cache viewport values for depth peeling.
vtkOpenGLFramebufferObject * FrameBufferObject
Graphics resources.
void Render(const vtkRenderState *s) override
Perform rendering according to a render state s.
vtkTextureObject * DepthTexture
vtkFramebufferPass()
Default constructor.
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.
int ViewportHeight
Cache viewport values for depth peeling.
vtkTextureObject * ColorTexture
void ReleaseGraphicsResources(vtkWindow *w) override
Release graphics resources and ask components to release their own resources.
a simple class to control print indentation
Definition: vtkIndent.h:38
Internal class which encapsulates OpenGL FramebufferObject.
OpenGL rendering window.
Context in which a vtkRenderPass will render.
abstracts an OpenGL texture object.
window superclass for vtkRenderWindow
Definition: vtkWindow.h:37