LibGDX and ObjLoader not showing .mtl?

I am trying to upload .obj files to an Android project using LibGDX. Files do not have a texture file, but include materials in .mtl files. I use the last official night time, and rendering the object file only causes the object to look white. How to get ObjLoader to use a .mtl file?

@Override
public void create() {
    objLoader = new ObjLoader();
    model = objLoader.loadObj( Gdx.files.internal("data/obj.obj"), true);
}

@Override
public void render() {
    Gdx.gl.glClearColor(0, 0, 0, 0);
    Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT);
    batch.begin();

    model.render();

    batch.end();
}

So the code is called to visualize the object. Here is a link to the ObjLoader class

https://github.com/libgdx/libgdx/blob/master/gdx/src/com/badlogic/gdx/graphics/g3d/loaders/wavefront/ObjLoader.java

What am I doing wrong? And why doesn't it download the .mtl file? From what I can understand, it should load the .mtl file, which is located in the same folder and the same name as the .obj file.

, ObjLoader, , . , mtl mtl Material, : obj .

-, OpenGL, , ?

+5

All Articles