kwin: Use glXCreateContextAttribsARB() when it's supported
This commit is contained in:
parent
aab026af93
commit
84ad2585e1
1 changed files with 8 additions and 2 deletions
|
@ -132,11 +132,17 @@ void GlxBackend::init()
|
||||||
kDebug(1212) << "Direct rendering:" << isDirectRendering() << endl;
|
kDebug(1212) << "Direct rendering:" << isDirectRendering() << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool GlxBackend::initRenderingContext()
|
bool GlxBackend::initRenderingContext()
|
||||||
{
|
{
|
||||||
bool direct = options->isGlDirect();
|
bool direct = options->isGlDirect();
|
||||||
|
|
||||||
|
// Use glXCreateContextAttribsARB() when it's available
|
||||||
|
if (glXCreateContextAttribsARB) {
|
||||||
|
int attribs[] = { 0 };
|
||||||
|
ctx = glXCreateContextAttribsARB(display(), fbconfig, 0, direct, attribs);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!ctx)
|
||||||
ctx = glXCreateNewContext(display(), fbconfig, GLX_RGBA_TYPE, NULL, direct);
|
ctx = glXCreateNewContext(display(), fbconfig, GLX_RGBA_TYPE, NULL, direct);
|
||||||
|
|
||||||
if (!ctx) {
|
if (!ctx) {
|
||||||
|
|
Loading…
Reference in a new issue