Package com.jme.scene.state

Examples of com.jme.scene.state.ZBufferState


        RenderManager rm = ClientContextJME.getWorldManager().getRenderManager();
        RenderComponent rc = rm.createRenderComponent(rootNode);
        this.addComponent(RenderComponent.class, rc);
       
        // Set the Z-buffer state on the root node
        ZBufferState zbuf = (ZBufferState)rm.createRendererState(StateType.ZBuffer);
        zbuf.setEnabled(true);
        zbuf.setFunction(ZBufferState.TestFunction.LessThanOrEqualTo);
       
        rootNode.setRenderState(zbuf);

        // Set the wireframe state on the root node
//        WireframeState wf = (WireframeState)rm.createRendererState(StateType.Wireframe);
View Full Code Here


        rootBG.attachChild(modelBG);

        WorldManager wm = ClientContextJME.getWorldManager();

        RenderManager renderManager = wm.getRenderManager();
        ZBufferState buf = (ZBufferState) renderManager.createRendererState(
                RenderState.RS_ZBUFFER);
        buf.setEnabled(true);
        buf.setFunction(ZBufferState.TestFunction.LessThanOrEqualTo);

        MaterialState matState =
                (MaterialState) renderManager.createRendererState(
                RenderState.RS_MATERIAL);
//        matState.setDiffuse(color);
View Full Code Here

        RenderManager rm = ClientContextJME.getWorldManager().getRenderManager();
        RenderComponent rc = rm.createRenderComponent(rootNode);
        this.addComponent(RenderComponent.class, rc);

        // Set the Z-buffer state on the root node
        ZBufferState zbuf = (ZBufferState)rm.createRendererState(StateType.ZBuffer);
        zbuf.setEnabled(true);
        zbuf.setFunction(ZBufferState.TestFunction.LessThanOrEqualTo);
        rootNode.setRenderState(zbuf);

        // Set the wireframe state on the root node
        WireframeState wf = (WireframeState)rm.createRendererState(StateType.Wireframe);
        wf.setEnabled(true);
View Full Code Here

    CullState cullState = display.getRenderer().createCullState();
    cullState.setCullMode( CullState.CS_NONE );
    cullState.setEnabled( true );
    skybox.setRenderState( cullState );

    ZBufferState zState = display.getRenderer().createZBufferState();
    zState.setEnabled( false );
    skybox.setRenderState( zState );

    FogState fs = display.getRenderer().createFogState();
    fs.setEnabled( false );
    skybox.setRenderState( fs );
View Full Code Here

    CullState cullState = display.getRenderer().createCullState();
    cullState.setCullMode( CullState.CS_NONE );
    cullState.setEnabled( true );
    skybox.setRenderState( cullState );

    ZBufferState zState = display.getRenderer().createZBufferState();
    zState.setEnabled( false );
    skybox.setRenderState( zState );

    FogState fs = display.getRenderer().createFogState();
    fs.setEnabled( false );
    skybox.setRenderState( fs );
View Full Code Here

    CullState cs = display.getRenderer().createCullState();
    cs.setCullMode(CullState.CS_BACK);
    root.setRenderState(cs);

    // enable the depth buffer
    ZBufferState buf = display.getRenderer().createZBufferState();
    buf.setEnabled(true);
    buf.setFunction(ZBufferState.CF_LEQUAL);
    root.setRenderState(buf);

    // enable statistics gathering
    renderer.enableStatistics(true);
View Full Code Here

    @Override
    protected void initGame() {
        GameStateManager.create();

        rootNode = new Node("rootNode");
        ZBufferState buf = display.getRenderer().createZBufferState();
        buf.setEnabled(true);
        buf.setFunction(ZBufferState.TestFunction.LessThanOrEqualTo);
        rootNode.setRenderState(buf);

        PointLight light = new PointLight();
        light.setDiffuse(new ColorRGBA(0.75f, 0.75f, 1.0f, 0.75f));
        light.setAmbient(new ColorRGBA(0.1f, 0.1f, 0.1f, 1.0f));
View Full Code Here

        Renderer renderer = DisplaySystem.getDisplaySystem().getRenderer();
        CullState cs = renderer.createCullState();
        cs.setCullFace(Face.Back);
        node.setRenderState(cs);
        if (useTransparency) {
            ZBufferState zs = renderer.createZBufferState();
            zs.setEnabled(false);
            node.setRenderState(zs);
            BlendState bs = renderer.createBlendState();
            bs.setBlendEnabled(true);
            node.setRenderState(bs);
            node.setRenderQueueMode(Renderer.QUEUE_TRANSPARENT);
View Full Code Here

        node = new CameraNode("cocpit", testCamera);
        SceneMonitor.getMonitor().registerNode(node, "COCKIP");

        node.setRenderQueueMode(Renderer.QUEUE_TRANSPARENT);
        ZBufferState zs = DisplaySystem.getDisplaySystem().getRenderer().createZBufferState();
        node.setRenderState(zs);
        TextureState ts = DisplaySystem.getDisplaySystem().getRenderer().createTextureState();
        node.setRenderState(ts);
        node.setRenderState(rootNode.getRenderState(RenderState.StateType.Light));
View Full Code Here

        TextureState ts = DisplaySystem.getDisplaySystem().getRenderer().createTextureState();

        this.setTextureCombineMode(TextureCombineMode.Off);
        this.setRenderState(ts);

        ZBufferState zs = DisplaySystem.getDisplaySystem().getRenderer().createZBufferState();
        zs.setFunction(zBuffer ? TestFunction.LessThanOrEqualTo : TestFunction.Always);
        zs.setWritable(false);
        zs.setEnabled(true);
        this.setRenderState(zs);
        this.setLightCombineMode(LightCombineMode.Off);
        this.updateRenderState();
        if (center != null) this.getLocalTranslation().set(center);
        this.updateGeometricState(0, true);
View Full Code Here

TOP

Related Classes of com.jme.scene.state.ZBufferState

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.