DD7 Color Fills
I know these are really easy to do, but everytime i try and do a color fill, all i end up with is garbage on my screen (a bunch of random lines with weird random colors). here is my Render() function, which is called in the main loop of the program:
int Render()
{
DDBLTFX fx;
INIT_DXSTRUCT(fx);
fx.dwFillColor = 0;
lpddsBack->Blt(NULL, NULL, NULL, DDBLT_WAIT | DDBLT_COLORFILL, &fx);
lpddsPrimary->Blt(NULL, lpddsBack, NULL, DDBLT_WAIT, NULL);
return (TRUE);
}
what am i dong wrong?
ps: INIT_DXSTRUCT is a macro:
#define INIT_DXSTRUCT(dxs) { ZeroMemory(&dxs, sizeof(dxs)); ddsd.dwSize = sizeof(dxs); }
Look at your macro. You store the struct size in ddsd (I guess a surface descriptor), not in the parameter....
That way your fx struct is not correctly initialized.
That way your fx struct is not correctly initialized.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement