我使用的技巧地回答了這個問題:Java3D: Painting 2D HUD over a Canvas3DJava3d:如何在Java 3D場景上編輯繪製的2D疊加層?
而且我的代碼是這樣的:
...
GraphicsConfiguration config = SimpleUniverse.getPreferredConfiguration();
Canvas3D canvas3D = new Canvas3D(config){
public void postRender()
{
this.getGraphics2D().setColor(Color.white);
this.getGraphics2D().drawString("Heads Up Display (HUD) Works!",100,100);
this.getGraphics2D().flush(false);
}
};
...
怎麼可能我後來刪除此2D HUD或編輯該2D HUD?
感謝,