smart-fun / smartGL

SmartGL is a Graphic Engine for creating Android Games and Apps. It is based on OpenGL and handles 2D Sprites and 3D Textured Objects.
Apache License 2.0
109 stars 24 forks source link

Unable to load referencing other mtl file with in raw folder #28

Open rameshkec85 opened 2 years ago

rameshkec85 commented 2 years ago

ship.zip


private Object3D loadShip(@NonNull Context context) {
        mSpaceFrigateTexture = new Texture(context, R.drawable.ship);
        WavefrontModel modelColored = new WavefrontModel.Builder(context, R.raw.ship_1)
                .addTexture("ship", mSpaceCruiserTexture)
                .addTexture("cube1_auv", mSpaceCruiserTexture)
                .create();
        Object3D object3D = modelColored.toObject3D();
        object3D.setScale(1f, 1f, 1f);
        object3D.setPos(0, 0, -10);
        return object3D;
    }