Package com.ardor3d.image

Examples of com.ardor3d.image.Texture2D


            if (img.getDataSize() == 6) {
                result = new TextureCubeMap();
            } else if (img.getDataSize() > 1) {
                result = new Texture3D();
            } else {
                result = new Texture2D();
            }
        }

        result.setTextureKey(tkey);
        result.setImage(img);
View Full Code Here


    public static LineGrapher makeLineGraph(final int width, final int height, final Quad quad,
            final Renderer renderer, final ContextCapabilities caps) {
        final LineGrapher grapher = new LineGrapher(width, height, renderer, caps);
        grapher.setThreshold(1);
        StatCollector.addStatListener(grapher);
        final Texture2D graphTex = setupGraphTexture(grapher);

        final float dW = (float) width / grapher._textureRenderer.getWidth();
        final float dH = (float) height / grapher._textureRenderer.getHeight();

        setupGraphQuad(quad, graphTex, dW, dH);
View Full Code Here

    public static TimedAreaGrapher makeTimedGraph(final int width, final int height, final Quad quad,
            final Renderer renderer, final ContextCapabilities caps) {
        final TimedAreaGrapher grapher = new TimedAreaGrapher(width, height, renderer, caps);
        grapher.setThreshold(1);
        StatCollector.addStatListener(grapher);
        final Texture2D graphTex = setupGraphTexture(grapher);
        final float dW = (float) width / grapher._textureRenderer.getWidth();
        final float dH = (float) height / grapher._textureRenderer.getHeight();

        setupGraphQuad(quad, graphTex, dW, dH);
View Full Code Here

    public static TabledLabelGrapher makeTabledLabelGraph(final int width, final int height, final Quad quad,
            final Renderer renderer, final ContextCapabilities caps) {
        final TabledLabelGrapher grapher = new TabledLabelGrapher(width, height, renderer, caps);
        grapher.setThreshold(1);
        StatCollector.addStatListener(grapher);
        final Texture2D graphTex = setupGraphTexture(grapher);
        final float dW = (float) width / grapher._textureRenderer.getWidth();
        final float dH = (float) height / grapher._textureRenderer.getHeight();

        setupGraphQuad(quad, graphTex, dW, dH);
View Full Code Here

     * @param grapher
     *            the grapher to associate the texture with
     * @return the texture
     */
    private static Texture2D setupGraphTexture(final AbstractStatGrapher grapher) {
        final Texture2D graphTex = new Texture2D();
        graphTex.setMinificationFilter(MinificationFilter.NearestNeighborNoMipMaps);
        graphTex.setMagnificationFilter(MagnificationFilter.Bilinear);
        grapher.setTexture(graphTex);
        return graphTex;
    }
View Full Code Here

        r.flushGraphics();
        double locationX = cam.getWidth(), locationY = cam.getHeight();
        bQuad.resize(size, (cam.getHeight() / (double) cam.getWidth()) * size);
        if (bQuad.getLocalRenderState(RenderState.StateType.Texture) == null) {
            final TextureState ts = new TextureState();
            bufTexture = new Texture2D();
            ts.setTexture(bufTexture);
            bQuad.setRenderState(ts);
        }

        int width = cam.getWidth();
View Full Code Here

    private static void loadDefaultTexture() {
        synchronized (logger) {
            if (!defaultTextureLoaded) {
                defaultTextureLoaded = true;
                _defaultTexture = new Texture2D();
                try {
                    _defaultTexture = TextureManager.load(DEFAULT_TEXTURE_SOURCE, Texture.MinificationFilter.Trilinear,
                            true);
                } catch (final Exception e) {
                    logger.log(Level.WARNING, "Failed to load default texture: notloaded.tga", e);
View Full Code Here

        _depth = depth;
        _samples = samples;

        _timer = timer;

        _texture = new Texture2D();

        _imposterQuad = new Quad("ImposterQuad");
        _imposterQuad.resize(1, 1);
        _imposterQuad.setModelBound(new BoundingBox());
        _imposterQuad.getSceneHints().setTextureCombineMode(TextureCombineMode.Replace);
View Full Code Here

        _standin.updateGeometricState(0);
    }

    private void resetFakeTexture() {
        // create a texture to cache the contents to
        _fakeTexture = new Texture2D();
        _fakeTexture.setMagnificationFilter(MagnificationFilter.Bilinear);
        _fakeTexture.setMinificationFilter(_minificationFilter);
        _fakeTexture.setTextureStoreFormat(TextureStoreFormat.RGBA8);
        _fakeTexture.setWrap(WrapMode.EdgeClamp);
        UIContainer._textureRenderer.setupTexture(_fakeTexture);
View Full Code Here

                    false, false);
            _sceneTextureRenderer = TextureRendererFactory.INSTANCE.createTextureRenderer(settings, false, renderer,
                    ContextManager.getCurrentContext().getCapabilities());
            _sceneTextureRenderer.setBackgroundColor(new ColorRGBA(0.0f, 0.0f, 0.1f, 0f));

            _blurBufferTexture = new Texture2D();
            _blurBufferTexture.setWrap(Texture.WrapMode.Clamp);
            _blurBufferTexture.setMinificationFilter(MinificationFilter.NearestNeighborNoMipMaps);
            _blurBufferTexture.setMagnificationFilter(Texture.MagnificationFilter.NearestNeighbor);
            _sceneTextureRenderer.setupTexture(_blurBufferTexture);
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.