VTK
vtkDepthPeelingPass.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkDepthPeelingPass.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 =========================================================================*/
38 #ifndef vtkDepthPeelingPass_h
39 #define vtkDepthPeelingPass_h
40 
41 #include "vtkRenderingOpenGL2Module.h" // For export macro
42 #include "vtkRenderPass.h"
43 #include <vector> // STL Header
44 
45 class vtkTextureObject;
49 class vtkOpenGLHelper;
50 
51 class VTKRENDERINGOPENGL2_EXPORT vtkDepthPeelingPass : public vtkRenderPass
52 {
53 public:
56  void PrintSelf(ostream& os, vtkIndent indent);
57 
58  //BTX
60 
62  virtual void Render(const vtkRenderState *s);
63  //ETX
65 
69 
71 
74  vtkGetObjectMacro(TranslucentPass,vtkRenderPass);
75  virtual void SetTranslucentPass(vtkRenderPass *translucentPass);
77 
79 
86  vtkSetClampMacro(OcclusionRatio,double,0.0,0.5);
87  vtkGetMacro(OcclusionRatio,double);
89 
91 
94  vtkSetMacro(MaximumNumberOfPeels,int);
95  vtkGetMacro(MaximumNumberOfPeels,int);
97 
99 
101  vtkGetMacro(LastRenderingUsedDepthPeeling,bool);
103 
113 
117 
120 
121  protected:
124 
127 
128  vtkRenderPass *TranslucentPass;
129  vtkTimeStamp CheckTime;
130  bool IsSupported;
131 
133 
134  int ViewportX;
135  int ViewportY;
136  int ViewportWidth;
137  int ViewportHeight;
139 
142  unsigned int DepthFormat;
143 
151  double OcclusionRatio;
152 
156  int MaximumNumberOfPeels;
157 
158  bool LastRenderingUsedDepthPeeling;
159 
160  // Is rendering at translucent geometry stage using depth peeling and
161  // rendering a layer other than the first one? (Boolean value)
162  // If so, the uniform variables UseTexture and Texture can be set.
163  // (Used by vtkOpenGLProperty or vtkOpenGLTexture)
164  int DepthPeelingHigherLayer;
165 
168 
174  std::vector<float> *DepthZData;
175 
178 
179  private:
180  vtkDepthPeelingPass(const vtkDepthPeelingPass&); // Not implemented.
181  void operator=(const vtkDepthPeelingPass&); // Not implemented.
182 };
183 
184 #endif
vtkDepthPeelingPass::OpaqueZTexture
vtkTextureObject * OpaqueZTexture
Definition: vtkDepthPeelingPass.h:169
vtkDepthPeelingPass::BlendIntermediatePeels
void BlendIntermediatePeels(vtkOpenGLRenderWindow *renWin, bool)
vtkGetObjectMacro
#define vtkGetObjectMacro(name, type)
Definition: vtkSetGet.h:232
vtkDepthPeelingPass::New
static vtkDepthPeelingPass * New()
vtkDepthPeelingPass
Implement an Order Independent Transparency render pass.
Definition: vtkDepthPeelingPass.h:53
vtkDepthPeelingPass::IntermediateBlendProgram
vtkOpenGLHelper * IntermediateBlendProgram
Definition: vtkDepthPeelingPass.h:167
vtkDepthPeelingPass::DepthZData
std::vector< float > * DepthZData
Definition: vtkDepthPeelingPass.h:174
vtkRenderPass.h
vtkDepthPeelingPass::~vtkDepthPeelingPass
virtual ~vtkDepthPeelingPass()
vtkTimeStamp
record modification and/or execution time
Definition: vtkTimeStamp.h:35
vtkgl::s
GLdouble s
Definition: vtkgl.h:11594
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkDepthPeelingPass::vtkDepthPeelingPass
vtkDepthPeelingPass()
vtkDepthPeelingPass::TranslucentZTexture
vtkTextureObject * TranslucentZTexture
Definition: vtkDepthPeelingPass.h:172
vtkDepthPeelingPass::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkDepthPeelingPass::BlendFinalPeel
void BlendFinalPeel(vtkOpenGLRenderWindow *renWin)
vtkDepthPeelingPass::ReleaseGraphicsResources
void ReleaseGraphicsResources(vtkWindow *w)
vtkWindow
window superclass for vtkRenderWindow
Definition: vtkWindow.h:34
vtkSetClampMacro
#define vtkSetClampMacro(name, type, min, max)
Definition: vtkSetGet.h:143
vtkInformationIntegerKey
Key for integer values in vtkInformation.
Definition: vtkInformationIntegerKey.h:34
vtkOpenGLHelper
Definition: vtkOpenGLHelper.h:31
vtkDepthPeelingPass::TranslucentRGBATexture
vtkTextureObject * TranslucentRGBATexture
Definition: vtkDepthPeelingPass.h:171
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkTextureObject
abstracts an OpenGL texture object.
Definition: vtkTextureObject.h:40
vtkDepthPeelingPass::FinalBlendProgram
vtkOpenGLHelper * FinalBlendProgram
Definition: vtkDepthPeelingPass.h:166
vtkGetMacro
#define vtkGetMacro(name, type)
Definition: vtkSetGet.h:93
vtkDepthPeelingPass::TranslucentZTextureUnit
static vtkInformationIntegerKey * TranslucentZTextureUnit()
vtkDepthPeelingPass::OpaqueZTextureUnit
static vtkInformationIntegerKey * OpaqueZTextureUnit()
vtkDepthPeelingPass::CurrentRGBATexture
vtkTextureObject * CurrentRGBATexture
Definition: vtkDepthPeelingPass.h:173
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
vtkDepthPeelingPass::Render
virtual void Render(const vtkRenderState *s)
vtkDepthPeelingPass::DestinationSize
static vtkInformationIntegerVectorKey * DestinationSize()
vtkOpenGLRenderWindow
OpenGL rendering window.
Definition: vtkOpenGLRenderWindow.h:41
vtkgl::w
GLubyte GLubyte GLubyte GLubyte w
Definition: vtkgl.h:12054
vtkRenderState
Context in which a vtkRenderPass will render.
Definition: vtkRenderState.h:40
vtkDepthPeelingPass::OpaqueRGBATexture
vtkTextureObject * OpaqueRGBATexture
Definition: vtkDepthPeelingPass.h:170
vtkInformationIntegerVectorKey
Key for integer vector values.
Definition: vtkInformationIntegerVectorKey.h:31
vtkDepthPeelingPass::SetTranslucentPass
virtual void SetTranslucentPass(vtkRenderPass *translucentPass)
vtkRenderPass
Perform part of the rendering of a vtkRenderer.
Definition: vtkRenderPass.h:58