how to copyrect the frontbuffer?

Blitz3D Forums/Blitz3D Programming/how to copyrect the frontbuffer?

So, I've been trying to figure out how to render the scene, then copy that to another image to use as a texture. I've tried copyrect on the frontbuffer to a texturebuffer, to an image that I used to texture an item and tried copying from teh backbuffer before rendering.

How would one accomplish this in a WORKING fashion? :P

Do this BEFORE 'Flip' but AFTER 'RenderWorld'.
Copyrect 0,0,256,256,0,0,BackBuffer(),TextureBuffer(Texture)

There are some texture flag combinations that I found would prevent this from working - I can't remember what they were tho. :P

The 3D sample program in \mak\tex_render\ does this.

when copying, use the 256 flag on the texture. Makes operations go alot faster. All graphics cards don't support this however.

256 flags work really well unless you, for example, want to perform text operations on them.

If you render to the backbuffer,copyrect and not do a flip,
Then the texture being created does not appear to the user as a screen image. This looks more professional.

Just have a flip in your code for debuging and remove it before release.

(in response to the "more professional" comment)

The point of this actually, was to use the previously rendered frame in the next frame.