Advertisement

Problem with DX ->Blt...

Started by December 28, 2000 10:42 PM
0 comments, last by Shazer 24 years ago
Is there any reason that you guys know of that would cause a call to Blt in DirectX to fail?? I have the call correct, as far as I know... Here is a code clip...
    
// back buffer

LPDIRECTDRAWSURFACE7 lpDDSBack;  // assume initialized


// offscreen plain surface 

LPDIRECTDRAWSURFACE7 lpDDSBackground; // assume initialized


// lpDDSBack has been color filled with black

// lpDDSBackground has a bitmap loaded onto it

// The sized of both are 800x600 at 16bpp


if (FAILED(lpDDSBack->Blt(NULL, lpDDSBackground, NULL, DDBLT_WAIT, NULL)))
	{
// error handling

return FALSE;
}
    
I have no clue why this is not going through! Has anyone run into this before?? The Shaz "I don't want to be a pie... I don't like gravy." - Babbs, Chicken Run Edited by - Shazer on 12/28/00 10:43:44 PM
Optimism is not a state of mind, but a form of life!SuperNova Games
What error does it return? It is really hard to help without an error code (yes that stupid -235q3465#%$523 number)

Try something like:
Long Result = 0;Result = lpDDSBack->Blt(NULL, lpDDSBackground, NULL, DDBLT_WAIT, NULL)If (Result <> DD_OK) {  //FAILED } 


And then do something that will give you the result (sorry, I''m not a C++ person )

Trying is the first step towards failure.
Trying is the first step towards failure.

This topic is closed to new replies.

Advertisement