VTK: Rendering/OpenGL2/vtkOrderIndependentTranslucentPass.h Source File

| VTK 9.3.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
23 VTK_ABI_NAMESPACE_BEGIN
24 class vtkOpenGLFramebufferObject;
25 class vtkTextureObject;
26 class vtkOpenGLRenderWindow;
27 class vtkOpenGLState;
28 class vtkOpenGLQuadHelper;
29
30 class VTKRENDERINGOPENGL2_EXPORT vtkOrderIndependentTranslucentPass : public vtkOpenGLRenderPass
31 {
32 public:
33 static vtkOrderIndependentTranslucentPass* New();
34 vtkTypeMacro(vtkOrderIndependentTranslucentPass, vtkOpenGLRenderPass);
35 void PrintSelf(ostream& os, vtkIndent indent) override;
36
41 void Render(const vtkRenderState* s) override;
42
48 void ReleaseGraphicsResources(vtkWindow* w) override;
49
51
57 vtkGetObjectMacro(TranslucentPass, vtkRenderPass);
58 virtual void SetTranslucentPass(vtkRenderPass* translucentPass);
60
61 // vtkOpenGLRenderPass virtuals:
62 bool PostReplaceShaderValues(std::string& vertexShader, std::string& geometryShader,
63 std::string& fragmentShader, vtkAbstractMapper* mapper, vtkProp* prop) override;
64
65 protected:
69 vtkOrderIndependentTranslucentPass();
70
74 ~vtkOrderIndependentTranslucentPass() override;
75
76 vtkRenderPass* TranslucentPass;
77
79
82 int ViewportX;
83 int ViewportY;
84 int ViewportWidth;
85 int ViewportHeight;
87
88 vtkOpenGLFramebufferObject* Framebuffer;
89 vtkOpenGLQuadHelper* FinalBlend;
90
91 vtkTextureObject* TranslucentRGBATexture;
92 vtkTextureObject* TranslucentRTexture;
93 vtkTextureObject* TranslucentZTexture;
94
95 void BlendFinalPeel(vtkOpenGLRenderWindow* renWin);
96
97 // useful to store
98 vtkOpenGLState* State;
99
100 private:
101 vtkOrderIndependentTranslucentPass(const vtkOrderIndependentTranslucentPass&) = delete;
102 void operator=(const vtkOrderIndependentTranslucentPass&) = delete;
103 };
104
105 VTK_ABI_NAMESPACE_END
106 #endif
vtkAbstractMapper
abstract class specifies interface to map data
Definition: vtkAbstractMapper.h:46
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkOpenGLFramebufferObject
Internal class which encapsulates OpenGL FramebufferObject.
Definition: vtkOpenGLFramebufferObject.h:174
vtkOpenGLQuadHelper
Class to make rendering a full screen quad easier.
Definition: vtkOpenGLQuadHelper.h:53
vtkOpenGLRenderPass
Abstract render pass with shader modifications.
Definition: vtkOpenGLRenderPass.h:28
vtkOpenGLRenderWindow
OpenGL rendering window.
Definition: vtkOpenGLRenderWindow.h:53
vtkOpenGLState
OpenGL state storage.
Definition: vtkOpenGLState.h:71
vtkOrderIndependentTranslucentPass
Implement OIT rendering using average color.
Definition: vtkOrderIndependentTranslucentPass.h:31
vtkOrderIndependentTranslucentPass::State
vtkOpenGLState * State
Definition: vtkOrderIndependentTranslucentPass.h:98
vtkOrderIndependentTranslucentPass::Framebuffer
vtkOpenGLFramebufferObject * Framebuffer
Definition: vtkOrderIndependentTranslucentPass.h:88
vtkOrderIndependentTranslucentPass::PostReplaceShaderValues
bool PostReplaceShaderValues(std::string &vertexShader, std::string &geometryShader, std::string &fragmentShader, vtkAbstractMapper *mapper, vtkProp *prop) override
Use vtkShaderProgram::Substitute to replace.
vtkOrderIndependentTranslucentPass::TranslucentZTexture
vtkTextureObject * TranslucentZTexture
Definition: vtkOrderIndependentTranslucentPass.h:93
vtkOrderIndependentTranslucentPass::vtkOrderIndependentTranslucentPass
vtkOrderIndependentTranslucentPass()
Default constructor.
vtkOrderIndependentTranslucentPass::Render
void Render(const vtkRenderState *s) override
Perform rendering according to a render state s.
vtkOrderIndependentTranslucentPass::ViewportX
int ViewportX
Cache viewport values for depth peeling.
Definition: vtkOrderIndependentTranslucentPass.h:82
vtkOrderIndependentTranslucentPass::TranslucentPass
vtkRenderPass * TranslucentPass
Definition: vtkOrderIndependentTranslucentPass.h:76
vtkOrderIndependentTranslucentPass::ViewportWidth
int ViewportWidth
Cache viewport values for depth peeling.
Definition: vtkOrderIndependentTranslucentPass.h:84
vtkOrderIndependentTranslucentPass::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkOrderIndependentTranslucentPass::TranslucentRGBATexture
vtkTextureObject * TranslucentRGBATexture
Definition: vtkOrderIndependentTranslucentPass.h:91
vtkOrderIndependentTranslucentPass::New
static vtkOrderIndependentTranslucentPass * New()
vtkOrderIndependentTranslucentPass::ViewportY
int ViewportY
Cache viewport values for depth peeling.
Definition: vtkOrderIndependentTranslucentPass.h:83
vtkOrderIndependentTranslucentPass::FinalBlend
vtkOpenGLQuadHelper * FinalBlend
Definition: vtkOrderIndependentTranslucentPass.h:89
vtkOrderIndependentTranslucentPass::TranslucentRTexture
vtkTextureObject * TranslucentRTexture
Definition: vtkOrderIndependentTranslucentPass.h:92
vtkOrderIndependentTranslucentPass::BlendFinalPeel
void BlendFinalPeel(vtkOpenGLRenderWindow *renWin)
vtkOrderIndependentTranslucentPass::SetTranslucentPass
virtual void SetTranslucentPass(vtkRenderPass *translucentPass)
Delegate for rendering the translucent polygonal geometry.
vtkOrderIndependentTranslucentPass::ReleaseGraphicsResources
void ReleaseGraphicsResources(vtkWindow *w) override
Release graphics resources and ask components to release their own resources.
vtkOrderIndependentTranslucentPass::~vtkOrderIndependentTranslucentPass
~vtkOrderIndependentTranslucentPass() override
Destructor.
vtkOrderIndependentTranslucentPass::ViewportHeight
int ViewportHeight
Cache viewport values for depth peeling.
Definition: vtkOrderIndependentTranslucentPass.h:85
vtkProp
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:55
vtkRenderPass
Perform part of the rendering of a vtkRenderer.
Definition: vtkRenderPass.h:49
vtkRenderState
Context in which a vtkRenderPass will render.
Definition: vtkRenderState.h:30
vtkTextureObject
abstracts an OpenGL texture object.
Definition: vtkTextureObject.h:33
vtkWindow
window superclass for vtkRenderWindow
Definition: vtkWindow.h:37
vtkX3D::string
@ string
Definition: vtkX3D.h:490
vtkOpenGLRenderPass.h