@Override
    public void update(long deltaMs) {
        getInput();

        camera.update(deltaMs);
        scene.update(deltaMs);
        
        // clear screen
        GL11.glClear(GL11.GL_COLOR_BUFFER_BIT);
        
        // set the viewing location, inverted so stuff is drawn correctly in the opposite direction
        float x = -camera.getX();
        float y = -camera.getY();
        
        // render the actors
        Renderer.get().setOffset(x, y);
        Renderer.get().begin();
        scene.render();
        
        Iterator<PlayAnimationAction> i = animations.iterator();
        while(i.hasNext()) {
            PlayAnimationAction paa = i.next();
            paa.update(deltaMs);
            if(paa.finished()) {
                i.remove();
            }
            else {
                Renderer.get().draw(paa.getTexture(), paa.getX(), paa.getY(), paa.getFrameWidth(), paa.getFrameHeight(), paa.getFrameWidth() / 2, paa.getFrameHeight() / 2, MathUtil.degToRad(90), paa.getU(), paa.getV(), paa.getU2(), paa.getV2());
            }
        }
        /*
         * x = x - ro.getTexWidth() / 2;
        y = y - ro.getTexHeight() / 2;
        
        batch.draw(ro.getTexture(), x, y, ro.getWidth(), ro.getHeight(), ro.getTexWidth() / 2, ro.getTexHeight() / 2, MathUtil.toRenderAngle(ro.getRotation()), ro.getU(), ro.getV(), ro.getU2(), ro.getV2());
         * 
         */
        Renderer.get().end();
        
        // render and update user interface stuff
        // TODO should we update here?? Propably, so we don't have to iterate through the screens many times...
        // set offset uniform to zero for user interface rendering
        Renderer.get().setOffset(0, 0);
        Renderer.get().begin();
        Iterator<IGameScreen> it = screens.descendingIterator();
        while(it.hasNext()) {
            IGameScreen screen = it.next();
            screen.update(deltaMs);
            screen.render();
        }
        
        // render cursor and tooltip last
        //Renderer.get().draw(cursor, mouseX-cursor.getWidth()/2, mouseY-cursor.getHeight()/2);
        if(tooltip != null) {
            tooltip.render();
        }
        
        Renderer.get().end();
        
        audioPlayer.update(deltaMs);
    }