Package aspect.render

Examples of aspect.render.Texture


    public static ViewModel rect(Color color, float width, float height) {
        return rect(new Material(color), width, height);
    }

    public static ViewModel sprite(Material image, float xscl, float yscl) {
        Texture tex = image.getTexture();
        return rect(image, tex.getWidth() * xscl, tex.getHeight() * yscl);
    }
View Full Code Here


        }
    }

    public static Texture loadTexture(InputStream source) {
        try {
            Texture texture = Texture.create(source);
            return texture;
        } catch (IOException ex) {
            Logger.getLogger(Resources.class.getName()).log(Level.SEVERE, "Material could not be loaded: ", ex);
            return Texture.create(UNLOADED_IMAGE);
        }
View Full Code Here

    public static Texture loadTexture(String name, File file) {
        if (TEXTURES.containsKey(name)) {
            return TEXTURES.get(name);
        }

        Texture texture = loadTexture(file);
        addTexture(name, texture);
        return texture;
    }
View Full Code Here

    public static Texture loadTexture(String name, InputStream source) {
        if (TEXTURES.containsKey(name)) {
            return TEXTURES.get(name);
        }

        Texture texture = loadTexture(source);
        addTexture(name, texture);
        return texture;
    }
View Full Code Here

TOP

Related Classes of aspect.render.Texture

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.