printer quality copy

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
graphics destruction
I can do all this using win32 api, but it is too complicated

Hi !

Have a look in the OpenGL section at, there are examples of printing OpenGL contents.


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.

// verts

Just make sure you have your scene in the backbuffer. You could copy it there from the front when you start the rubber band :slight_smile:

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).]

Hello Mikael
Thanks for fast answer, unforturnatly
this reference link does not work now.,

Just stick out the ‘,’