This topic is now archived and is closed to further replies.

Problem with many and small sized offsceen surfaces

This topic is 5618 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I create several small sized offscreen surfaces with the folowing code: //code //fill DDSURFACEDESC2 structure DDSURFACEDESC2 ddsd; ZeroMemory(&ddsd, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); ddsd.dwFlags = DDSD_CAPS | DDSD_HEIGHT | DDSD_WIDTH; ddsd.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN; ddsd.dwWidth = 20; ddsd.dwHeight = 20; LPDIRECTDRAW7 pdd; LPDIRECTDRAWSURFACE7 apdds[10]; HRESULT r; for (int i=0; i<10; i++) { r = pdd->CreateSurface(&ddsd, &apdds, 0); assert(r == DD_OK); r = apdds[i]->BltFast(0, 0, /*some real surface with picture*/, 0, DDBLTFAST_WAIT); assert(r == DD_OK); } //end of code When it comes to display these offscreen surfaces on the screen every 2nd of them is with noise not with my pictures. I have found an imitation of a solution under Win98 - just make GetDC and ReleaseDC on every of the offscreen surfaces. But under WinXP this doesn''t work. Where am I wrong?

Share this post

Link to post
Share on other sites