Im still working on implementig yor tips,
by now the switching is working at long last.
But …
Now the fullscreen isnt drawn at all and if i
quit the app the desktop keeps black too,
untill i drag some window around and cause it
to be redrawn by the system.
Before quitting i aglSetCurrentContext(NULL)
and destroy all contexts i’ve created. Then i
pass the event to the default window handler
(CallNextEventHandler) to do whats left.
I have this problem only when specifying a GDevice
with aglChoosePixelformat. Do i have to release the
GDvice somehow? (i do a ReleaseWindow(win))
I admit, i totally missed the CDGDisplay Api.
It’s still not fully documented, what parameter
do i have to pass for ‘mode’ in
CGDisplaySwitchToMode(CGDirectDisplayID display, CFDictionaryRef mode)?
i got it working now with the 2-Contexts solution.
The problems i had were solved by seting the drawable
to nil for fullscreen and destroying the fullscreen context
to get back to the window.