Programming 2D Games

The official forum for "Programming 2D Games" the book by: Charles Kelly

It is currently Fri Nov 16, 2018 2:55 pm

All times are UTC




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Full screen resolution
PostPosted: Thu Feb 18, 2016 8:36 pm 
Offline

Joined: Wed Nov 25, 2015 4:56 pm
Posts: 24
Just a quick question. How can we get higher resolutions for fullscreen?

I can do higher resolutions in windowed mode but not in fullscreen. I have a Geforce GTX 560 Ti.

Error message I get is "The graphics device does not support the specified resolution and/or format"

This is running your Game Engine version 4.0 and setting the FULLSCREEN constant to true in the constants file.

Thanks :)


Top
 Profile  
Reply with quote  
PostPosted: Thu Feb 18, 2016 9:25 pm 
Offline
Site Admin
User avatar

Joined: Sat Jan 28, 2012 4:36 pm
Posts: 547
The available pixel format and display resolution combinations differ between display adapters. The following MSDN page might help.
https://msdn.microsoft.com/en-us/library/windows/desktop/bb174314(v=vs.85).aspx

_________________
Professor Kelly


Top
 Profile  
Reply with quote  
PostPosted: Thu Feb 18, 2016 9:37 pm 
Offline

Joined: Wed Nov 25, 2015 4:56 pm
Posts: 24
Thanks

Is there a way to code test this? It seems really strange that I can change to something standard like 1024x800 and it works in windowed but not full screen. Even though my desktop can run at much higher resolution.

640x480 resolution is far too low for games for today (or even the last few years). :)


Top
 Profile  
Reply with quote  
PostPosted: Thu Feb 18, 2016 9:54 pm 
Offline
Site Admin
User avatar

Joined: Sat Jan 28, 2012 4:36 pm
Posts: 547
Listing 3.27 page 68: isAdapterCompatible

Run through the different configurations until you find one that works. It is not simply the resolution. A high resolution may work with a different pixel format.

_________________
Professor Kelly


Top
 Profile  
Reply with quote  
PostPosted: Thu Feb 18, 2016 10:01 pm 
Offline

Joined: Wed Nov 25, 2015 4:56 pm
Posts: 24
Ok cool. So I should get my function to also cycle through


D3DFMT_A1R5G5B5
D3DFMT_A2R10G10B10
D3DFMT_A8R8G8B8
D3DFMT_R5G6B5
D3DFMT_X1R5G5B5
D3DFMT_X8R8G8B8

Modes as well?


Top
 Profile  
Reply with quote  
PostPosted: Fri Feb 19, 2016 12:25 pm 
Offline
Site Admin
User avatar

Joined: Sat Jan 28, 2012 4:36 pm
Posts: 547
Correct.

_________________
Professor Kelly


Top
 Profile  
Reply with quote  
PostPosted: Fri Feb 19, 2016 7:31 pm 
Offline

Joined: Wed Nov 25, 2015 4:56 pm
Posts: 24
Ha I've just realised my mistake. I was trying a non standard resolution lol.

All works ok, but thanks for your help:)


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group