Jump to content
  • Advertisement

Archived

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

jimywang

directdraw blitter question

This topic is 5229 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 have some problem with direct draw blitter.here is my function. int DDraw_Draw_Surface(LPDIRECTDRAWSURFACE4 source, int x, int y, int width, int height, LPDIRECTDRAWSURFACE4 dest, bool transparent) { RECT dest_rect, source_rect; dest_rect.left = x; dest_rect.top = y; dest_rect.right = x+width-1; dest_rect.bottom = y+height-1; source_rect.left = 0; source_rect.top = 0; source_rect.right = width-1; source_rect.bottom = height-1; if (transparent) { if (FAILED(dest->Blt(&dest_rect, source, &source_rect,(DDBLT_WAIT | DDBLT_KEYSRC), NULL))) return(0); } // end if else { if (FAILED(dest->Blt(&dest_rect, source, &source_rect,(DDBLT_WAIT), NULL))) return(0); } // end if return(1); } // end DDraw_Draw_Surface DDraw_Draw_Surface(wall,50,50,64,64,lpddsback,false); when i try to use this function to draw a bitmap on screen,there is nothing appears on screen.im sure there is something in the off screen buffer,cause i tried to display it on screen.really dont no whats going on here.please help.

Share this post


Link to post
Share on other sites
Advertisement
yes,im flipping the surface at the end of each frame n it is running in full screen mode as well.i have jus checked it,the blt function returns the error code DDERR_SURFACEBUSY.does it have anything to do with the page flipping?how can i solve the problem?thx for help.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!