generic bguffer code
gbuffer support