com.badlogic.gdx.graphics.g3d.loader.ObjLoader Java Examples

The following examples show how to use com.badlogic.gdx.graphics.g3d.loader.ObjLoader. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: EntityModel.java    From Radix with MIT License 5 votes vote down vote up
private static ModelInstance getInstance(String objPath, String texturePath) {
    Model model = loader.loadModel(Gdx.files.internal(objPath), new ObjLoader.ObjLoaderParameters(true));
    ModelInstance instance = new ModelInstance(model);
    Texture texture = new Texture(Gdx.files.internal(texturePath));
    instance.materials.get(0).set(TextureAttribute.createDiffuse(texture));
    return instance;
}
 
Example #2
Source File: EntityModel.java    From Radix with MIT License 4 votes vote down vote up
private static Model getModel(String objPath) {
    return loader.loadModel(Gdx.files.internal(objPath), new ObjLoader.ObjLoaderParameters(true));
}