• Advertisement

Archived

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

DD7 Color Fills

This topic is 5909 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 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
Advertisement
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

  • Advertisement