@SuppressWarnings("unchecked") public static void inferResult(Object o) { // Return type inference if (o != null) { if (o instanceof NoResult) { return; } if (o instanceof Result) { // Of course throw (Result) o; } if (o instanceof InputStream) { Controller.renderBinary((InputStream) o); } if (o instanceof File) { Controller.renderBinary((File) o); } if (o instanceof Map) { Controller.renderTemplate((Map<String, Object>) o); } if (o instanceof Object[]) { Controller.render(o); } Controller.renderHtml(o); } }
@Override public void render() { Gdx.gl.glClearColor(0, 0, 0, 1); Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT); controller.render(Gdx.graphics.getDeltaTime()); levelView.draw(); }
private void render() { // Buffered Image loading // handle everything behind the scene BufferStrategy bs = this.getBufferStrategy(); // this takes Canvas Class if (bs == null) { createBufferStrategy(3); // 3 buffers before ahead time return; } Graphics g = bs.getDrawGraphics(); /////////////////////////////////////// g.drawImage(image, 0, 0, getWidth(), getHeight(), this); g.drawImage(background, 0, 0, null); p.render(g); c.render(g); ////////////////// g.dispose(); bs.show(); }