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

BlitFill in windowed mode is too slow

This topic is 5651 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

Hi, I have written some code to blit fill my window with a color in windowed mode. But for some reason it is very slow. When I call this function every frame The mouse cursor gets skippy and unresponsive, windows slows down, and just terminating the app takes 2-3 seconds. Everything just gets slow. But im running on a PIII-600 with 384 Ram and a GeForce video card so a single blt coulnd''t be slowing my program ? I must be doing something wrong ? Here is my code :
RECT ddclient;
		HWND *temp_hwnd = C_system::Get_hWnd();
		GetClientRect(*temp_hwnd, &ddclient); += (C_system::Get_window_posX() + 29);
		ddclient.bottom += (C_system::Get_window_posX() + 29);
		ddclient.left += (C_system::Get_window_posY() + 3);
		ddclient.right += (C_system::Get_window_posY() + 3);

		lpddsprimary->Blt(&ddclient, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &ddbltfx); 

Share this post

Link to post
Share on other sites
Have you made sure you''re freeing resources - e.g. HDCs - properly? Thats the most likely reason for such a slowdown.

HTH, Steve

DirectX Programmer
Soon to be the new Bill Gates

Share this post

Link to post
Share on other sites