Browse Source

Platform: choose a GLXFBConfig with a pbuffer.

Looking at provided FBConfigs, first few of them are pbuffer-only so why
not just pick those already, we don't need to look for some config that
supports rendering to a window.
pull/427/merge
Vladimír Vondruš 6 years ago
parent
commit
511d0c1b27
  1. 8
      src/Magnum/Platform/WindowlessGlxApplication.cpp

8
src/Magnum/Platform/WindowlessGlxApplication.cpp

@ -85,9 +85,13 @@ WindowlessGlxContext::WindowlessGlxContext(const WindowlessGlxContext::Configura
return;
}
/* Choose config */
/* Choose a config that supports a pbuffer (by default it's GLX_WINDOW_BIT
which we don't need at all) */
int configCount = 0;
constexpr static const int fbAttributes[] = { None };
constexpr static const int fbAttributes[] = {
GLX_DRAWABLE_TYPE, GLX_PBUFFER_BIT,
None
};
GLXFBConfig* configs = glXChooseFBConfig(_display, DefaultScreen(_display), fbAttributes, &configCount);
if(!configCount) {
Error() << "Platform::WindowlessGlxContext: no supported framebuffer configuration found";

Loading…
Cancel
Save