-
April 8th, 2005, 10:01 PM
#1
Back buffer is not clearing it'self
The following code dosn't seem to clear the back buffer, but I'm currently under the impression that in full screen exclusive mode it does this automatically:
Code:
ZeroMemory( &DDSurfDesc, sizeof( DDSurfDesc ));
DDSurfDesc.dwSize = sizeof( DDSurfDesc );
lpDDSBack->Lock( 0, &DDSurfDesc, DDLOCK_WAIT, 0 );
long* surface = reinterpret_cast<long*>(DDSurfDesc.lpSurface);
...
omitted code
...
lpDDSBack->Unlock(DDSurfDesc.lpSurface);
lpDDSPrimary->Flip( NULL, DDFLIP_WAIT );
I don't even know if I'm doing this right, I'm editting the video memory directly so I need the pointer to the back buffer, if some could help me I would be very greatfull I've had one helluva time trying to find out how to get the add of it
In C, you merely shoot yourself in the foot.
In C++, you accidentally create a dozen instances of yourself and shoot them all in the foot. Providing emergency medical care is impossible, because you can't tell which are bitwise copies and which are just pointing at others and saying, "That's me, over there."
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|