Why do you need 2DWRAP?
For porting rectangles, you may try to use the OpenGL call glRect(), but you have to keep track of the current polygon mode. glRect() will draw filled or plain rectangles depending upon the polygon mode. Querying and setting polygon modes could be expensive. OpenGL does not provide separate calls for filled and unfilled rectangles (like rect and rectf in IrisGL).
There's no sbox() equivalent in OpenGL and using glRect() will have similar performance issues (see reason above).
For arcs, you may use gluPartialDisk(). But it draws 2 radial lines (like pacman) at the end of arcs. Also it does some checking for different state variables. The routine in the wrapper layer could be tuned to the application needs.
The 2 directories igl and ogl are IrisGL and OpenGL equivalents of the same program.
Yusuf Attarwala yusuf@sgi.com April, 1995