Page 1 of 1

Copy a Surface

PostPosted: Mar 5, 2004 @ 2:43pm
by Pam
Thierry,

Would it be possible to have a function would create an exact copy of a Surface, same width, height, and pitch, with an option to copy the contents also?

In other words, create a copy of the Back Surface (or any surface) so that memcpy can be used.

Thanks,

Pam

PostPosted: Mar 5, 2004 @ 5:59pm
by Kzinti
Are we talking PF or PHAL here?

PostPosted: Mar 5, 2004 @ 6:07pm
by Presto

PostPosted: Mar 5, 2004 @ 6:08pm
by Pam

PostPosted: Mar 5, 2004 @ 6:39pm
by Kzinti

PostPosted: Mar 5, 2004 @ 6:44pm
by Pam

PostPosted: Mar 5, 2004 @ 7:20pm
by Kzinti

PostPosted: Mar 5, 2004 @ 7:27pm
by Pam

PostPosted: Mar 6, 2004 @ 3:02am
by Kzinti

PostPosted: Mar 6, 2004 @ 1:09pm
by Pam
Well the idea was to create an effect, like the water or fire effects that typically use two buffers. You loop through one buffer to figure out what goes in the second buffer, Blit the second buffer, then swap and do the whole thing again.

Of course one wouldn't often use the backbuffer for this, only if it was a fullscreen effect.

The other thread about the 3x3 matrix blur got me thinking about it.

Pam

PostPosted: Mar 7, 2004 @ 3:20am
by Kzinti

PostPosted: Mar 7, 2004 @ 1:31pm
by Pam