Sign in to follow this  

LockRect doesnt seem to be working (code included)

Recommended Posts

Hi, just trying to lock a rectangle so i can access the pixels within the area i have designated and it wont work. Simply the return structure from the LockRect function is always NULL,
	l_pD3DDevice->GetBackBuffer(0,0,D3DBACKBUFFER_TYPE_MONO, &surf);

	// define the rectangle to lock
	D3DLOCKED_RECT pLockedRect;
	RECT rect;
	rect.bottom = 100;
	rect.left = 50;
	rect.right = 100; = 50;

	surf->LockRect(&pLockedRect, &rect, NULL);

pLockedRect is always NULL, i have also tried various flags and nothing changes any ideas? ace

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this