FrameSubset.java :  » UnTagged » eagle-library » eagle » android » fbx » Android Open Source

Android Open Source » UnTagged » eagle library 
eagle library » eagle » android » fbx » FrameSubset.java
/**
 *
 * @author eagle.sakura
 * @version 2010/07/11 : 
 */
package eagle.android.fbx;

import eagle.android.gles11.GLManager;
import eagle.android.gles11.IIndexBuffer;

/**
 * @author eagle.sakura
 * @version 2010/07/11 : 
 */
public class FrameSubset {
    /**
     * 
     */
    private IIndexBuffer indices = null;

    /**
     * 
     */
    private Material material = null;

    /**
     *
     * @author eagle.sakura
     * @param ib
     * @param m
     * @version 2010/07/11 : 
     */
    public FrameSubset(IIndexBuffer ib, Material m) {
        indices = ib;
        material = m;
    }

    /**
     * 
     *
     * @author eagle.sakura
     * @return
     * @version 2010/07/11 : 
     */
    public Material getMaterial() {
        return material;
    }

    /**
     *
     * @author eagle.sakura
     * @version 2010/07/11 : 
     */
    public void drawSubset(GLManager gl) {
        material.bind();
        indices.drawElements();
        material.unbind();
    }

    /**
     *
     * @author eagle.sakura
     * @version 2010/07/12 : 
     */
    public void dispose() {
        indices.dispose();
        indices = null;
    }
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.