Tessellate NURBS and get vertex without callback


I want to tessellate NURBS surface using openGL and get the vertex information so that I can use it with some other classes I already have that takes in the vertices and does a bunch of operations with them.

I have been using gluNURBSSurface to draw NURBS surface but that is just for display. I have seen people using callbacks to get the vertex information from the NURBS Renderer but callbacks are not an option for me.

What is the algorithm behind gluNURBSSurface?I have searched in Mesa3D source file but failed to find it. My main point is to get the vertex information of a NURBS surface from OpenGL without using callbacks.

Any help would be much appreciated.

Thank you.