Skip to main content
gamedev.net
🔒 Locked

Display mode question.

Started by SSJCORY 3 replies 450+ views
Original Post
SSJCORY
SSJCORY
I took yalls advice and read up on some dx in jim adams book rpg prgoramming with directx. I've run into a problem though. It doesn't make sense because he said that if you fill out the display mode info d3d assumes its fullscreen. Then why in his book does he set the Width of the displaymode to 640 and the Height to 480. It doesn't make sense to me could someone please explain. Thanks.
Favorite Quotes:Gandalf: You cannot pass!|Smeagol: We don't need you!|Sloth: Hey you guys!|
Namethatnobodyelsetook
Namethatnobodyelsetook
DX is fullscreen only when presentparams.windowed is set to false.

If you've set windowed to false, the display mode (BackBufferFormat) and resolution (BackBufferWidth and BackBufferHeight) MUST be set for it to know what fullscreen mode you'd like to use. (or example 800x600 24 bit, or 1024x768 16 bit)

In Windowed mode these can be set to 0 in order to get a backbuffer in the same mode as the desktop, and to use the same resolution as the client area of the window you've specified. If you specify a size, and the window is a different size, a stretchblit occurs, making automatically making D3D fill the window.
SSJCORY
SSJCORY
What i dont understand is why you would set a display mode width and height for fullscreen. Won't it be different for every computer? I just dont get it. 640x480 would only be a fraction of the screen how would that be used for fullscreen?
Please explain i'm trying to get this all figured out before moving on.
Favorite Quotes:Gandalf: You cannot pass!|Smeagol: We don't need you!|Sloth: Hey you guys!|
Namethatnobodyelsetook
Namethatnobodyelsetook
Asking for 640x480 fullscreen changes your display mode to 640x480. It doesn't attempt to display 640x480 pixels in your desktop's display mode, it switches the system to use a display of 640x480. Almost every game allows you to select what resolution you'd like to run in.

For instance, I can play Grand Theft Auto in 640x480, 720x480, 800x600, 1024x768, 1280x1024, or 1600x1200. Whatever resolution I choose in the option screen goes into the presentparams, which changes the computer's display mode. They all are fullscreen, but some have more detail than others. The higher the detail, the slower it's going to run, but the nicer it's going to look.

Go to your desktop. Right click it. Choose properties. Choose settings. Change resolutions via the slider. Click apply or ok. Your resolution changes, but it always fills the screen. Your game has this same power, but only when it's the active application, and fullscreen.
SSJCORY
SSJCORY
Ok i think i got ya now. Thanks for the help. I'll probably post more questions as i go. I just want to be 100% sure of everthing that i am coding and that i'm not just copying code.
Thanks,
Cory
Favorite Quotes:Gandalf: You cannot pass!|Smeagol: We don't need you!|Sloth: Hey you guys!|

Topic Locked

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

Sign in to reply to this topic.