VTK  9.1.0
vtkFramebufferPass.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkFramebufferPass.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 =========================================================================*/
23 #ifndef vtkFramebufferPass_h
24 #define vtkFramebufferPass_h
25 
27 #include "vtkRenderingOpenGL2Module.h" // For export macro
28 
30 class vtkOpenGLHelper;
32 class vtkTextureObject;
33 
34 class VTKRENDERINGOPENGL2_EXPORT vtkFramebufferPass : public vtkDepthImageProcessingPass
35 {
36 public:
39  void PrintSelf(ostream& os, vtkIndent indent) override;
40 
45  void Render(const vtkRenderState* s) override;
46 
53 
58  vtkSetMacro(DepthFormat, int);
59 
66  vtkSetMacro(ColorFormat, int);
67 
68  // Get the depth texture object
69  vtkGetObjectMacro(DepthTexture, vtkTextureObject);
70 
71  // Get the Color texture object
72  vtkGetObjectMacro(ColorTexture, vtkTextureObject);
73 
74 protected:
79 
83  ~vtkFramebufferPass() override;
84 
89  vtkTextureObject* ColorTexture; // render target for the scene
90  vtkTextureObject* DepthTexture; // render target for the depth
91 
93 
96  int ViewportX;
97  int ViewportY;
101 
104 
105 private:
106  vtkFramebufferPass(const vtkFramebufferPass&) = delete;
107  void operator=(const vtkFramebufferPass&) = delete;
108 };
109 
110 #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:34
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:39