2009/12/11 Stefan Dösinger stefandoesinger@gmx.at:
Am 11.12.2009 um 15:47 schrieb Henri Verbeet:
It's really not that hard, you just call surface_is_offscreen() on the target. Arguably swapchain_init() shouldn't be screwing around with context creation in the first place, but that's really a separate issue, unless you're volunteering to clean that up first.
By the time we create the context the swapchain and surfaces aren't fully constructed. However, we luckily call SetContainer on the initial surface before we call create_context, so it should work for now.
That's a big part of the reason why swapchain_init() shouldn't do context creation. Doesn't change the fact that it's the responsibility of context_create() to properly initialize the context's fields.