Unable to toggle fullscreen.

Project:AgateLib
Version:0.3.x-dev
Component:AgateSDX
Category:bug report
Priority:critical
Assigned:kanato
Status:open
Description

I'm unable to toggle fullscreen with SVN revision 1248. It just fails with the following error.

Unhandled Exception: OpenTK.Graphics.GraphicsContextException: Failed to swap buffers for context 0 current. Error: 6
at OpenTK.Platform.Windows.WinGLContext.SwapBuffers()
at OpenTK.Graphics.GraphicsContext.SwapBuffers()
at AgateOTK.ContextFB.EndRender()
at AgateOTK.GL_Display.OnEndFrame()
at AgateLib.DisplayLib.ImplementationBase.DisplayImpl.EndFrame()

#1

I should probably also point out that this is with the OpenTK driver, I haven't tested with any other drivers.

#2

What platform are you running on? Can you post a debug log?
If you've compiled the SVN you probably have compiled the tests as well. Can you run the fullscreen test and see if that works?

#7

Component:Display» AgateSDX
Assigned to:BoJaN» kanato

DisplayWindow methods SetFullScreen and SetWindowed are obsolete now. The correct method is to create a new DisplayWindow using the static DisplayWindow.CreateFullScreen or DisplayWindow.CreateWindowed methods.

This works with AgateOTK now, but there is still a problem in AgateSDX with going full screen after a non-fullscreen window has been created. In AgateSDX a D3DERR_INVALIDCALL is thrown on the call to Device.Reset with the full screen present parameters.