gfx-rs / gfx

[maintenance mode] A low-overhead Vulkan-like GPU API for Rust.
http://gfx-rs.github.io/
Apache License 2.0
5.35k stars 549 forks source link

[gl] make dummy pbuffer optional #3676

Closed versusvoid closed 3 years ago

versusvoid commented 3 years ago

My system has GL_OES_surfaceless_context, but unable to create pbuffer surfaces (It's mesa, so I doubt I'm the only one)

As I see it correct way would be to: 1) See if we have the extension 2) Try to choose config with PBUFFER_BIT if not 3) Notify user if both fails

But to check for extension we need to already have context and consequently a chosen config, so it's a bit recursive. I simply try to bind newly created context and proceed to make pbuffer only if it fails.

bors[bot] commented 3 years ago

Build succeeded: