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.
- Connect to ilabx.cs.rutgers.edu. This is part of the ilab cluster, but it's running Ubuntu 18. The desktops and the major servers run Centos 7. Unfortunately, the OpenGL support in Centos 7 is buggy, so you'll need to use Ubuntu for OpenGL programming.
- ilabx supports OpenGL 3.3. This is the first version of OpenGL that supported the Core Profile.
- ilabx has the same home directory as the rest of the ilab cluster.
- We limit access to ilabx to faculty, and students taking courses that need it.
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.
- The desktops use what is now a mid to low-end graphics controller.
- When you access ilabx via Remote Desktop, you're using a software simulated graphics card. (The software is called llvmpipe.) The software compiles code on the fly, and uses 8 cores in parallel, but it still won't match a real graphics card.
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.
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.
- Windows: It is a standard part of Windows.
- Mac: Install it from the Mac App Store. Run the program. Click + to create an entry for ilabx.cs.rutgers.edu. Make sure you type "ilabx.cs.rutgers.edu" as the "PC name." When you close the window that creates an entry, it will appear in the list. Double-click it to connect to ilabx. Login with your computer science username and password.
- RedHat/Centos Linux: You need rdesktop. It is part of a special repository, nux-dextop. This article tells you how to set up the repository: Nux Desktop on Centos 7/6. Once the repository is available, use "yum install --enablerepo=nux-dextop rdesktop". To connect to ilabx, type "rdesktop ilabx.cs.rutgers.edu". Login with your computer science username and password.
- Ubuntu Linux: Install using "sudo apt-get install rdesktop". To connect to ilabx, type "rdesktop ilabx.cs.rutgers.edu". Login with your computer science username and password.
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:
- Desktops in Hill 2nd floor: 4.4 or 4.5, supports Core Profile, hardware implementation
- Remote Desktop to ilabx.cs.rutgers.edu: 3.3, supports Core Profile, software implementation, llvmpipe
- Remote Desktop to ilab systems other than ilabx: 2.1, only compatibility profile, software implementation, llvmpipe. X2Go may also give the same result, but we're not sure it will always work.