Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Jan 2016 22:47:30 +0300
From:      Eax Melanhovich <afiskon@devzen.ru>
To:        freebsd-questions@freebsd.org
Subject:   FreeBSD 10.2 and OpenGL 3.3 on Intel HD Graphics 4000
Message-ID:  <20160107224730.7839b41d@fujitsu>

next in thread | raw e-mail | index | archive | help
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:
https://github.com/afiskon/c-opengl-text 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
  
  glfwDefaultWindowHints();
  glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
  glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
  glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
  glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
    
  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
unavailable
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
(resources=0x7fffffffea30)
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?



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20160107224730.7839b41d>