VTK  9.0.1
vtkOrderIndependentTranslucentPass.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkOrderIndependentTranslucentPass.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 vtkOrderIndependentTranslucentPass_h
27 #define vtkOrderIndependentTranslucentPass_h
28 
29 #include "vtkOpenGLRenderPass.h"
30 #include "vtkRenderingOpenGL2Module.h" // For export macro
31 
33 class vtkTextureObject;
35 class vtkOpenGLState;
37 
38 class VTKRENDERINGOPENGL2_EXPORT vtkOrderIndependentTranslucentPass : public vtkOpenGLRenderPass
39 {
40 public:
43  void PrintSelf(ostream& os, vtkIndent indent) override;
44 
49  void Render(const vtkRenderState* s) override;
50 
56  void ReleaseGraphicsResources(vtkWindow* w) override;
57 
59 
65  vtkGetObjectMacro(TranslucentPass, vtkRenderPass);
66  virtual void SetTranslucentPass(vtkRenderPass* translucentPass);
68 
69  // vtkOpenGLRenderPass virtuals:
70  bool PostReplaceShaderValues(std::string& vertexShader, std::string& geometryShader,
71  std::string& fragmentShader, vtkAbstractMapper* mapper, vtkProp* prop) override;
72 
73 protected:
78 
83 
85 
87 
90  int ViewportX;
91  int ViewportY;
95 
98 
102 
103  void BlendFinalPeel(vtkOpenGLRenderWindow* renWin);
104 
105  // useful to store
107 
108 private:
110  void operator=(const vtkOrderIndependentTranslucentPass&) = delete;
111 };
112 
113 #endif
OpenGL rendering window.
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:53
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.
window superclass for vtkRenderWindow
Definition: vtkWindow.h:37
int ViewportY
Cache viewport values for depth peeling.
Context in which a vtkRenderPass will render.
OpenGL state storage.
a simple class to control print indentation
Definition: vtkIndent.h:33
Internal class which encapsulates OpenGL FramebufferObject.
abstract class specifies interface to map data
abstracts an OpenGL texture object.
virtual void Render(const vtkRenderState *s)=0
Perform rendering according to a render state s.
Class to make rendering a full screen quad easier.
virtual void ReleaseGraphicsResources(vtkWindow *w)
Release graphics resources and ask components to release their own resources.
int ViewportHeight
Cache viewport values for depth peeling.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
Perform part of the rendering of a vtkRenderer.
Definition: vtkRenderPass.h:56
Abstract render pass with shader modifications.
virtual bool PostReplaceShaderValues(std::string &vertexShader, std::string &geometryShader, std::string &fragmentShader, vtkAbstractMapper *mapper, vtkProp *prop)
Use vtkShaderProgram::Substitute to replace //VTK::XXX:YYY declarations in the shader sources...
int ViewportX
Cache viewport values for depth peeling.
Implement OIT rendering using average color.