View Full Version : printer quality copy
01-04-2004, 09:53 PM
I have lots of the soft written on FORTRAN and Halo graphics
There is no halo under windows and I try to fing dood substitution of it for windows
I just started to look opengl samples on FORTRAN for few days
I did not find any sample of making printer hard copy ( not print screen quality)
Also I need some sample of so name 'rubber box'
or 'rubber cursor' things, which can be plotted over graphic, moved on it, without
I can do all this using win32 api, but it is too complicated
01-05-2004, 01:00 AM
Have a look in the OpenGL section at www.codeguru.com, (http://www.codeguru.com,) there are examples of printing OpenGL contents.
01-05-2004, 01:40 AM
OpenGL is a rasterization library. Printing with it generally involves rendering in sections to an offscreen buffer in tiles to bump up the resolution. Because of depth buffering etc it is not easy to do vector based brinting through the lib. But it has been tried:
I'm sure there's plenty of code online for this.
OpenGL supports xor blend operations for your rubber band, so it can be done if
EXT_blend_logic_op is a supported extension.
You can also use overlays but that is more complex and not always supported. The most portable way and possible because OpenGL is generally so fast would be to grab the screen and redraw it when you change the box.
The best way (and very portable) is probably just doing a copypixels from back to front instead of a swap and drawing the box to the frontbuffer would probably work very well and be a very fast way of doing things.
Just make sure you have your scene in the backbuffer. You could copy it there from the front when you start the rubber band :-)
P.S. if this is buggy in the driver then a gldrawpixels instead of the copy should fare better. But instead of the backbuffer you need to make sure you glreadpixels to your memory array before you start rubber banding. This will involve much more data transfer to and from the graphics card and so will perform slower.
[This message has been edited by dorbie (edited 01-05-2004).]
01-05-2004, 09:40 PM
Thanks for fast answer, unforturnatly
this reference link does not work now.
01-06-2004, 02:41 AM
Just stick out the ',' http://www.opengl.org/discussion_boards/ubb/smile.gif http://www.codeguru.com
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.