VTK
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 =========================================================================*/
26 #ifndef vtkFramebufferPass_h
27 #define vtkFramebufferPass_h
28 
29 #include "vtkRenderingOpenGL2Module.h" // For export macro
31 
33 class vtkOpenGLHelper;
35 class vtkTextureObject;
36 
37 class VTKRENDERINGOPENGL2_EXPORT vtkFramebufferPass : public vtkDepthImageProcessingPass
38 {
39 public:
40  static vtkFramebufferPass *New();
42  void PrintSelf(ostream& os, vtkIndent indent) override;
43 
48  void Render(const vtkRenderState *s) override;
49 
55  void ReleaseGraphicsResources(vtkWindow *w) override;
56 
61  vtkSetMacro(DepthFormat, int);
62 
69  vtkSetMacro(ColorFormat, int);
70 
71  // Get the depth texture object
72  vtkGetObjectMacro(DepthTexture, vtkTextureObject);
73 
74  // Get the Color texture object
75  vtkGetObjectMacro(ColorTexture, vtkTextureObject);
76 
77  protected:
82 
86  ~vtkFramebufferPass() override;
87 
92  vtkTextureObject *ColorTexture; // render target for the scene
93  vtkTextureObject *DepthTexture; // render target for the depth
94 
96 
99  int ViewportX;
104 
107 
108  private:
109  vtkFramebufferPass(const vtkFramebufferPass&) = delete;
110  void operator=(const vtkFramebufferPass&) = delete;
111 };
112 
113 #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:37
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:39
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.
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.