Hi Rafael
If I don't missunderstood, you want to take a "image" of the backbuffer before flip, to do some bit processing and then, flip.
I'been working with two cameras, that render the same and think, why to render 2, that duplicates the trisrendered, If I use only one camera, render one, then, before flip, copy the half backbuffer of the camera just rendered (by renderworld).
I started with grabimage, copypixel, copypixelfast, and all the associated lock/unlockbuffer. None work's for me.
The only way I found to copy the backbuffer was using copyrect
it's fast, you have not to lock/unlock nothing, you have not to make a buffer active as for copypixel etc.
CopyRect 0,0,512,768,512,0,BackBuffer(),BackBuffer()
that line copy the rendered viewport of one camera (viewport:0,0,512,768) to the other half of the screen.
I supose you could use copyrect to copy the area of the backbuffer to an image in memory (created with createimage, with the same size) and then pass to the dll a pointer to that image. Then, copyrect again from the image (your dll has handled) to the backbuffer.
hope that help
Juan
If I don't missunderstood, you want to take a "image" of the backbuffer before flip, to do some bit processing and then, flip.
I'been working with two cameras, that render the same and think, why to render 2, that duplicates the trisrendered, If I use only one camera, render one, then, before flip, copy the half backbuffer of the camera just rendered (by renderworld).
I started with grabimage, copypixel, copypixelfast, and all the associated lock/unlockbuffer. None work's for me.
The only way I found to copy the backbuffer was using copyrect
it's fast, you have not to lock/unlock nothing, you have not to make a buffer active as for copypixel etc.
CopyRect 0,0,512,768,512,0,BackBuffer(),BackBuffer()
that line copy the rendered viewport of one camera (viewport:0,0,512,768) to the other half of the screen.
I supose you could use copyrect to copy the area of the backbuffer to an image in memory (created with createimage, with the same size) and then pass to the dll a pointer to that image. Then, copyrect again from the image (your dll has handled) to the backbuffer.
hope that help
Juan