private void updateBuffers(int w, int h){
        if(backBuffer != null){
            backBuffer.destroy();
        }
        if(frontBuffer != null){
            frontBuffer.destroy();
        }
        if(applicationBuffer != null){
            applicationBuffer.destroy();
        }
        backBuffer = new FrameBuffer(w, h);
        frontBuffer = new FrameBuffer(w, h);
        applicationBuffer = new FrameBuffer(w, h);
    }