Interface ContourPlot.Renderer

All Superinterfaces:
ContourPlot.PDFRenderer
All Known Implementing Classes:
ContourPlot.CompleteRenderer, ContourPlot.CoordSysRenderer, ContourPlot.GenericRenderer, ContourPlot.Legend, ContourPlot.LinesRenderer, ContourPlot.TextRenderer, ContourPlot.TrianglesRenderer
Enclosing class:
ContourPlot

public static interface ContourPlot.Renderer extends ContourPlot.PDFRenderer
The Renderer interface defines methods to initialize the renderer, execute a rendering pass, close the renderer.

Implementation Notice:
If this renderer directly uses a shader, its fragment shader is obliged to output color for two buffers, which are the two color attachments of an

invalid reference
FBO
. These have to be written to
layout(location=0) out vec4 c1; and
layout(location=1) out vec4 c2;.
When the renderer has no use for the picking attachment, vec4(0,0,0,0) can be written as default.
Author:
hageldave
  • Method Details

    • renderFallback

      default void renderFallback(Graphics2D g, Graphics2D p, int w, int h)
      Renders this ContourPlot.Renderer's 'scene'. This is the fallback path in case OpenGL based rendering through
      invalid reference
      #render(int, int, int, int)
      is not available.
      Parameters:
      g - main graphics object for drawing onto the framebuffer
      p - graphics object for drawing onto the picking framebuffer (invisible but used for picking)
      w - width of the current viewport in pixels
      h - height of the current viewport in pixels
    • isEnabled

      boolean isEnabled()
      Whether this renderer is enabled or not. By default a renderer is enabled and will render upon
      invalid reference
      #render(int, int, int, int)
      or
      invalid reference
      #renderSVG(org.w3c.dom.Document, org.w3c.dom.Element, int, int)
      . When disabled those methods return right away and will not render anything.
      Returns:
      true when active