Generic graphics api work in progress