Min3d doesn't show anything (in sample from min3d wiki)

与世无争的帅哥 提交于 2019-12-08 10:17:38

问题


I'm trying to create a simple Android application using min3d library

Previously I have downloaded apk file from market with examples of min3d library. Every example in this application works fine on real phone. It means phone has not problems with 3d.

I have chekouted source code of min3d with examples and created simple Android application with single activity copypasted from examples:

import min3d.core.Object3dContainer;
import min3d.core.RendererActivity;
import min3d.objectPrimitives.Box;
import min3d.vos.Light;

public class ExampleMostMinimal extends RendererActivity {
    Object3dContainer _cube;

    public void initScene() 
    {
        scene.lights().add( new Light() );
        _cube = new Box(1,1,1, null, true,true,false);
        _cube.colorMaterialEnabled(false);
        scene.addChild(_cube);
    }

    @Override 
    public void updateScene() 
    {
        _cube.rotation().y++;
    }
}

But when application launched it shows title bar and black screen.

Please, help.


回答1:


I solved the problem.

The reason was in source of min3d files. I've got framework files from example of nyARToolkit framework.

When I replaced the files by files checked out from min3d google repository, problem was resolved.

p.s. I copied files from example because min3d in example of nyARToolkit works fine.



来源:https://stackoverflow.com/questions/10914120/min3d-doesnt-show-anything-in-sample-from-min3d-wiki

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!