public interface IGlContextSourceA window that can produce an OpenGL context.
Remarks
A separate interface rather than a member on IWindow, because it is a capability rather than a property of being a window. A headless window has no context and never will; a browser canvas has one and no Vulkan surface. Putting it on IWindow would make every implementation answer a question most of them cannot, and would break each of them to add it.
⚠ Implementing this is not the same as being able to honour it. On SDL the window has to have been created with the OpenGL flag, and that flag is mutually exclusive with the Vulkan one — a window is made for one API and cannot change its mind. So a window made for Vulkan implements this interface and refuses, with that as the reason.
Methods (1)
bool TryCreateGlContext(in GlContextRequest request, out IGlContext? context, out string? reason)Creates a context on this window, or says why it cannot.
Used by (3)
- DesktopGlContextTestsVixen.Platform.Desktop.Tests
- DesktopWindowVixen.Platform.Desktop
- GraphicsHostVixen.App