Jump to content
  • Advertisement

Archived

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

Laroche

DD7 Color Fills

This topic is 6127 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
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!