Archived

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

Understanding DirectDraw ...

This topic is 5815 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

Hi... I''m currently learning DirectDraw, but there''s a point I don''t understand: Let''s say I want to make a sprite move on some blank surface... I need to render this blank surface? I mean, I must load a blank bitmap (background: black) on my surface, and then do whatever I want with the sprite... right? I can''t declare my surface to Nothing to have it blank huh? Thanks TeraZen, Last of the Returners

Share this post


Link to post
Share on other sites
you can use this code to fill a surface with one colour:


DDBLTFX ddbltfx;

/* Set size of structure */
ddbltfx.dwSize = sizeof( ddbltfx );
/* Set fill colour to specified colour */
ddbltfx.dwFillColor = dwColour;

/* Do Fill */
/* First parameter is a pointer to a RECT specifying want
portion of the surface to fill. NULL means all of it */
dderval = lpDDSurface->Blt( NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &ddbltfx );


===========================
The price of intelligence is stupidity

Edited by - gav on January 10, 2002 3:35:23 PM

Share this post


Link to post
Share on other sites