try to implement frame buffer