Archived

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

oto76mm

Direct Draw question

Recommended Posts

oto76mm    122
I do not understand one thing. I am using Direct draw to display graphic on the screen. I have set the width and height using lpdd->SetDisplayMode(800,600,16,0,0) and load picture into backsurface g_lpddsBack when I display it RECT Dest; Dest.top =0 ; Dest.left=0; Dest.bottom=599; Dest.right=799; g_lpddsPrimary ->Blt(Dest,g_lpddsBack,NULL,DDBLT_WAIT, NULL); How come it is not full fullscreen, there is still 1 pixel at the right and bottom not displaying. Only when I set Dest.bottom=600; Dest.right=800; then It is full screen. Since left and top start counting from 0-800 and 0-600, the actually length and width will be 801x601 not 800x600.

Share this post


Link to post
Share on other sites
Tybalt    122
No, you should set the rect width and height to 800 and 600. The normal convention is to exclude the right and lower edges, therefore you will blit an area 800x600, not 801x601.

Share this post


Link to post
Share on other sites
Gyannea    122
Now that I see this post I am wondering if this Direct X Blt() function would be faster than the standard Windows API BitBlt() or whatever for copying from a virtual window to the screen. Anyone know?

By the way, the standard GUI Rectangle functions do the same thing: if you draw the solid area only (not the outline) the right and bottom pixel are not there.

Brian Reinhold

Share this post


Link to post
Share on other sites