Package com.ardor3d.framework.lwjgl

Examples of com.ardor3d.framework.lwjgl.LwjglCanvasRenderer




        // get our framework

        final LwjglCanvasRenderer canvasRenderer = new LwjglCanvasRenderer(this);
        _canvas = new LwjglCanvas( _settings, canvasRenderer);
        _physicalLayer = new PhysicalLayer(new LwjglKeyboardWrapper(), new LwjglMouseWrapper(),
                new LwjglControllerWrapper(), (LwjglCanvas) _canvas);
        _mouseManager = new LwjglMouseManager();
        TextureRendererFactory.INSTANCE.setProvider(new LwjglTextureRendererProvider());
View Full Code Here


     * Setup an lwjgl canvas and canvas renderer.
     *
     * @return the canvas.
     */
    private LwjglCanvas initLwjgl() {
        final LwjglCanvasRenderer canvasRenderer = new LwjglCanvasRenderer(this);
        final DisplaySettings settings = new DisplaySettings(800, 600, 24, 0, 0, 8, 0, 0, false, false);
        return new LwjglCanvas(settings, canvasRenderer);
    }
View Full Code Here

        }
    }

    protected void initGL() throws LWJGLException {
        TextureRendererFactory.INSTANCE.setProvider(new LwjglTextureRendererProvider());
        final LwjglCanvasRenderer canvasRenderer = new LwjglCanvasRenderer(this);
        _glCanvas = new LwjglDisplayCanvas(_displayCanvas, _settings, canvasRenderer);
        _glCanvas.init();

        // by default, we'll keep it vsync'd
        _glCanvas.setVSyncEnabled(true);
View Full Code Here

        example._settings = settings;

        // get our framework
        if (prefs.getRenderer().startsWith("LWJGL")) {
            final LwjglCanvasRenderer canvasRenderer = new LwjglCanvasRenderer(example);
            example._canvas = new LwjglCanvas(settings, canvasRenderer);
            example._physicalLayer = new PhysicalLayer(new LwjglKeyboardWrapper(), new LwjglMouseWrapper(),
                    new LwjglControllerWrapper(), (LwjglCanvas) example._canvas);
            example._mouseManager = new LwjglMouseManager();
            TextureRendererFactory.INSTANCE.setProvider(new LwjglTextureRendererProvider());
View Full Code Here

        if ("true".equalsIgnoreCase(System.getProperty("jogl"))) {
            final JoglCanvasRenderer canvasRenderer = new JoglCanvasRenderer(this);
            final DisplaySettings settings = new DisplaySettings(width, height, 24, 0, 0, 8, 0, 0, false, false);
            return new JoglCanvas(canvasRenderer, settings);
        } else {
            final LwjglCanvasRenderer canvasRenderer = new LwjglCanvasRenderer(this);
            final DisplaySettings settings = new DisplaySettings(width, height, 24, 0, 0, 8, 0, 0, false, false);
            return new LwjglCanvas(settings, canvasRenderer);
        }
    }
View Full Code Here

        bottomRight.setLayout(new FillLayout());

        canvasParent.layout();

        final SwtCanvas canvas1 = new SwtCanvas(topLeft, SWT.NONE, data);
        final LwjglCanvasRenderer lwjglCanvasRenderer1 = new LwjglCanvasRenderer(scene);
        addCallback(canvas1, lwjglCanvasRenderer1);
        canvas1.setCanvasRenderer(lwjglCanvasRenderer1);
        frameWork.addCanvas(canvas1);
        canvas1.addControlListener(newResizeHandler(canvas1, lwjglCanvasRenderer1));
        canvas1.setFocus();

        final SwtCanvas canvas2 = new SwtCanvas(bottomLeft, SWT.NONE, data);
        final LwjglCanvasRenderer lwjglCanvasRenderer2 = new LwjglCanvasRenderer(scene);
        addCallback(canvas2, lwjglCanvasRenderer2);
        canvas2.setCanvasRenderer(lwjglCanvasRenderer2);
        frameWork.addCanvas(canvas2);
        canvas2.addControlListener(newResizeHandler(canvas2, lwjglCanvasRenderer2));

        final SwtCanvas canvas3 = new SwtCanvas(topRight, SWT.NONE, data);
        final LwjglCanvasRenderer lwjglCanvasRenderer3 = new LwjglCanvasRenderer(scene);
        addCallback(canvas3, lwjglCanvasRenderer3);
        canvas3.setCanvasRenderer(lwjglCanvasRenderer3);
        frameWork.addCanvas(canvas3);
        canvas3.addControlListener(newResizeHandler(canvas3, lwjglCanvasRenderer3));

        final SwtCanvas canvas4 = new SwtCanvas(bottomRight, SWT.NONE, data);
        final LwjglCanvasRenderer lwjglCanvasRenderer4 = new LwjglCanvasRenderer(scene);
        addCallback(canvas4, lwjglCanvasRenderer4);
        canvas4.setCanvasRenderer(lwjglCanvasRenderer4);
        frameWork.addCanvas(canvas4);
        canvas4.addControlListener(newResizeHandler(canvas4, lwjglCanvasRenderer4));
View Full Code Here

        return new MouseCursor("cursor1", image, 0, image.getHeight() - 1);
    }

    private static void addCanvas(final JFrame frame, final ExampleScene scene, final LogicalLayer logicalLayer,
            final FrameHandler frameWork) throws Exception {
        final LwjglCanvasRenderer canvasRenderer = new LwjglCanvasRenderer(scene);

        final DisplaySettings settings = new DisplaySettings(400, 300, 24, 0, 0, 16, 0, 0, false, false);
        final LwjglAwtCanvas theCanvas = new LwjglAwtCanvas(settings, canvasRenderer);

        frame.add(theCanvas);
View Full Code Here

TOP

Related Classes of com.ardor3d.framework.lwjgl.LwjglCanvasRenderer

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.