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 =========================================================================*/
41 #ifndef vtkDepthPeelingPass_h
42 #define vtkDepthPeelingPass_h
43 
44 #include "vtkRenderingOpenGLModule.h" // For export macro
45 #include "vtkRenderPass.h"
46 
48 class vtkDepthPeelingPassLayerList; // Pimpl
49 class vtkShaderProgram2;
50 class vtkShader2;
51 
53 {
54 public:
57  void PrintSelf(ostream& os, vtkIndent indent);
58 
59  //BTX
61 
63  virtual void Render(const vtkRenderState *s);
64  //ETX
66 
70 
72 
75  vtkGetObjectMacro(TranslucentPass,vtkRenderPass);
76  virtual void SetTranslucentPass(vtkRenderPass *translucentPass);
78 
80 
87  vtkSetClampMacro(OcclusionRatio,double,0.0,0.5);
88  vtkGetMacro(OcclusionRatio,double);
90 
92 
95  vtkSetMacro(MaximumNumberOfPeels,int);
96  vtkGetMacro(MaximumNumberOfPeels,int);
98 
100 
102  vtkGetMacro(LastRenderingUsedDepthPeeling,bool);
104 
111  protected:
114 
117 
121 
123  void CheckCompilation(unsigned int fragmentShader);
124 
126 
131  int layer);
133 
136  bool IsChecked;
138 
140 
146 
149  unsigned int DepthFormat;
150 
159 
164 
166 
168  vtkDepthPeelingPassLayerList *LayerList;
169 
170  unsigned int OpaqueLayerZ;
171  unsigned int TransparentLayerZ;
172 // unsigned int ProgramShader;
173 
174  // Is rendering at translucent geometry stage using depth peeling and
175  // rendering a layer other than the first one? (Boolean value)
176  // If so, the uniform variables UseTexture and Texture can be set.
177  // (Used by vtkOpenGLProperty or vtkOpenGLTexture)
179 
182 
183  int ShadowTexUnit; // texture unit allocated for the shadow texture
184  int OpaqueShadowTexUnit; // texture unit allocated for the opaque shadow tex.
185 
186  private:
187  vtkDepthPeelingPass(const vtkDepthPeelingPass&); // Not implemented.
188  void operator=(const vtkDepthPeelingPass&); // Not implemented.
189 };
190 
191 #endif
vtkGetObjectMacro
#define vtkGetObjectMacro(name, type)
Definition: vtkSetGet.h:232
vtkDepthPeelingPass::Prog
vtkShaderProgram2 * Prog
Definition: vtkDepthPeelingPass.h:180
vtkDepthPeelingPass::CheckCompilation
void CheckCompilation(unsigned int fragmentShader)
vtkDepthPeelingPass::TranslucentPass
vtkRenderPass * TranslucentPass
Definition: vtkDepthPeelingPass.h:134
vtkDepthPeelingPass::New
static vtkDepthPeelingPass * New()
vtkDepthPeelingPass
Implement an Order Independent Transparency render pass.
Definition: vtkDepthPeelingPass.h:53
vtkDepthPeelingPass::Shader
vtkShader2 * Shader
Definition: vtkDepthPeelingPass.h:181
vtkRenderPass.h
vtkDepthPeelingPass::~vtkDepthPeelingPass
virtual ~vtkDepthPeelingPass()
vtkDepthPeelingPass::ViewportHeight
int ViewportHeight
Definition: vtkDepthPeelingPass.h:144
vtkDepthPeelingPass::CheckSupport
void CheckSupport(vtkOpenGLRenderWindow *w)
vtkTimeStamp
record modification and/or execution time
Definition: vtkTimeStamp.h:35
vtkRenderingOpenGLModule.h
vtkgl::s
GLdouble s
Definition: vtkgl.h:11594
vtkDepthPeelingPass::DepthFormat
unsigned int DepthFormat
Definition: vtkDepthPeelingPass.h:149
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkDepthPeelingPass::vtkDepthPeelingPass
vtkDepthPeelingPass()
vtkDepthPeelingPass::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkDepthPeelingPass::TransparentLayerZ
unsigned int TransparentLayerZ
Definition: vtkDepthPeelingPass.h:171
vtkDepthPeelingPass::RenderPeel
int RenderPeel(const vtkRenderState *s, int layer)
vtkDepthPeelingPass::ReleaseGraphicsResources
void ReleaseGraphicsResources(vtkWindow *w)
vtkDepthPeelingPass::ShadowTexUnit
int ShadowTexUnit
Definition: vtkDepthPeelingPass.h:183
vtkWindow
window superclass for vtkRenderWindow
Definition: vtkWindow.h:34
vtkSetClampMacro
#define vtkSetClampMacro(name, type, min, max)
Definition: vtkSetGet.h:143
vtkDepthPeelingPass::ViewportY
int ViewportY
Definition: vtkDepthPeelingPass.h:142
vtkDepthPeelingPass::IsSupported
bool IsSupported
Definition: vtkDepthPeelingPass.h:137
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkDepthPeelingPass::DepthPeelingHigherLayer
int DepthPeelingHigherLayer
Definition: vtkDepthPeelingPass.h:178
vtkDepthPeelingPass::OpaqueLayerZ
unsigned int OpaqueLayerZ
Definition: vtkDepthPeelingPass.h:170
vtkDepthPeelingPass::LayerList
vtkDepthPeelingPassLayerList * LayerList
Definition: vtkDepthPeelingPass.h:168
vtkDepthPeelingPass::ViewportX
int ViewportX
Definition: vtkDepthPeelingPass.h:141
vtkGetMacro
#define vtkGetMacro(name, type)
Definition: vtkSetGet.h:93
vtkDepthPeelingPass::LastRenderingUsedDepthPeeling
bool LastRenderingUsedDepthPeeling
Definition: vtkDepthPeelingPass.h:165
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
vtkShaderProgram2
GLSL Program.
Definition: vtkShaderProgram2.h:68
vtkDepthPeelingPass::OpaqueShadowTexUnit
int OpaqueShadowTexUnit
Definition: vtkDepthPeelingPass.h:184
vtkDepthPeelingPass::IsChecked
bool IsChecked
Definition: vtkDepthPeelingPass.h:136
vtkShader2
GLSL Shader.
Definition: vtkShader2.h:62
vtkDepthPeelingPass::Render
virtual void Render(const vtkRenderState *s)
vtkDepthPeelingPass::ViewportWidth
int ViewportWidth
Definition: vtkDepthPeelingPass.h:143
vtkgl::layer
GLenum GLuint GLint GLint layer
Definition: vtkgl.h:13516
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::SetTranslucentPass
virtual void SetTranslucentPass(vtkRenderPass *translucentPass)
vtkDepthPeelingPass::MaximumNumberOfPeels
int MaximumNumberOfPeels
Definition: vtkDepthPeelingPass.h:163
vtkDepthPeelingPass::CheckTime
vtkTimeStamp CheckTime
Definition: vtkDepthPeelingPass.h:135
VTKRENDERINGOPENGL_EXPORT
#define VTKRENDERINGOPENGL_EXPORT
Definition: vtkRenderingOpenGLModule.h:15
vtkDepthPeelingPass::OcclusionRatio
double OcclusionRatio
Definition: vtkDepthPeelingPass.h:158
vtkRenderPass
Perform part of the rendering of a vtkRenderer.
Definition: vtkRenderPass.h:58