コード例 #1
0
ファイル: ProgrammableRenderer.java プロジェクト: icdts/jge3d
  public void draw() {
    // Clear The Screen And The Depth Buffer
    GL11.glClear(GL11.GL_COLOR_BUFFER_BIT | GL11.GL_DEPTH_BUFFER_BIT);

    if (camera != null) {
      camera.updatePosition();
    } else {
      camera = (Camera) object_list.getItem(Camera.CAMERA_NAME);
      if (camera != null) {
        camera.updatePosition();
      } else {
        System.out.println("WARNING: Tried to draw without camera set...");
        return;
      }
    }

    // Draw the 3d stuff
    for (Entity ent : object_list.getEntitiesAndSubEntities()) {
      Boolean should_draw = (Boolean) ent.getProperty(Entity.SHOULD_DRAW);
      if (should_draw == null) should_draw = false;
      if (should_draw) ent.drawProgrammablePipe();
    }

    // Draw the window manager stuff
    if (window_manager != null) window_manager.draw();

    Display.update();
  }
コード例 #2
0
ファイル: ProgrammableRenderer.java プロジェクト: icdts/jge3d
 public void destroy() {
   window_manager.destroy();
 }