Examples of AWTLoader


Examples of com.jme3.texture.plugins.AWTLoader

        int potHeight = FastMath.nearestPowerOfTwo(image.getHeight());
        int potSize = Math.max(potWidth, potHeight);

        BufferedImage scaled = scaleDown(original, potSize, potSize);

        AWTLoader loader = new AWTLoader();
        Image output = loader.load(scaled, false);

        image.setWidth(potSize);
        image.setHeight(potSize);
        image.setDepth(0);
        image.setData(output.getData(0));
View Full Code Here

Examples of com.jme3.texture.plugins.AWTLoader

        int width = original.getWidth();
        int height = original.getHeight();
        int level = 0;

        BufferedImage current = original;
        AWTLoader loader = new AWTLoader();
        ArrayList<ByteBuffer> output = new ArrayList<ByteBuffer>();
        int totalSize = 0;
        Format format = null;
       
        while (height >= 1 || width >= 1){
            Image converted = loader.load(current, false);
            format = converted.getFormat();
            output.add(converted.getData(0));
            totalSize += converted.getData(0).capacity();

            if(height == 1 || width == 1) {
View Full Code Here

Examples of com.jme3.texture.plugins.AWTLoader

    BufferedImage bottom = new BufferedImage(texSize, texSize, BufferedImage.TYPE_INT_ARGB);
    g = bottom.createGraphics();
    g.setColor(bottomColor);
    g.fillRect(0, 0, texSize, texSize);

    AWTLoader loader = new AWTLoader();
    Image sideImg = loader.load(sides, false);
    Image topImg = loader.load(top, false);
    Image bottomImg = loader.load(bottom, false);
    Texture2D sideTex = new Texture2D(sideImg);
    Texture2D topTex = new Texture2D(topImg);
    Texture2D bottomTex = new Texture2D(bottomImg);

    return SkyFactory.createSky(assetManager, sideTex, sideTex, sideTex, sideTex, topTex, bottomTex);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.