azul3d / engine

Azul3D - A 3D game engine written in Go!
https://azul3d.org
Other
606 stars 54 forks source link

Requesting Fullscreen when calling window.Run() fails. #172

Open Jsewill opened 7 years ago

Jsewill commented 7 years ago

I'm running Ubuntu 17.04 and using the open source radeon driver. Requesting fullscreen when calling window.Run() results in an almost fullscreen, black area. Here's a more verbose code snippet:

` func gfxLoop(w window.Window, d gfx.Device) { // Initialization ... // Graphics loop for { ... } }

func main() { props := window.NewProps() props.SetFullScreen(true) window.Run(gfxLoop, props) } `

Perhaps fullscreen should be requested after the MainLoop is running? I'm about to try making the window request during the initialization portion of my gfxLoop function. I didn't see anything in the documentation about not being able to make such a request.

Is there a reason not to try the request when calling window.Run()? If not, I'll just chalk it up to my display driver, or an Ubuntu quirk.

UPDATE: Making the request from within the gfxLoop function works correctly.