Easy Usage

Published November 27, 2008
Advertisement
So with the little time I have to code, I've managed to get a little bit done on the engine.

One thing that's always bugged me when creating game/render windows is picking the 'right' resolution by default for the user. To combat this issue I wrote a window creation function that does just that.

int OpenQuickWindow(bool fullscreen) is the prototype for it.

Basically, when the method is called it grabs a list of available video modes and removes the video modes with the lowest RGB bit values. If true is passed to it then we assume the user wants the highest resolution video-mode available from the list for full-screen, otherwise we pick a lower resolution mode (but not the lowest) that way windowed mode isn't taking up his/her entire screen.

It's probably not the best routine but it works. My only concern is when you're dealing with weird aspect ratios, like mine for example (16:9) which has 1366 x 768 AND 1365 x 768. Right now it's picking 800x600 for windowed mode on my system which is perfect, I need to test it on other systems before I get too excited.
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement

Latest Entries

Boo!

1611 views

Group blog

1090 views

Easy Usage

1107 views

Angel Script

968 views

My game idea

984 views

Lightmaps

958 views

Yay BSPs!

958 views
Advertisement