better workaround for Intel GPU crash for glDrawBuffer on Linux

fix a linux build issue
This commit is contained in:
Erwin Coumans
2014-06-27 17:18:25 -07:00
parent 771a2e0bcb
commit 063a0344ac
3 changed files with 20 additions and 4 deletions

View File

@@ -15,6 +15,7 @@
#include <unistd.h>
#include <pthread.h>
extern bool gIntelLinuxglDrawBufferWorkaround;
GLint att[] = { GLX_RGBA, GLX_DEPTH_SIZE, 24, GLX_DOUBLEBUFFER, None };
static bool forceOpenGL3 = true;
@@ -233,6 +234,12 @@ void X11OpenGLWindow::enableOpenGL()
}
const GLubyte* ven = glGetString(GL_VENDOR);
printf("GL_VENDOR=%s\n", ven);
if (strncmp((const char*)ven,"Intel",5)==0)
{
printf("Workaround for some crash in the Intel OpenGL driver on Linux/Ubuntu\n");
gIntelLinuxglDrawBufferWorkaround=true;
}
const GLubyte* ren = glGetString(GL_RENDERER);
printf("GL_RENDERER=%s\n",ren);
const GLubyte* ver = glGetString(GL_VERSION);