我正在使用delphi2010和OpenGL开发CAD应用程序。目前,我正在研究模块,将当前视图导出到图像文件。

这对于栅格格式(将场景渲染到所需尺寸的偏差缓冲区,将缓冲区写入磁盘),但我也希望能够将我的场景的轴对齐的2D视图导出到向量格式,最好是播种EMF。

我正在考虑在软件或滥用Glfeedback功能中计算我的转换和投影。由于我必须实施自己自己的z缓冲,这种方法似乎相当艰苦,更不用说我可能面临的性能问题,没有硬件加速的情况下渲染复杂的场景。

自从我的Google-fu没有导致结果,我想问一下你们是否有过这个问题的经验(将OpenGL-3D场景转换为2D-Vectorimage),或者是否有任何第三方库已知实现这一点。

有帮助吗?

解决方案

This is a very hard task, it involves analytical hidden lines removal, polygon splitting and Z-sorting for final output as explained here: http://www.cs.drexel.edu/~david/Classes/CS430/HWs/p214-weiler.pdf

其他提示

There is a C library that does this. It can output PostScript, PDF and SVG. It supports smooth shading too.

While you probably won't be able to use it directly, it might give you some ideas:

http://www.geuz.org/gl2ps/

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top