VTK  9.0.20200807
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:
37  static vtkFramebufferPass* New();
39  void PrintSelf(ostream& os, vtkIndent indent) override;
40 
45  void Render(const vtkRenderState* s) override;
46 
52  void ReleaseGraphicsResources(vtkWindow* w) override;
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
vtkDepthImageProcessingPass
Convenient class for post-processing passes. Based on vtkImageProcessingPass, but writes depth as wel...
Definition: vtkDepthImageProcessingPass.h:45
vtkObject::New
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
vtkRenderPass::Render
virtual void Render(const vtkRenderState *s)=0
Perform rendering according to a render state s.
vtkOpenGLFramebufferObject
Internal class which encapsulates OpenGL FramebufferObject.
Definition: vtkOpenGLFramebufferObject.h:181
vtkFramebufferPass::FrameBufferObject
vtkOpenGLFramebufferObject * FrameBufferObject
Graphics resources.
Definition: vtkFramebufferPass.h:88
vtkFramebufferPass::DepthFormat
int DepthFormat
Definition: vtkFramebufferPass.h:102
vtkImageProcessingPass::ReleaseGraphicsResources
void ReleaseGraphicsResources(vtkWindow *w) override
Release graphics resources and ask components to release their own resources.
vtkFramebufferPass::ColorFormat
int ColorFormat
Definition: vtkFramebufferPass.h:103
vtkWindow
window superclass for vtkRenderWindow
Definition: vtkWindow.h:38
vtkFramebufferPass::ColorTexture
vtkTextureObject * ColorTexture
Definition: vtkFramebufferPass.h:89
vtkOpenGLHelper
Definition: vtkOpenGLHelper.h:30
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkTextureObject
abstracts an OpenGL texture object.
Definition: vtkTextureObject.h:40
vtkFramebufferPass::ViewportX
int ViewportX
Cache viewport values for depth peeling.
Definition: vtkFramebufferPass.h:96
vtkFramebufferPass::DepthTexture
vtkTextureObject * DepthTexture
Definition: vtkFramebufferPass.h:90
vtkFramebufferPass::ViewportWidth
int ViewportWidth
Definition: vtkFramebufferPass.h:98
vtkFramebufferPass::ViewportY
int ViewportY
Definition: vtkFramebufferPass.h:97
vtkFramebufferPass
Render into a FO.
Definition: vtkFramebufferPass.h:34
vtkDepthImageProcessingPass::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkFramebufferPass::ViewportHeight
int ViewportHeight
Definition: vtkFramebufferPass.h:99
vtkOpenGLRenderWindow
OpenGL rendering window.
Definition: vtkOpenGLRenderWindow.h:53
vtkRenderState
Context in which a vtkRenderPass will render.
Definition: vtkRenderState.h:40
vtkDepthImageProcessingPass.h