VTK
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
vtkOrderIndependentTranslucentPass::FinalBlend
vtkOpenGLQuadHelper * FinalBlend
Definition: vtkOrderIndependentTranslucentPass.h:97
vtkRenderPass::ReleaseGraphicsResources
virtual void ReleaseGraphicsResources(vtkWindow *w)
Release graphics resources and ask components to release their own resources.
vtkOrderIndependentTranslucentPass::TranslucentZTexture
vtkTextureObject * TranslucentZTexture
Definition: vtkOrderIndependentTranslucentPass.h:101
vtkOpenGLRenderPass::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkOrderIndependentTranslucentPass::TranslucentPass
vtkRenderPass * TranslucentPass
Definition: vtkOrderIndependentTranslucentPass.h:84
vtkObject::New
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
vtkOrderIndependentTranslucentPass::State
vtkOpenGLState * State
Definition: vtkOrderIndependentTranslucentPass.h:106
vtkRenderPass::Render
virtual void Render(const vtkRenderState *s)=0
Perform rendering according to a render state s.
vtkOpenGLFramebufferObject
Internal class which encapsulates OpenGL FramebufferObject.
Definition: vtkOpenGLFramebufferObject.h:181
vtkOpenGLQuadHelper
Class to make rendering a full screen quad easier.
Definition: vtkOpenGLQuadHelper.h:57
vtkOrderIndependentTranslucentPass::ViewportX
int ViewportX
Cache viewport values for depth peeling.
Definition: vtkOrderIndependentTranslucentPass.h:90
vtkWindow
window superclass for vtkRenderWindow
Definition: vtkWindow.h:34
vtkOrderIndependentTranslucentPass::ViewportY
int ViewportY
Definition: vtkOrderIndependentTranslucentPass.h:91
vtkOrderIndependentTranslucentPass
Implement OIT rendering using average color.
Definition: vtkOrderIndependentTranslucentPass.h:38
vtkOrderIndependentTranslucentPass::TranslucentRTexture
vtkTextureObject * TranslucentRTexture
Definition: vtkOrderIndependentTranslucentPass.h:100
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkTextureObject
abstracts an OpenGL texture object.
Definition: vtkTextureObject.h:40
vtkOpenGLRenderPass::PostReplaceShaderValues
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.
vtkProp
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:47
vtkX3D::string
Definition: vtkX3D.h:496
vtkOrderIndependentTranslucentPass::TranslucentRGBATexture
vtkTextureObject * TranslucentRGBATexture
Definition: vtkOrderIndependentTranslucentPass.h:99
vtkOpenGLRenderPass
Abstract render pass with shader modifications.
Definition: vtkOpenGLRenderPass.h:38
vtkOpenGLRenderPass.h
vtkOrderIndependentTranslucentPass::ViewportWidth
int ViewportWidth
Definition: vtkOrderIndependentTranslucentPass.h:92
vtkOpenGLRenderWindow
OpenGL rendering window.
Definition: vtkOpenGLRenderWindow.h:51
vtkRenderState
Context in which a vtkRenderPass will render.
Definition: vtkRenderState.h:40
vtkOrderIndependentTranslucentPass::Framebuffer
vtkOpenGLFramebufferObject * Framebuffer
Definition: vtkOrderIndependentTranslucentPass.h:96
vtkOpenGLState
OpenGL state storage.
Definition: vtkOpenGLState.h:79
vtkAbstractMapper
abstract class specifies interface to map data
Definition: vtkAbstractMapper.h:52
vtkRenderPass
Perform part of the rendering of a vtkRenderer.
Definition: vtkRenderPass.h:56
vtkOrderIndependentTranslucentPass::ViewportHeight
int ViewportHeight
Definition: vtkOrderIndependentTranslucentPass.h:93