I wonder if there is a function that would enable someone to take a screen shot while scaling to the destination buffer size.
I meen I would like to have a function that copy the frame buffer data to a texture while scaling to the texture dimensions
The only solution I found is to set up a buffer with the screen dimensions, read back the pixels, scale , and write back to a texture using glTexSubImage2D. The overall process is pretty slow.
Originally posted by Guardian: I wonder if there is a function that would enable someone to take a screen shot while scaling to the destination buffer size.
Well, you could certainly re-draw the scene at the smaller size in the back buffer then copy it to a texture 1:1.
[This message has been edited by Damon (edited 02-17-2002).]
perhaps you should look at the WGL_ARB_pbuffer extension. There you can create an offscreen buffer with e.g. 100x100 size and render to it as normal. THen you can use glCopyTeximag2d to copy it to a texture.
See also nvidas openglsdk/effectsbrowser
Hum, I can’t render the scene twice, because the part of code which needs the screenshot in the texture knows nothing about how the previous stuff was drawn.
I would be nice to have this scaling in hardware
Guard][an
Originally posted by Guardian:
[b]I wonder if there is a function that would enable someone to take a screen shot while scaling to the destination buffer size.
I meen I would like to have a function that copy the frame buffer data to a texture while scaling to the texture dimensions
The only solution I found is to set up a buffer with the screen dimensions, read back the pixels, scale , and write back to a texture using glTexSubImage2D. The overall process is pretty slow.
I have to bind pbuffer to texture every time I want to bind texture. I believe it have to be done just once.
When I try to use render_texture extension or simply copy image from pbuffer (via glCopyTexSubImage), and after that I use this texture with envmap_bumpmap extension, machine hangs. This happens only on R200, on R100 everything is ok.