implementing Frambuffer part 1