PDA

View Full Version : wmf export file



pererm
01-24-2015, 09:05 AM
Hi, i have a view in an application and i export the display to a wmf fila. It is working fine. But when i active the opengl mode tne wmf filw seems empty. Is this posible. What can i do?

Thanks alot.
PERE

Alfonse Reinheart
01-24-2015, 09:18 AM
If by "WMF", you mean a Windows MetaFile (https://en.wikipedia.org/wiki/Windows_Metafile), those store drawing commands given to the device context. Rendering to OpenGL does effectively render to that device context, but because it doesn't render through the HDC's normal drawing functions, it cannot record them.

pererm
01-28-2015, 12:12 PM
Is there a way to export the opengl display to a grafic file, a type or extensión that we can insert in a word document?
Thanks again
PERE

Alfonse Reinheart
01-28-2015, 02:24 PM
No. I'm fairly certain there's no way to put a 3D mesh into a Word document at all.

You can take a screen shot of one. But you can't just say "stick this rendering in Word."

GClements
01-31-2015, 08:45 AM
No. I'm fairly certain there's no way to put a 3D mesh into a Word document at all.

You can embed anything for which there's an ActiveX (formerly OLE) control.

What you can't do (in general) is get a "mesh", "object", "scene" etc from OpenGL. It's a rendering API, not a modelling API. It doesn't (necessarily) store the data it's passed, it just renders it. In particular, there's no option to redirect rendering to a stream (like GDI has for WMF output), and even if there was, it would be of no use without some level of support from the application (most GDI-based Windows applications don't provide the option to dump their output to WMF).