CopyRect issue

Blitz3D Forums/Blitz3D Programming/CopyRect issue

Brendane(Posted 2007) [#1]
Hi,

I'm having trouble using CopyRect - copying a 3d render from the backbuffer to a texture.

So I'm doing :-

CopyRect 0,0, w, h, 0,0, BackBuffer(), TextureBuffer( tex )

It appears that nothing is being copied. I'm locking both the backbuffer and the texture buffer incase that's the issue. I've also tested the lock using a WritePixel on the texture buffer and this works fine.

What am I doing wrong?


big10p(Posted 2007) [#2]
Don't lock the buffers for the CopyRect. Locked buffers are only supposed to be accessed with ReadPixelFast/WritePixelFast.


Brendane(Posted 2007) [#3]
That's sorted it, thanks!