Package com.ardor3d.util.scenegraph

Examples of com.ardor3d.util.scenegraph.RenderDelegate


     *            the renderer to draw to.
     */
    @Override
    public void draw(final Renderer r) {

        final RenderDelegate delegate = getCurrentRenderDelegate();
        if (delegate == null) {
            Spatial child;
            for (int i = getNumberOfChildren() - 1; i >= 0; i--) {
                child = _children.get(i);
                if (child != null) {
                    child.onDraw(r);
                }
            }
        } else {
            // Queue as needed
            if (!r.isProcessingQueue()) {
                if (r.checkAndAdd(this)) {
                    return;
                }
            }

            delegate.render(this, r);
        }
    }
View Full Code Here


            if (r.checkAndAdd(this)) {
                return;
            }
        }

        final RenderDelegate delegate = getCurrentRenderDelegate();
        if (delegate == null) {
            r.draw((Renderable) this);
        } else {
            delegate.render(this, r);
        }
    }
View Full Code Here

        // otherwise... grab our current context
        final RenderContext context = ContextManager.getCurrentContext();

        // get the delegate for this context
        RenderDelegate delegate = getRenderDelegate(context.getGlContextRep());
        // if none, check for a default delegate.
        if (delegate == null) {
            delegate = getRenderDelegate(null);
        }
View Full Code Here

            if (r.checkAndAdd(this)) {
                return;
            }
        }

        final RenderDelegate delegate = getCurrentRenderDelegate();
        if (delegate == null) {
            r.draw((Renderable) this);
        } else {
            delegate.render(this, r);
        }
    }
View Full Code Here

        final CompileOptions options = new CompileOptions();
        options.setDisplayList(true);
        SceneCompiler.compile(heavyNode, renderer, options);

        final Object contextRef = ContextManager.getCurrentContext().getGlContextRep();
        final RenderDelegate delegate = heavyNode.getRenderDelegate(contextRef);

        for (final Spatial spatial : compiledNodes.getChildren()) {
            spatial.setRenderDelegate(delegate, contextRef);
        }
    }
View Full Code Here

TOP

Related Classes of com.ardor3d.util.scenegraph.RenderDelegate

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.