Don't get how clippers work in directdraw windowed mode. When I draw a surface, if even one pixel of it is outside the screen, nothing gets drawn.
This is how I initialize everything:
res = g_pDD->CreateClipper(0, &g_pClipper, NULL);
if (DDFailedCheck(res, "Create clipper")) FUCK();
res = g_pClipper->SetHWnd(0, g_hwnd);
if (DDFailedCheck(res, "Assign hWnd to clipper")) FUCK();
res = g_pDDS->SetClipper(g_pClipper);
if (DDFailedCheck(res, "Set clipper")) FUCK();
Not a question, just wanted to say. DirectDraw reacted very weirdly to trying to draw beyond the borders of the window. I tried to draw image of width 60 to rect [-60...0] or [-60...-1], that is just to the left of window border, and it lagged, and after a while screen went black for a few seconds. And after that, explorer didn't run, could only see mouse. Alt-tab and windows key didn't work, but ctrl-shift-escape and ctrl-alt-delete did. Also, ctrl-alt-del, closing session and reopening it actually caused bsod
Probably just a buggy driver.
Also, don't try to draw without Sleep(1); at the end, it draws too fast to notice, only 1/7 of frames actually get visible. I know there are other ways to do delay, Sleep works fine for me for now. Need to measure fps somehow though.
I need examples of games/programs that use directdraw. Or games for windows in general.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum