-
-
Notifications
You must be signed in to change notification settings - Fork 488
Description
Many EGL drivers support EGL_KHR_no_config_context
.
Normally, you have to specify an EGL config (== framebuffer configuration, pixel format, etc) when creating both EGL contexts and EGL surfaces, and the config of the context & surface need to match if you want to use them together.
With the extension, you're allowed to create contexts without a config. You only need to specify a config for creating surfaces and you can use any surface you want with the context.
That's useful if you want to use different surface pixel formats with the same context, e.g. if I want to show framebuffers on screen using KMS and one Screen should do XRGB8888 while the other one should do RGB565. (rare, I know, but not impossible :) )
It would be cool if glutin had something like:
impl Display {
unsafe fn create_no_config_context(&self, context_attributes: &ContextAttributes) -> Result<NotCurrentContext> {
// check EGL_no_config_context is supported, error otherwise
// create context without config
// ...
}
}
(and possibly a Display::supports_no_config_context()
)