Class AbstractDepthPeelingAlgorithm

java.lang.Object
org.jzy3d.plot3d.rendering.ddp.algorithms.AbstractDepthPeelingAlgorithm
All Implemented Interfaces:
IDepthPeelingAlgorithm
Direct Known Subclasses:
AbstractAccumulationDepthPeeling, DualDepthPeelingAlgorithm, FrontToBackPeelingAlgorithm

public abstract class AbstractDepthPeelingAlgorithm extends Object implements IDepthPeelingAlgorithm
  • Field Details

    • MAX_DEPTH

      public static final float MAX_DEPTH
      See Also:
    • g_drawBuffers

      protected int[] g_drawBuffers
    • g_quadDisplayList

      protected int g_quadDisplayList
    • g_numPasses

      protected int g_numPasses
    • g_numGeoPasses

      protected int g_numGeoPasses
    • g_useOQ

      protected boolean g_useOQ
    • g_maxPasses

      protected int g_maxPasses
      Maximum number of passes when occlusion queries decide when to stop peeling. A GL implementation whose occlusion query never reaches zero would otherwise peel forever.
    • g_white

      protected float[] g_white
    • g_black

      protected float[] g_black
    • g_backgroundColor

      protected float[] g_backgroundColor
    • g_opacity

      protected float[] g_opacity
    • g_queryId

      protected int[] g_queryId
    • targetFramebuffer

      protected int[] targetFramebuffer
      The framebuffer and draw buffer the algorithm renders the final image to, which were bound before the algorithm executes. This is the default framebuffer for an onscreen canvas, or the canvas framebuffer for an offscreen canvas.
    • targetDrawBuffer

      protected int[] targetDrawBuffer
  • Constructor Details

    • AbstractDepthPeelingAlgorithm

      public AbstractDepthPeelingAlgorithm()
  • Method Details

    • saveTargetFramebuffer

      protected void saveTargetFramebuffer(org.jzy3d.painters.IPainter painter)
      Remember the framebuffer and draw buffer the algorithm must render the final image to.
    • bindTargetFramebuffer

      protected void bindTargetFramebuffer(org.jzy3d.painters.IPainter painter)
      Bind the framebuffer the algorithm must render the final image to.
    • checkFramebuffer

      protected void checkFramebuffer(org.jzy3d.painters.IPainter painter, String name, int width, int height)
      Verify the framebuffer currently bound can be rendered to. A GL implementation not supporting the format of one of its attachments would otherwise silently render nothing.
      Throws:
      IllegalStateException - if the framebuffer is incomplete.
    • bindTargetFramebufferAndDrawBuffer

      protected void bindTargetFramebufferAndDrawBuffer(org.jzy3d.painters.IPainter painter)
      Bind the framebuffer and draw buffer the algorithm must render the final image to.
    • setBackground

      public void setBackground(float[] color)
      Specified by:
      setBackground in interface IDepthPeelingAlgorithm
    • getBackground

      public float[] getBackground()
      Specified by:
      getBackground in interface IDepthPeelingAlgorithm
    • setMaxPasses

      public void setMaxPasses(int maxPasses)
      Set the maximum number of passes when occlusion queries decide when to stop peeling.
    • getMaxPasses

      public int getMaxPasses()
    • setOpacity

      public void setOpacity(float opacity)
      Specified by:
      setOpacity in interface IDepthPeelingAlgorithm
    • getOpacity

      public float getOpacity()
      Specified by:
      getOpacity in interface IDepthPeelingAlgorithm
    • buildShaders

      protected abstract void buildShaders(org.jzy3d.painters.IPainter painter)
    • destroyShaders

      protected abstract void destroyShaders(org.jzy3d.painters.IPainter painter)
    • reloadShaders

      protected void reloadShaders(org.jzy3d.painters.IPainter painter)
    • buildFullScreenQuad

      protected void buildFullScreenQuad(org.jzy3d.painters.IPainter painter)
    • buildFinish

      public void buildFinish(org.jzy3d.painters.IPainter painter)
    • getTasksToRender

      public IGLRenderer getTasksToRender()
      Specified by:
      getTasksToRender in interface IDepthPeelingAlgorithm
    • setTasksToRender

      public void setTasksToRender(IGLRenderer tasksToRender)
      Specified by:
      setTasksToRender in interface IDepthPeelingAlgorithm
    • tasksToRender

      protected void tasksToRender(org.jzy3d.painters.IPainter painter)
    • resetNumPass

      protected void resetNumPass()
    • incrementGeoPasses

      protected void incrementGeoPasses()
    • dispose

      public void dispose(org.jzy3d.painters.IPainter painter)
      Specified by:
      dispose in interface IDepthPeelingAlgorithm
    • shader

      protected URL shader(String glsl)