singlebuffer implementation