I had this task with GL. After scouring a all the OpenGL forums I could find, it turns out the GL approach is to draw a lot of triangles.
The basic approach is to divide the rounded rectangle into (1) an inscribed rectangle (with square corners); (2) four rectangles along the edges of the inscribed rectangle; and (3) quarter-circles at the four corners. The last component is where the OpenGL idiom tri_fan is your friend. Otherwise it’s a bit of tedious math and a couple of for loops.
All of this did make me shed a brief tear for QuickDraw, which did all the heavy lifting for RoundRects.