View Full Version : how to output the program to autocad

05-06-2003, 01:36 AM
If I want to output my results to an AutoCad file .
how can do it ?

05-06-2003, 02:03 AM
Try finding info about glRenderMode(GL_FEEDBACK)

05-06-2003, 05:27 AM
You meant dwg or dxf?

05-06-2003, 03:25 PM
dwg and dxf are all welcome .
I need convert the Opengl results (on the screen ) to an AutoCad file .
then I can view and reedit it AutoCad .
Though I know it is stupid .but I need to do it .

05-06-2003, 03:27 PM
If you don't have the source for whatever is rendering the data, then you're mostly out of luck.

If you have the source, I'd suggest #define-ing all OpenGL functions you use to call some function pointer. You'd then be able to set these functions pointers up to call to OpenGL, or to call to your own implementation of the same functions. Your implementation would then capture the geometry in question, and write out the appropriately formatted data file on disk.
http://www.wotsit.org/ has documentation on lots of file formats.