private void recurse(int depth, Portal ignore) {
        if (depth < max_depth) {
            int pNum = 0;
            for (Portal p : portalList) {
                if (p == ignore) {
                    continue; // perf
                }
                // stencil per portal
                buffers(true, false, false);
                glStencilFunc(GL_NOTEQUAL, depth, 0xFF); // passes if outside
                glStencilOp(GL_INCR, GL_KEEP, GL_KEEP); // increment on fail
                drawShape(p);
                dump(GL_STENCIL_INDEX, "p" + pNum++ + ",d" + depth);

                // draw inside
                buffers(false, true, true);
                glStencilFunc(GL_EQUAL, depth + 1, 0xFF); // passes if in portal
                glPushMatrix();
                {
                    p.calcInternal();
                    recurse(depth + 1, p.dest);
                }
                glPopMatrix();

                // clear temp stencil
                clampStencil(depth);
            }
        }

        //<editor-fold defaultstate="collapsed" desc="stencil all">
        buffers(true, false, false);

        // draw within current portal
        glStencilFunc(GL_NOTEQUAL, depth, 0xFF); // passes if outside
        glStencilOp(GL_INCR, GL_KEEP, GL_KEEP); // increment on fail

        for (Portal p : portalList) {
            drawShape(p);
        }
        dump(GL_STENCIL_INDEX, "all,d" + depth);
        //</editor-fold>

        //<editor-fold defaultstate="collapsed" desc="fix depth">
        buffers(false, true, depth == max_depth);
        // Passes if ref & mask < stencil & mask
        glStencilFunc(GL_LESS, depth, 0xFF);

        glClearDepth(1);
        glClear(GL_DEPTH_BUFFER_BIT); // clear portal depth
        for (Portal p : portalList) {
            drawShape(p);
        }
        //</editor-fold>

        //<editor-fold defaultstate="collapsed" desc="outline">
        glColorMask(true, true, true, true);
        glStencilFunc(GL_LEQUAL, depth, 0xFF); // allow fx outside of internal
        for (Portal p : portalList) {
            p.outline(p == ignore);
        }
        //</editor-fold>

        buffers(false, true, true);
        glStencilFunc(GL_LEQUAL, depth, 0xFF); // pass if depth <= stencil

        drawWorld();
        dump(GL_RGBA, "world,d" + depth);
    }