39 #ifndef vtkDualDepthPeelingPass_h
40 #define vtkDualDepthPeelingPass_h
43 #include "vtkRenderingOpenGL2Module.h"
48 VTK_ABI_NAMESPACE_BEGIN
74 virtual
void SetVolumetricPass(
vtkRenderPass* volumetricPass);
78 bool PreReplaceShaderValues(
std::
string& vertexShader,
std::
string& geometryShader,
80 bool PostReplaceShaderValues(
std::
string& vertexShader,
std::
string& geometryShader,
87 bool PostReplaceTranslucentShaderValues(
std::
string& vertexShader,
std::
string& geometryShader,
89 bool PreReplaceVolumetricShaderValues(
std::
string& vertexShader,
std::
string& geometryShader,
114 InitializingDepth = 0,
131 void SetCurrentStage(ShaderStage stage);
132 vtkSetMacro(CurrentPeelType, PeelType);
137 void FreeGLObjects();
142 void RenderTranslucentPass();
147 void RenderVolumetricPass();
149 bool IsRenderingVolumes();
171 template <
size_t NumTextures>
174 this->ActivateDrawBuffers(a.data(), a.size());
176 void ActivateDrawBuffers(
const TextureName* ids,
size_t numTextures);
184 void InitializeOcclusionQuery();
185 void CopyOpaqueDepthBuffer();
186 void InitializeDepth();
188 void PeelVolumesOutsideTranslucentRange();
200 void PrepareFrontDestination();
201 void ClearFrontDestination();
202 void CopyFrontSourceToFrontDestination();
204 void InitializeTargetsForTranslucentPass();
205 void InitializeTargetsForVolumetricPass();
207 void PeelTranslucentGeometry();
208 void PeelVolumetricGeometry();
210 void BlendBackBuffer();
212 void StartTranslucentOcclusionQuery();
213 void EndTranslucentOcclusionQuery();
215 void StartVolumetricOcclusionQuery();
216 void EndVolumetricOcclusionQuery();
221 void SwapFrontBufferSourceDest();
222 void SwapDepthBufferSourceDest();
226 void AlphaBlendRender();
228 void BlendFinalImage();
229 void DeleteOcclusionQueryIds();
273 VTK_ABI_NAMESPACE_END
274 #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.