PDA

View Full Version : how to output the program to autocad



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

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

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

whoamiwww
05-06-2003, 04: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 .

jwatte
05-06-2003, 04: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.