public void render() { if (canvas.isVisible()) { GL11.glViewport(0, 0, window.getCanvas().getWidth(), window.getCanvas().getHeight()); window.render(); scene.render(); } }
@Override public void render() { float dt = Gdx.app.getGraphics().getDeltaTime(); // we use a copy of the scene reference because the actual scene may change during update Scene s = scene; s.update(dt); s.render(); }
private void render() { BufferStrategy bs = this.getBufferStrategy(); if (bs == null) { this.createBufferStrategy(2); return; } Graphics g = bs.getDrawGraphics(); if (scene != null) scene.render(); g.drawImage(image, 0, 0, WIDTH * SCALE, HEIGHT * SCALE, this); g.dispose(); bs.show(); }