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 :(