Jump to content

View more

Image of the Day

雑魚は多めにして、爽快感重視にしつつ・・・(´・ω・`)
早いとこ、ベースを作って、完成にもっていかないとね。
タイトルもまだ迷ってるだよなぁ。 
#indiedev  #indiegame #screenshotsaturday https://t.co/IwVbswGrhe
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Clearing a surface in DDraw

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
2 replies to this topic

#1 Omalacon   Members   

122
Like
Likes
Like

Posted 27 October 1999 - 07:40 AM

I am using double buffering (2 attached surfaces then flipping), but every time I flip I need to mannually clear the last image on the surface mannually (by writing each pixel to black). Is there a way to clear the entire screen easily with one command? (Like in the old Basic days with CLS)

-Omalacon

[This message has been edited by Omalacon (edited October 27, 1999).]


#2 mhkrause   Members   

122
Like
Likes
Like

Posted 27 October 1999 - 07:35 AM

If it's a D3D app, you should call clear() using the D3D device. If it's a regular DDraw app, try calling Blt(), specifying color fill and passing in black.



#3 Machaira   Moderators   

1033
Like
Likes
Like

Posted 27 October 1999 - 07:40 AM

Try this:

code:

DDBLTFX ddbltfx;

ZeroMemory(&ddbltfx, sizeof(ddbltfx));
ddbltfx.dwSize = sizeof(ddbltfx);
ddbltfx.dwFillColor = 0;
pDDS->Blt(NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &ddbltfx);


where pDDS is a DirectDraw surface. Hope this helps.





Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.