anomaly's picture

glControl.Mode property

I noticed in the reference documentation that glControl apparently has a property called Mode that can be used to read the current display mode, however I find no property in my glControl instance...

Does this mean that glControl is expected to change soon in this regard? Or does it mean the docs are outdated and it's since been removed from glControl?

Any other way to directly control the display mode and have fullscreen drawing in a cross platform friendly manner? (I tried the 'maximized window without frame controls' method, but for some reason my X11 and WM combo breaks hard on it and forces the window back to 'normal' state...)

Also, due to performance considerations, 'true' fullscreen would be preferred anyway.. but in the mean time being able to resize the window to a specific size based on glControl.Mode's value would be helpful


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
the Fiddler's picture

You can resize the GLControl using the standard WinForms properties (Size/ClientSize/Width/Height). Also, which WM and which Mono release are you using? It may be useful to log a bug at the Mono WinForms project.

The reason why there you cannot currently set the GraphicsMode for GLControl is that there are several restrictions on which modes are available when using WinForms. We'd either need a reliable method of re-creating existing forms according to the requested pixel formats/visuals, or fallbacks (when the pf/visuals are not compatible).

anomaly's picture

I think I'll switch to using gameWindow anyway, it sounds a lot nicer. I can resize the form, just not set the maximized property for some reason

(using mono 1.9 and fluxbox, but I also tried with gnome and it spat the dummy aswell. I was hoping to use glControl.Mode to fetch the current mode as opposed to setting it, so I know what to pass to size/clientsize/width/height though.)

Also, if what you're saying is the case, shouldn't the docs be changed to reflect that this property isn't available? And any other method of fetching the current display mode being used?