example of resize with updateBuffers()