Skip to main content
gamedev.net
🔒 Locked

Direct Draw question

Started by oto76mm Mar 6, 2003 at 3:33 AM 1 replies 250+ views
Original Post
oto76mm
oto76mm
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.
Tybalt
Tybalt
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.
Gyannea
Gyannea
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
Brian Reinhold

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.