VTK  9.7.1
vtkOrderIndependentTranslucentPass.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
17 #ifndef vtkOrderIndependentTranslucentPass_h
18 #define vtkOrderIndependentTranslucentPass_h
19 
20 #include "vtkOpenGLRenderPass.h"
21 #include "vtkRenderingOpenGL2Module.h" // For export macro
22 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
23 
24 VTK_ABI_NAMESPACE_BEGIN
26 class vtkTextureObject;
28 class vtkOpenGLState;
30 
31 class VTKRENDERINGOPENGL2_EXPORT VTK_MARSHALAUTO vtkOrderIndependentTranslucentPass
32  : public vtkOpenGLRenderPass
33 {
34 public:
37  void PrintSelf(ostream& os, vtkIndent indent) override;
38 
43  void Render(const vtkRenderState* s) override;
44 
50  void ReleaseGraphicsResources(vtkWindow* w) override;
51 
53 
59  vtkGetObjectMacro(TranslucentPass, vtkRenderPass);
60  virtual void SetTranslucentPass(vtkRenderPass* translucentPass);
62 
63  // vtkOpenGLRenderPass virtuals:
64  bool PostReplaceShaderValues(std::string& vertexShader, std::string& geometryShader,
65  std::string& fragmentShader, vtkAbstractMapper* mapper, vtkProp* prop) override;
66 
67 protected:
72 
77 
79 
81 
84  int ViewportX;
85  int ViewportY;
89 
92 
96 
97  void BlendFinalPeel(vtkOpenGLRenderWindow* renWin);
98 
99  // useful to store
101 
102 private:
104  void operator=(const vtkOrderIndependentTranslucentPass&) = delete;
105 };
106 
107 VTK_ABI_NAMESPACE_END
108 #endif
OpenGL rendering window.
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:49
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:41
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:28
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.
#define VTK_MARSHALAUTO
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:49
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.
int ViewportX
Cache viewport values for depth peeling.
Implement OIT rendering using average color.