CopyRects

Started by
2 comments, last by supagu 21 years, 11 months ago
copy rects don''t seem to be working for me.... POINT test; test.x = 0; test.y = 0; HRESULT r = 0; r = g_pd3dDevice->CopyRects(this->image,NULL, 1, g_pBackSurf ,&test); if(FAILED(r)) { if( r & D3DERR_INVALIDCALL) MessageBox(g_hWnd, "copy surface fast","error",MB_OK); } how much faster is copyrects over D3DXLoadSurfaceFromSurface, because when im using D3DXLoadSurfaceFromSurface, it seriously reduces my frame count, when i load a surface onto the back buffer, im guessing this is due to the stretching that slows it down? any way, icant get CopyRects to seem to work....
Advertisement
g_pd3dDevice->CopyRects(this->image,NULL, 1, g_pBackSurf ,&test);


where you puut this->image
shouldnt that be a pointer to another surface ?
i''m not an expert


but Copyrects is faster coz it copies the whole area in one time, it think using hardware

and CopySurfaceToSurface copies pixel per pixel to the other surface , so it''s slower
hrmm, well using copytosurface reducaes my frames from about 300 to about 60, and the
this->image
where
image is...
LPD3DSURFACE8 image;
^if i aint spelled that right, yer know what i mean, dun ya?
okay, i can get CopyRect''s working with 2 different surfaces, but when i try to copy to the back buffer, it fails, could it be something needs to be locked? or they need to be the same format? or ene thing else?

This topic is closed to new replies.

Advertisement