Computer Science Ilab OpenGL Support

The computer science instructional cluster supports programming using OpenGL. However there are some things to note about it.

There are two main ways to use it: sitting at a desktop in Hill Center, or from home or another remote location.

Desktop Our desktop systems run Centos 7.6. They have OpenGL-capable graphics cards. They support OpenGL 4.4 or 4.5.

Home To use OpenGL from home, you must use Microsoft Remote Desktop. This is available for Windows, Macs and Linux.

Equivalent libraries are availabe on both our Centos systems and ilabx. So the same source code should work, and the same command should work for compiling and loading the program. HOWEVER, some of the libraries are in different locations, so an executable file you build on Centos 7 won't work on Ubuntu and visa versa. If you want to run your program on the other system, simply compile/load it again.

None of these systems are high-performance graphics systems, so they do not have the same performance as a gaming system.

However you will have more processing power and memory available on ilabx than on the desktop systems. If your application does a lot of processing to generate the image, you may get better performance on ilabx, even though the simulated graphics card is slower.

Remote Desktop

We normally recommend connecting to our systems with X2Go. However that won't work for OpenGL. To use OpenGL, you will have to connect using Microsoft Remote Desktop.

By default, you will have the Gnome desktop. If you run into issues, e.g. panels not displaying, you may want to shift to an older desktop. To do that, create a file in your home directory called ".xsession". Note the period at the beginning. It should have one line, either "mate-session" or "xfce4-session", depending upon which window manager you prefer.

Note that with ilab systems other than ilabx, you must use version 8 of Remote Desktop on the Mac. We recommend using version 10 (the current version) with ilabx. Version 8 is deprecated, and will be removed from the store soon.

About OpenGL versions

OpenGL changed how versions work at version 3.2. Until 3.2, new versions added features, but nothing was removed. Starting with 3.2. some old features were removed, a few functions were renamed, and other changes were made. To avoid breaking old programs, two "profiles" were created, compatibility profile and core profile. Compatibility profile behaves like previous versions. It is the default. Core profile gives you the new behavior.

People learning OpenGL now should start learning the Core Profile.

OpenGL programs typically begin by declaring what version they depend upon. If your hardware doesn't support that version, the program will fail to start. This is generally better than having it fail in odd ways because you're used a feature that the hardware doesn't support. The software will also take account of the version you intend to be using. Here's an example of code that uses the minimum Core Profile:

  glfwInit();
  glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR,3);
  glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR,3);
  glfwWindowHint(GLFW_OPENGL_PROFILE,GLFW_OPENGL_CORE_PROFILE);

  GLFWwindow *window=glfwCreateWindow(800,600,"Learn OpenGL",nullptr,nullptr);
Note that it says it uses version 3.3, and the Core Profile. Of course it will work on higher versions of OpenGL, but not lower ones. Programs like this should work on Rutgers Computer Science desktops and on ilabx using Remote Desktop. Higher versions will work on the desktops, but not using Remote Desktop.

Here are the versions supported by various enviornments in the computer science department: