Fullscreen at the physical display resolution

Monkey Targets Forums/Desktop/Fullscreen at the physical display resolution

Grant(Posted 2015) [#1]
Hi all,

I'm having a bit of a problem, I don't like playing my games in a window, and I don't like playing games at anything other than the resolution of the physical screen with proper VSYNC enabled., regardless of what resolution that screen happens to be.

What I really want is for my GLFW3 apps to start up in fullscreen, but at the native resolution of the monitor they are running on. in other words, I DON'T WANT TO SPECIFY A RESOLUTION! I want it to default to whatever the native resolution of the primary display actually is, regardless of resolution. That is to say if you have a 4k res monitor, i want my app to be at 4k res without silly requesters and resolution changing dialogues etc. I'm assuming a single monitor at all times.

How do I go about this without busting a hump? I'm having no luck so far.

cheers, Grant.


skid(Posted 2015) [#2]
In Versions.txt under v77c there is mention of:

Added DisplayMode class to app; DisplayModes, DesktopMode, SetDeviceWindow, SetSwapInterval functions to app module.

so in your Main before creating your app perhaps try the following:

Local mode:=DisplayMode()
SetDeviceWindow mode.Width,mode.Height,1


Grant(Posted 2015) [#3]
Thanks skid for pointing me in the right direction, your assistance is greatly appreciated.

Local mode:DisplayMode = DesktopMode()
SetDeviceWindow(mode.Width,mode.Height,1)

popping this in the OnCreate method does exactly what I need overriding the settings in the config file.

once again, thank you for your rapid response, may you be blessed with 72 pints of fine frothy ale in the afterlife.

cheers, Grant.


Grant(Posted 2015) [#4]
Now i have a different problem altogether, which seems to be related to the fullscreen thing.

how the hell do I exit a fullscreen glfw app?
the usual Error("") to exit the app works fine if the app is in a windowed mode! but not when the app is fullscreen using the above method.
Does anyone actually test fundamental things like this before product updates are released to us? it seems not. Here enjoy your new car, just ignore the fact the brakes don't work properly if you're reversing. before adding any more new features it would be real nice if the existing features worked properly in all reasonable usage scenarios.

incidently I'm using V84e which is apparently non experimental..

cheers, Grant.


skid(Posted 2015) [#5]
Does anyone actually test fundamental things like this before product updates are released to us?


I understand that working in fullscreen can be frustrating (as it has been for last 25 years) but I think that is a bit harsh.

As a hint (and a feeble attempt to be less helpful) the command you are looking for starts with End and ends with App.


Grant(Posted 2015) [#6]
My apologies skid, frustrations are getting the better of me just now, and yes it was a bit harsh of me, again my apologies.

I found the EndApp() earlier and it just seems to do the exact same thing. works windowed, fails on fullscreen modes, using task manager to get back to the desktop for the moment.

maybe it'll get fixed soon :)

wooooooooosaaaaaaaahhhhhh. my sister said saying this will calm me down.

cheers, Grant.


Grant(Posted 2015) [#7]
hmmm, weirder and weirder.

If I manually set the display mode to the exact size of the desktop in a floating window, using the flag 8 the application wont close. but if i make it 1 pixel smaller on the x and y it will exit properly. so the problem seems not to be limited to fullscreen exclusive. I'm starting to get a weird division by 0 feeling in my gut.

I wonder if my sister has any magic words to dissipate that feeling, < sis, i have this really weird division by 0 feeling in my gut, any magic words to help? Yes! DONOTEATGRAVEL! try that, now stop phoning me up with your computer woes! Thanks sis. >

cheers, Grant.


skid(Posted 2015) [#8]
Should I even ask what operating system you are on?

Holy crud, you did Mojomotosis! Please excuse my rudeness. I have taken old self outside and punished in brutal manner.


Grant(Posted 2015) [#9]
No need my friend, you were entirely justified to lay the old boot in for my arrogance. People like your good self help keep me < contained > when some of my nastier bits poke through the field, providing me with a much needed reality check. I understand how unpredictable the world of development can be when something is updated as much as monkey, its the price we pay for the cutting edge of ease and flexibility.
So if you see me flipping my lid again over something that's really trivial in the grand scheme of things skid, lay your boot in, it works.

I'm using windows 7 home premium 64 bit SP1 with visual studio express 2013 desktop Update 5

I'm glad you liked that little demo :) I'm hoping to make another pretty soon using the fancy mojo2 stuff. the addition of render targets, draw lists and lighting gave me a pleasant twinge in my groin area.

cheers, Grant.