Archived

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

Laroche

DD7 Color Fills

Recommended Posts

Laroche    140
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); }

Share this post


Link to post
Share on other sites
Askadar    122
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.

Share this post


Link to post
Share on other sites