VTK  9.7.1
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 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
20 
21 VTK_ABI_NAMESPACE_BEGIN
23 class vtkOpenGLHelper;
25 class vtkTextureObject;
26 
27 class VTKRENDERINGOPENGL2_EXPORT VTK_MARSHALAUTO vtkFramebufferPass
29 {
30 public:
31  static vtkFramebufferPass* New();
33  void PrintSelf(ostream& os, vtkIndent indent) override;
34 
39  void Render(const vtkRenderState* s) override;
40 
46  void ReleaseGraphicsResources(vtkWindow* w) override;
47 
52  vtkSetMacro(DepthFormat, int);
53  vtkGetMacro(DepthFormat, int);
54 
61  vtkSetMacro(ColorFormat, int);
62  vtkGetMacro(ColorFormat, int);
63 
64  // Get the depth texture object
65  vtkGetObjectMacro(DepthTexture, vtkTextureObject);
66 
67  // Get the Color texture object
68  vtkGetObjectMacro(ColorTexture, vtkTextureObject);
69 
70 protected:
75 
79  ~vtkFramebufferPass() override;
80 
85  vtkTextureObject* ColorTexture; // render target for the scene
86  vtkTextureObject* DepthTexture; // render target for the depth
87 
89 
92  int ViewportX;
93  int ViewportY;
97 
100 
101 private:
102  vtkFramebufferPass(const vtkFramebufferPass&) = delete;
103  void operator=(const vtkFramebufferPass&) = delete;
104 };
105 
106 VTK_ABI_NAMESPACE_END
107 #endif
OpenGL rendering window.
void ReleaseGraphicsResources(vtkWindow *w) override
Release graphics resources and ask components to release their own resources.
window superclass for vtkRenderWindow
Definition: vtkWindow.h:41
vtkTextureObject * DepthTexture
Context in which a vtkRenderPass will render.
vtkOpenGLFramebufferObject * FrameBufferObject
Graphics resources.
int ViewportY
Cache viewport values for depth peeling.
a simple class to control print indentation
Definition: vtkIndent.h:28
vtkTextureObject * ColorTexture
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int ViewportHeight
Cache viewport values for depth peeling.
Internal class which encapsulates OpenGL FramebufferObject.
abstracts an OpenGL texture object.
virtual void Render(const vtkRenderState *s)=0
Perform rendering according to a render state s.
int ViewportX
Cache viewport values for depth peeling.
int ViewportWidth
Cache viewport values for depth peeling.
Render into a FO.
#define VTK_MARSHALAUTO
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
Convenient class for post-processing passes.