Implementation of the frame rendering.