Add an API to get the OpenGL data from a surface