Printing with OpenGL - Another method. - 项目摘要 |
摘要
| 管理 |
论坛 文档
| 软件包 |
|
|
|
项目描述: |
One of the largest problems I have encountered using OpenGL is that it is very difficult to print a rendered scene. I have only found one other sample on how to do this, however, there was no sample code and I was unable to actually print (let alone print preview a scene!).
What I have done is create a class, CCaptureImage, out of code snippets found on this site. CCaptureImage will capture an bitmap using a device context and the rect of the image you want. From there, you can paint it to a device or save it to a bmp file. Usage of the CCaptureImage class with respect to printing is shown below in the sample code.
在使用OpenGL 时,我所遇到的一个问题就是很难打印一个绘制的场景。我只发现了一个完成这一功能的例子,但没有源代码,实际上我还是不能打印(先不说打印预览场景)。
我所做的就是创建一个类,CCaptureImage, 使用了这个站点上的一个段代码。CCaptureImage 将用设备环境捕获一幅位图,选择你需要的图像。从那里,你可以将它绘制到一个设备环境,或保存它到一个bmp文件。在例子代码中也演示了CCaptureImage 类的打印功能。
来源: http://www.codeguru.com/opengl/printgl.shtml |
类别: |
|
发布者:
cbd002
|
|
最新发布源码包 |
软件包 |
版本号 |
日期 |
本地下载 |
printgl |
 1.0  |
2004-04-18 |
下载 |
|
|