Updated gldraw2d with image cache initialization.