Browse Source

Platform: minor cleanup.

pull/116/head
Vladimír Vondruš 11 years ago
parent
commit
79cf010db0
  1. 6
      src/Magnum/Platform/WindowlessGlxApplication.cpp

6
src/Magnum/Platform/WindowlessGlxApplication.cpp

@ -65,14 +65,14 @@ bool WindowlessGlxApplication::tryCreateContext(const Configuration&) {
/* Choose config */ /* Choose config */
int configCount = 0; int configCount = 0;
static const int fbAttributes[] = { None }; constexpr static const int fbAttributes[] = { None };
GLXFBConfig* configs = glXChooseFBConfig(_display, DefaultScreen(_display), fbAttributes, &configCount); GLXFBConfig* configs = glXChooseFBConfig(_display, DefaultScreen(_display), fbAttributes, &configCount);
if(!configCount) { if(!configCount) {
Error() << "Platform::WindowlessGlxApplication::tryCreateContext(): no supported framebuffer configuration found"; Error() << "Platform::WindowlessGlxApplication::tryCreateContext(): no supported framebuffer configuration found";
return false; return false;
} }
GLint contextAttributes[] = { constexpr static const GLint contextAttributes[] = {
#ifdef MAGNUM_TARGET_GLES #ifdef MAGNUM_TARGET_GLES
#ifdef MAGNUM_TARGET_GLES3 #ifdef MAGNUM_TARGET_GLES3
GLX_CONTEXT_MAJOR_VERSION_ARB, 3, GLX_CONTEXT_MAJOR_VERSION_ARB, 3,
@ -93,7 +93,7 @@ bool WindowlessGlxApplication::tryCreateContext(const Configuration&) {
0 0
}; };
PFNGLXCREATECONTEXTATTRIBSARBPROC glXCreateContextAttribsARB = (PFNGLXCREATECONTEXTATTRIBSARBPROC) glXGetProcAddress((const GLubyte*)"glXCreateContextAttribsARB"); const PFNGLXCREATECONTEXTATTRIBSARBPROC glXCreateContextAttribsARB = (PFNGLXCREATECONTEXTATTRIBSARBPROC) glXGetProcAddress((const GLubyte*)"glXCreateContextAttribsARB");
_glContext = glXCreateContextAttribsARB(_display, configs[0], nullptr, True, contextAttributes); _glContext = glXCreateContextAttribsARB(_display, configs[0], nullptr, True, contextAttributes);
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES

Loading…
Cancel
Save