Add support for shared textures to graphics API