Package main.asset

Examples of main.asset.TextureChunk


        long start = System.currentTimeMillis();
        AssetFile assets = AssetFile.load(new File("assets/test.ten"));
        ModelChunk model = (ModelChunk) assets.findChunk("carrier");
        System.out.println(System.currentTimeMillis() - start);
        TextureChunk tex1 = (TextureChunk) assets.findChunk("tex1");

        ByteBuffer buf = ByteBuffer.allocateDirect(tex1.getData().length);
        System.out.println(tex1.getData().length);
        buf.put(tex1.getData());
        buf.flip();

        texture1 = new Texture(buf, tex1.getWidth(), tex1.getHeight());
        texture1.bindTexture();
        texture1.useTexture();

        lightShader = new Shader(Shader.DEFAULT_LIGHT_VERTEX_PROGRAM, Shader.DEFAULT_LIGHT_FRAGMENT_PROGRAM);
        texShader = new Shader("assets/shaders/texture_shader");
View Full Code Here

TOP

Related Classes of main.asset.TextureChunk

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.