求助关于J2ME 3D的初级问题
我刚开始学J3D,下面的程序:class MyCanvas extends Canvas{
Graphics3D g3d;
World world;
public MyCanvas() throws IOException{
Object3D root[]=Loader.load("/Ball.m3g");
g3d=Graphics3D.getInstance();
world=(World)root[0];
}
protected void paint(Graphics g){
g3d.bindTarget(g);
world.animate(0);
g3d.render(world);
g3d.releaseTarget();
}
}
出现错误:
java.lang.IllegalStateException:
at javax.microedition.m3g.Graphics3D.render(+20)
多谢帮忙.
[此贴子已经被lcm于2005-10-15 13:10:59编辑过]