FreeBSD 10.2 and OpenGL 3.3 on Intel HD Graphics 4000

Eax Melanhovich afiskon at
Thu Jan 7 20:07:28 UTC 2016

Hello, all

A few years ago I used FreeBSD on a desktop. Now there is a whole week
of holidays here in Russia and since I was quite bored I decided to
check status of FreeBSD as a desktop system once again.

I must admit FreeBSD is now much better in this regard than it was back
in 2009. Still I faced a problem I hope you could help me with.

I'm currently learning OpenGL and first thing I tried to do right after
installing desktop environment was to compile this project: Unfortunately there are some
compatibility issues with clang in dependent libraries so I used gcc.

Here is a problem. I installed FreeBSD 10.2 RELEASE on Toshiba Portege
Z930-DKS laptop which has Intel HD Graphics 4000. This code:

  // demo/main.c
  glfwWindowHint(GLFW_SAMPLES, 4);

  resources->window = glfwCreateWindow(800, 600, "Demo", NULL, NULL);
  if(resources->window == NULL)
    fprintf(stderr, "Failed to open GLFW window\n");
    return -1;

Returns with error and following output:

ERROR: code = 65543, descr = The requested client API version is
Failed to open GLFW window

I traced a problem to this point:

(gdb) bt

#0  errorCallback (code=65543, descr=0x41ea78 "The requested client API
version is unavailable")
at /home/eax/projects/c/c-opengl-text/demo/main.c:74

#1 0x000000000040ac6f in _glfwInputError (error=65543, format=0x0)
at /home/eax/projects/c/c-opengl-text/glfw/src/init.c:111

#2 0x000000000040a6b4 in _glfwIsValidContext (ctxconfig=0x7fffffffe960)
at /home/eax/projects/c/c-opengl-text/glfw/src/context.c:507

#3 0x000000000040d75f in glfwCreateWindow (width=800, height=600,
title=0x41db99 "Demo", monitor=0x0, share=0x0)
at /home/eax/projects/c/c-opengl-text/glfw/src/window.c:206

#4 0x000000000040419b in commonResourcesCreate
at /home/eax/projects/c/c-opengl-text/demo/main.c:102

#5 0x00000000004068c7 in main ()
at /home/eax/projects/c/c-opengl-text/demo/main.c:806

Closer look to frame #2 shows that window->context.{major,minor} values
are {3,2}. In other words this code requires OpenGL 3.3 but only OpenGL
3.2 can be provided.

So my question is - does FreeBSD support OpenGL 3.3 on Intel HD
Graphics 4000? Are there any drivers I need to install or something
like this?

More information about the freebsd-questions mailing list