39 #ifndef vtkDualDepthPeelingPass_h
40 #define vtkDualDepthPeelingPass_h
43 #include "vtkRenderingOpenGL2Module.h"
47 VTK_ABI_NAMESPACE_BEGIN
71 vtkGetObjectMacro(VolumetricPass,
vtkRenderPass) virtual
void SetVolumetricPass(
76 bool PreReplaceShaderValues(
std::
string& vertexShader,
std::
string& geometryShader,
78 bool PostReplaceShaderValues(
std::
string& vertexShader,
std::
string& geometryShader,
85 bool PostReplaceTranslucentShaderValues(
std::
string& vertexShader,
std::
string& geometryShader,
87 bool PreReplaceVolumetricShaderValues(
std::
string& vertexShader,
std::
string& geometryShader,
129 void SetCurrentStage(ShaderStage stage);
130 vtkSetMacro(CurrentPeelType, PeelType);
135 void FreeGLObjects();
140 void RenderTranslucentPass();
145 void RenderVolumetricPass();
147 bool IsRenderingVolumes();
169 template <
size_t NumTextures>
172 this->ActivateDrawBuffers(a.data(), a.size());
174 void ActivateDrawBuffers(
const TextureName* ids,
size_t numTextures);
182 void InitializeOcclusionQuery();
183 void CopyOpaqueDepthBuffer();
184 void InitializeDepth();
186 void PeelVolumesOutsideTranslucentRange();
198 void PrepareFrontDestination();
199 void ClearFrontDestination();
200 void CopyFrontSourceToFrontDestination();
202 void InitializeTargetsForTranslucentPass();
203 void InitializeTargetsForVolumetricPass();
205 void PeelTranslucentGeometry();
206 void PeelVolumetricGeometry();
208 void BlendBackBuffer();
210 void StartTranslucentOcclusionQuery();
211 void EndTranslucentOcclusionQuery();
213 void StartVolumetricOcclusionQuery();
214 void EndVolumetricOcclusionQuery();
219 void SwapFrontBufferSourceDest();
220 void SwapDepthBufferSourceDest();
224 void AlphaBlendRender();
226 void BlendFinalImage();
227 void DeleteOcclusionQueryIds();
271 VTK_ABI_NAMESPACE_END
272 #endif // vtkDualDepthPeelingPass_h
abstract superclass for all actors, volumes and annotations
void ActivateDrawBuffers(const std::array< TextureName, NumTextures > &a)
Bind and activate draw buffers.
Implement Depth Peeling for use within a framebuffer pass.
const vtkRenderState * RenderState
bool SaveScissorTestState
unsigned int TranslucentOcclusionQueryId
vtkTypeUInt32 vtkMTimeType
vtkOpenGLQuadHelper * BackBlendHelper
vtkOpenGLQuadHelper * CopyDepthHelper
record modification and/or execution time
unsigned int VolumetricWrittenPixels
vtkTimeStamp CurrentStageTimeStamp
TextureName DepthDestination
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
window superclass for vtkRenderWindow
unsigned int OcclusionThreshold
Context in which a vtkRenderPass will render.
a simple class to control print indentation
The VertexArrayObject class uses, or emulates, vertex array objects.
int VolumetricRenderCount
Internal class which encapsulates OpenGL FramebufferObject.
vtkOpenGLQuadHelper * CopyColorHelper
int TranslucentRenderCount
static vtkDepthPeelingPass * New()
abstract class specifies interface to map data
abstracts an OpenGL texture object.
void ReleaseGraphicsResources(vtkWindow *w) override
Release graphics resources and ask components to release their own resources.
vtkRenderPass * VolumetricPass
vtkOpenGLQuadHelper * BlendHelper
Implements the dual depth peeling algorithm.
void Render(const vtkRenderState *s) override
Perform rendering according to a render state s.
Class to make rendering a full screen quad easier.
void ActivateDrawBuffer(TextureName id)
Bind and activate draw buffers.
vtkRenderTimerLog * Timer
Perform part of the rendering of a vtkRenderer.
unsigned int TranslucentWrittenPixels
unsigned int VolumetricOcclusionQueryId
TextureName FrontDestination
Asynchronously measures GPU execution times for a series of events.
The ShaderProgram uses one or more Shader objects.