Package com.ardor3d.image

Examples of com.ardor3d.image.Texture2D


        _quadsDirty = false;

        _pssmPass.reinit(r);
        for (int i = 0; i < _pssmPass.getNumOfSplits(); i++) {
            final TextureState screen = new TextureState();
            final Texture2D copy = new Texture2D();
            copy.setTextureKey(_pssmPass.getShadowMapTexture(i).getTextureKey());
            screen.setTexture(copy);
            _orthoQuad[i].setRenderState(screen);
            _orthoQuad[i].getSceneHints().setCullHint(CullHint.Never);
            _orthoQuad[i].updateGeometricState(0.0);
        }
View Full Code Here


            TextureState screen = (TextureState) _orthoQuad[i].getLocalRenderState(StateType.Texture);
            Texture copy;
            if (screen == null) {
                screen = new TextureState();
                _orthoQuad[i].setRenderState(screen);
                copy = new Texture2D();
                screen.setTexture(copy);
                _orthoQuad[i].updateGeometricState(0.0);
            } else {
                copy = screen.getTexture();
            }
View Full Code Here

    /**
     * Load water textures.
     */
    protected void setupTextures() {
        textureReflect = new Texture2D();
        textureReflect.setWrap(Texture.WrapMode.EdgeClamp);
        textureReflect.setMagnificationFilter(Texture.MagnificationFilter.Bilinear);
        Matrix4 matrix = new Matrix4();
        matrix.setM00(-1.0);
        matrix.setM30(1.0);
        textureReflect.setTextureMatrix(matrix);
        tRenderer.setupTexture(textureReflect);

        normalmapTexture = TextureManager.load(normalMapTextureString, Texture.MinificationFilter.Trilinear,
                TextureStoreFormat.GuessCompressedFormat, true);
        textureState.setTexture(normalmapTexture, 0);
        normalmapTexture.setWrap(Texture.WrapMode.Repeat);

        textureReflectBlur = new Texture2D();
        textureReflectBlur.setWrap(Texture.WrapMode.EdgeClamp);
        textureReflectBlur.setMagnificationFilter(Texture.MagnificationFilter.Bilinear);
        textureReflectBlur.setTextureMatrix(matrix);
        tRenderer.setupTexture(textureReflectBlur);

        textureState.setTexture(textureReflectBlur, 1);

        dudvTexture = TextureManager.load(dudvMapTextureString, Texture.MinificationFilter.Trilinear,
                TextureStoreFormat.GuessNoCompressedFormat, true);
        matrix = new Matrix4();
        matrix.setM00(0.8);
        matrix.setM11(0.8);
        dudvTexture.setTextureMatrix(matrix);
        textureState.setTexture(dudvTexture, 2);
        dudvTexture.setWrap(Texture.WrapMode.Repeat);

        if (useRefraction) {
            textureRefract = new Texture2D();
            textureRefract.setWrap(Texture.WrapMode.EdgeClamp);
            textureRefract.setMagnificationFilter(Texture.MagnificationFilter.Bilinear);
            tRenderer.setupTexture(textureRefract);

            textureDepth = new Texture2D();
            textureDepth.setWrap(Texture.WrapMode.EdgeClamp);
            textureDepth.setMagnificationFilter(Texture.MagnificationFilter.NearestNeighbor);
            textureDepth.setTextureStoreFormat(TextureStoreFormat.Depth24);
            tRenderer.setupTexture(textureDepth);

View Full Code Here

                if (screenTexture == null) {
                    final DisplaySettings settings = new DisplaySettings(cam.getWidth(), cam.getHeight(), 24, 0, 0, 8,
                            0, 0, false, false);
                    fullTRenderer = TextureRendererFactory.INSTANCE.createTextureRenderer(settings, false, r,
                            ContextManager.getCurrentContext().getCapabilities());
                    screenTexture = new Texture2D();
                    screenTexture.setWrap(Texture.WrapMode.Clamp);
                    screenTexture.setMagnificationFilter(Texture.MagnificationFilter.Bilinear);
                    fullTRenderer.setupTexture(screenTexture);
                }
                fullTRenderer.copyToTexture(screenTexture, 0, 0, cam.getWidth(), cam.getHeight(), 0, 0);
View Full Code Here

        tRenderer.setMultipleTargets(true);
        tRenderer.setBackgroundColor(new ColorRGBA(0.0f, 0.0f, 0.0f, 1.0f));
        tRenderer.getCamera().setFrustum(cam.getFrustumNear(), cam.getFrustumFar(), cam.getFrustumLeft(),
                cam.getFrustumRight(), cam.getFrustumTop(), cam.getFrustumBottom());

        mainTexture = new Texture2D();
        mainTexture.setWrap(Texture.WrapMode.Clamp);
        mainTexture.setMagnificationFilter(Texture.MagnificationFilter.Bilinear);
        tRenderer.setupTexture(mainTexture);

        secondTexture = new Texture2D();
        secondTexture.setWrap(Texture.WrapMode.Clamp);
        secondTexture.setMagnificationFilter(Texture.MagnificationFilter.Bilinear);
        tRenderer.setupTexture(secondTexture);

        extractionShader = new GLSLShaderObjectsState();
View Full Code Here

        _reinitSplitsDirty = false;

        // render state to apply the shadow map texture
        _shadowMapTexture = new Texture2D[_numOfSplits];
        for (int i = 0; i < _numOfSplits; i++) {
            _shadowMapTexture[i] = new Texture2D();
            _shadowMapTexture[i].setWrap(Texture.WrapMode.BorderClamp);
            _shadowMapTexture[i].setMinificationFilter(Texture.MinificationFilter.BilinearNoMipMaps);
            _shadowMapTexture[i].setMagnificationFilter(Texture.MagnificationFilter.Bilinear);
            _shadowMapTexture[i].setBorderColor(ColorRGBA.WHITE);
View Full Code Here

TOP

Related Classes of com.ardor3d.image.Texture2D

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.