class OffscreenCanvas extends GLAbstractListener implements TileRendererBase.TileRendererListener {

    private final boolean transparentBackground;

    public OffscreenCanvas(int width, int height, boolean transparentBackground, int antialiasing) {
        super();

        final GLProfile glp = GLProfile.get(GLProfile.GL2);
        final GLCapabilities caps = getCaps();
        caps.setOnscreen(false);
        caps.setDoubleBuffered(false);
        if (antialiasing == 0) {
            caps.setSampleBuffers(false);
        } else {
            caps.setSampleBuffers(true);
            caps.setNumSamples(antialiasing);
        }

        final GLDrawableFactory factory = GLDrawableFactory.getFactory(glp);
        drawable = factory.createOffscreenAutoDrawable(null, caps, null, width, height);

        drawable.addGLEventListener(this);

        cameraLocation = vizController.getDrawable().getCameraLocation();
        cameraTarget = vizController.getDrawable().getCameraTarget();

        engine = VizController.getInstance().getEngine();
        globalScale = VizController.getInstance().getDrawable().getGlobalScale();
        this.transparentBackground = transparentBackground;
    }

    @Override
    protected GLAutoDrawable initDrawable() {
        return drawable;
    }

    @Override
    public void init(GLAutoDrawable drawable) {
        GL2 gl = drawable.getGL().getGL2();

        initConfig(gl);
        engine.initDisplayLists(gl, GLU);

        TextManager textManager = VizController.getInstance().getTextManager();
        textManager.reinitRenderers();
    }

    @Override
    public void initConfig(GL2 gl) {
        super.initConfig(gl);

        gl.glClear(GL2.GL_COLOR_BUFFER_BIT);
        float[] backgroundColor = vizController.getVizModel().getBackgroundColorComponents();
        gl.glClearColor(backgroundColor[0], backgroundColor[1], backgroundColor[2], transparentBackground ? 0f : 1f);
    }

    @Override
    public void display(GLAutoDrawable drawable) {<FILL_FUNCTION_BODY>}

    @Override
    protected void init(GL2 gl) {

    }

    @Override
    protected void render3DScene(GL2 gl, com.jogamp.opengl.glu.GLU glu) {

    }

    @Override
    protected void reshape3DScene(GL2 gl) {

    }

    @Override
    public void addTileRendererNotify(TileRendererBase trb) {

    }

    @Override
    public void removeTileRendererNotify(TileRendererBase trb) {

    }

    @Override
    public void reshapeTile(TileRendererBase tr, int tileX, int tileY, int tileWidth, int tileHeight, int imageWidth,
                            int imageHeight) {
        GL2 gl = tr.getAttachedDrawable().getGL().getGL2();

        double aspectRatio = (double) imageWidth / (double) imageHeight;

        // Compute overall frustum
        float left, right, bottom, top;
        top = (float) (nearDistance * Math.tan(viewField * 3.14159265 / 360.0));
        bottom = -top;
        left = (float) (bottom * aspectRatio);
        right = (float) (top * aspectRatio);

        float w = right - left;
        float h = top - bottom;

        // Compute tiled frustum
        float l = left + tileX * w / imageWidth;
        float r = l + tileWidth * w / imageWidth;

        float b = bottom + tileY * h / imageHeight;
        float t = b + tileHeight * h / imageHeight;

        gl.glMatrixMode(GL2.GL_PROJECTION);
        gl.glLoadIdentity();

        gl.glFrustum(l, r, b, t, nearDistance, farDistance);

        gl.glMatrixMode(GL2.GL_MODELVIEW);
        gl.glLoadIdentity();

        setCameraPosition(gl, GLU);
    }

    @Override
    public void startTileRendering(TileRendererBase trb) {

    }

    @Override
    public void endTileRendering(TileRendererBase trb) {

    }

    @Override
    public void reinitWindow() {
    }
}

        GL2 gl = drawable.getGL().getGL2();

        gl.glClear(GL2.GL_COLOR_BUFFER_BIT);
        float[] backgroundColor = vizController.getVizModel().getBackgroundColorComponents();
        gl.glClearColor(backgroundColor[0], backgroundColor[1], backgroundColor[2], transparentBackground ? 0f : 1f);

        engine.display(gl, GLU);
    
<methods>public void <init>() ,public void destroy() ,public void display(GLAutoDrawable) ,public void display() ,public void dispose(GLAutoDrawable) ,public float[] getCameraLocation() ,public float[] getCameraTarget() ,public org.gephi.lib.gleem.linalg.Vec3f getCameraVector() ,public double getDraggingMarkerX() ,public double getDraggingMarkerY() ,public GL2 getGL() ,public GLAutoDrawable getGLAutoDrawable() ,public float getGlobalScale() ,public synchronized java.awt.Component getGraphComponent() ,public org.gephi.visualization.opengl.GraphicalConfiguration getGraphicalConfiguration() ,public java.awt.Point getLocationOnScreen() ,public java.nio.FloatBuffer getModelMatrix() ,public java.nio.FloatBuffer getProjectionMatrix() ,public java.nio.IntBuffer getViewport() ,public int getViewportHeight() ,public int getViewportWidth() ,public void init(GLAutoDrawable) ,public void initArchitecture() ,public void initConfig(GL2) ,public void initMouseEvents() ,public boolean isDestroyed() ,public double[] myGluProject(float, float) ,public float[] myGluProject(float, float, float) ,public void refreshDraggingMarker() ,public void renderTestCube(GL2) ,public void reshape(GLAutoDrawable, int, int, int, int) ,public void setCameraLocation(float[]) ,public void setCameraPosition(GL2, GLU) ,public void setCameraTarget(float[]) ,public void setVizController(org.gephi.visualization.VizController) <variables>protected static final GLU GLU,private double aspectRatio,protected float[] cameraLocation,protected float[] cameraTarget,protected org.gephi.lib.gleem.linalg.Vec3f cameraVector,private boolean destroyed,protected double[] draggingMarker,protected GLAutoDrawable drawable,protected org.gephi.visualization.opengl.AbstractEngine engine,public final float farDistance,protected float fps,protected float fpsAvg,protected float fpsCount,protected float globalScale,protected java.awt.Component graphComponent,protected org.gephi.visualization.apiimpl.GraphIO graphIO,protected org.gephi.visualization.swing.GLAbstractListener.GraphMouseAdapter graphMouseAdapter,protected java.awt.event.MouseAdapter graphMouseAdapterCanvas,protected MouseAdapter graphMouseAdapterNewt,protected org.gephi.visualization.opengl.GraphicalConfiguration graphicalConfiguration,protected java.nio.FloatBuffer modelMatrix,public final float nearDistance,protected java.nio.FloatBuffer projMatrix,private volatile boolean resizing,private static float rotateFactor,protected org.gephi.visualization.apiimpl.Scheduler scheduler,private boolean showGLLog,private long startTime,public final float viewField,protected java.nio.IntBuffer viewport,protected org.gephi.visualization.VizController vizController,protected org.gephi.visualization.VizModel vizModel,protected GLWindow window