51 #ifndef vtkDualDepthPeelingPass_h
52 #define vtkDualDepthPeelingPass_h
54 #include "vtkRenderingOpenGL2Module.h"
70 void PrintSelf(ostream &os,
vtkIndent indent) VTK_OVERRIDE;
73 void ReleaseGraphicsResources(
vtkWindow *w) VTK_OVERRIDE;
82 virtual
void SetVolumetricPass(
vtkRenderPass *volumetricPass);
86 bool PreReplaceShaderValues(std::
string &vertexShader,
87 std::
string &geometryShader,
88 std::
string &fragmentShader,
91 bool PostReplaceShaderValues(std::
string &vertexShader,
92 std::
string &geometryShader,
93 std::
string &fragmentShader,
100 virtual
vtkMTimeType GetShaderStageMTime() VTK_OVERRIDE;
104 bool PostReplaceTranslucentShaderValues(std::
string &vertexShader,
105 std::
string &geometryShader,
106 std::
string &fragmentShader,
109 bool PreReplaceVolumetricShaderValues(std::
string &vertexShader,
110 std::
string &geometryShader,
111 std::
string &fragmentShader,
157 void SetCurrentStage(ShaderStage stage);
163 void FreeGLObjects();
168 void RenderTranslucentPass();
173 void RenderVolumetricPass();
175 bool IsRenderingVolumes();
197 void InitializeOcclusionQuery();
198 void CopyOpaqueDepthBuffer();
199 void InitializeDepth();
201 void PeelVolumesOutsideTranslucentRange();
213 void PrepareFrontDestination();
214 void ClearFrontDestination();
215 void CopyFrontSourceToFrontDestination();
217 void InitializeTargetsForTranslucentPass();
218 void InitializeTargetsForVolumetricPass();
220 void PeelTranslucentGeometry();
221 void PeelVolumetricGeometry();
223 void BlendBackBuffer();
225 void StartTranslucentOcclusionQuery();
226 void EndTranslucentOcclusionQuery();
228 void StartVolumetricOcclusionQuery();
229 void EndVolumetricOcclusionQuery();
234 void SwapFrontBufferSourceDest();
235 void SwapDepthBufferSourceDest();
239 void AlphaBlendRender();
241 void BlendFinalImage();
242 void DeleteOcclusionQueryIds();
276 bool LastPeelHadVolumes;
278 unsigned int TranslucentOcclusionQueryId;
279 unsigned int TranslucentWrittenPixels;
280 unsigned int VolumetricOcclusionQueryId;
281 unsigned int VolumetricWrittenPixels;
282 unsigned int OcclusionThreshold;
284 int TranslucentRenderCount;
285 int VolumetricRenderCount;
288 bool SaveScissorTestState;
290 bool CullFaceEnabled;
297 #endif // vtkDualDepthPeelingPass_h
abstract superclass for all actors, volumes and annotations
Implement an Order Independent Transparency render pass.
vtkTypeUInt32 vtkMTimeType
record modification and/or execution time
window superclass for vtkRenderWindow
Context in which a vtkRenderPass will render.
a simple class to control print indentation
The VertexArrayObject class uses, or emulates, vertex array objects.
Internal class which encapsulates OpenGL FramebufferObject.
static vtkDepthPeelingPass * New()
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
abstract class specifies interface to map data
abstracts an OpenGL texture object.
Implements the dual depth peeling algorithm.
Perform part of the rendering of a vtkRenderer.
Asynchronously measures GPU execution times for a series of events.
The ShaderProgram uses one or more Shader objects.