Package com.ardor3d.renderer.state

Examples of com.ardor3d.renderer.state.TextureState


        buf.setEnabled(true);
        buf.setFunction(ZBufferState.TestFunction.LessThanOrEqualTo);
        _root.setRenderState(buf);

        // Create a texture from the Ardor3D logo.
        final TextureState ts = new TextureState();
        ts.setEnabled(true);
        ts.setTexture(TextureManager.load("images/ardor3d_white_256.jpg", Texture.MinificationFilter.Trilinear, true));
        _root.setRenderState(ts);
    }
View Full Code Here


        buf.setEnabled(true);
        buf.setFunction(ZBufferState.TestFunction.LessThanOrEqualTo);
        _root.setRenderState(buf);

        // Create a texture from the Ardor3D logo.
        final TextureState ts = new TextureState();
        ts.setEnabled(true);
        ts.setTexture(TextureManager.load("images/ardor3d_white_256.jpg", Texture.MinificationFilter.Trilinear, true));
        _root.setRenderState(ts);
    }
View Full Code Here

        _pointCubes = new Point();
        _pointCubes.setRenderState(_pointCubeShaderState);
        final Texture tex = TextureManager.load("images/cube_map.png", Texture.MinificationFilter.BilinearNoMipMaps,
                TextureStoreFormat.GuessCompressedFormat, true);
        tex.setMagnificationFilter(MagnificationFilter.Bilinear);
        final TextureState ts = new TextureState();
        ts.setTexture(tex);
        ts.getTexture().setWrap(WrapMode.EdgeClamp);
        ts.setEnabled(true);
        ts.setCorrectionType(CorrectionType.Perspective);
        _pointCubes.setRenderState(ts);

        int xDim, yDim, zDim;
        xDim = yDim = zDim = 100;
        final int cubeCount = xDim * yDim * zDim;
 
View Full Code Here

        t.getSceneHints().setRenderBucketType(RenderBucketType.Ortho);
        t.getSceneHints().setLightCombineMode(LightCombineMode.Off);
        t.setTranslation(new Vector3(0, 20, 0));
        _root.attachChild(t);

        final TextureState ts = new TextureState();
        ts.setEnabled(true);
        ts.setTexture(TextureManager.load("images/ardor3d_white_256.jpg", Texture.MinificationFilter.Trilinear,
                TextureStoreFormat.GuessCompressedFormat, true));

        _root.setRenderState(ts);

        final Quad quad = new Quad("Quad", 5, 5);
View Full Code Here

            }
        });
        _root.attachChild(sphere);

        // Add a texture to the sphere.
        final TextureState ts = new TextureState();
        ts.setTexture(TextureManager.load("images/ardor3d_white_256.jpg", Texture.MinificationFilter.Trilinear, true));
        sphere.setRenderState(ts);

        // Setup our manager
        effectManager = new EffectManager(_settings, TextureStoreFormat.RGBA8);
        effectManager.setSceneCamera(_canvas.getCanvasRenderer().getCamera());
View Full Code Here

        colors[220] = ColorRGBA.BLUE;
        colors[255] = ColorRGBA.BLACK;
        GeneratedImageFactory.fillInColorTable(colors);

        // set up the texture
        final TextureState ts = new TextureState();
        ts.setTexture(tex);
        _root.setRenderState(ts);
        updateTexture();
    }
View Full Code Here

        if (useVBO) {
            merged.getSceneHints().setDataMode(DataMode.VBO);
        }

        // and a texture, this will cover both the uncombined and combined meshes.
        final TextureState ts = new TextureState();
        ts.setTexture(TextureManager.load("images/ardor3d_white_256.jpg", Texture.MinificationFilter.Trilinear, true));
        scene.setRenderState(ts);

        // set a material state that applies our vertex coloring to the lighting equation
        final MaterialState ms = new MaterialState();
        ms.setColorMaterial(ColorMaterial.AmbientAndDiffuse);
View Full Code Here

        final CullState cs = new CullState();
        cs.setCullFace(CullState.Face.Back);
        cs.setEnabled(true);
        _root.setRenderState(cs);

        final TextureState ts = new TextureState();
        ts.setEnabled(true);
        ts.setTexture(TextureManager.load("images/ardor3d_white_256.jpg", Texture.MinificationFilter.Trilinear,
                TextureStoreFormat.GuessCompressedFormat, true));

        sphere.setRenderState(ts);

        final Node n1 = new Node("n1");
View Full Code Here

    @Override
    protected void initExample() {
        _canvas.setTitle("Texture3D Example - Ardor3D");

        final TextureState ts = new TextureState();
        final Texture texture = createTexture();
        texture.setEnvironmentalMapMode(EnvironmentalMapMode.ObjectLinear);
        ts.setTexture(texture);
        _root.setRenderState(ts);

        final Sphere sp = new Sphere("sphere", 16, 16, 2);
        _root.attachChild(sp);

        _logicalLayer.registerTrigger(new InputTrigger(new KeyPressedCondition(Key.SPACE), new TriggerAction() {
            public void perform(final Canvas source, final TwoInputStates inputStates, final double tpf) {
                final Texture tex = createTexture();
                tex.setEnvironmentalMapMode(EnvironmentalMapMode.ObjectLinear);
                ts.setTexture(tex);
                ts.setNeedsRefresh(true);
            }
        }));
    }
View Full Code Here

        addMesh(new StripBox("StripBox", new Vector3(), 3, 3, 3));
        addMesh(new Teapot("Teapot"));
        addMesh(new Torus("Torus", 16, 8, 1.0, 2.5));
        addMesh(new Tube("Tube", 2, 3, 4));

        final TextureState ts = new TextureState();
        ts.setTexture(TextureManager.load("images/ardor3d_white_256.jpg", Texture.MinificationFilter.Trilinear,
                TextureStoreFormat.GuessCompressedFormat, true));
        _shapeRoot.setRenderState(ts);

        final BlendState bs = new BlendState();
        bs.setBlendEnabled(true);
View Full Code Here

TOP

Related Classes of com.ardor3d.renderer.state.TextureState

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.