Working on other operating systems

The labs are performed on Linux Mint, that is a variant of Ubuntu. However, it is perfectly possible to use other operating systems. OpenGL runs on practically any device that has any kind of graphics output! This includes all Linuxes, MS Windows, Mac OS X, but also most smartphones, tablets, etc. In most cases, it is pretty easy to get OpenGL rolling, there are good examples available and the differences between systems is small.

Ubuntu, CentOS

Ubuntu and CentOS are both Linux, which makes them so close to Mint that they are almost trivial to use. The makefiles should work unchanged or almost unchanged.

ThinLinc

The university provides ThinLinc as an easy way to make laborations from home. Alas, ThinLinc has practically no support for graphics! Running modern OpenGL over it is impossible according to the support. So, don’t try, and no, there is nothing I can do about it. Without a GPU in the system, GPU programming gets pretty pointless.

Windows

For Microsoft Windows users, we have a few possibilities. The most up-to-date code to work from at this time (2016) is the "psychedelic teapot" demo in the demo section (linked from top computer-graphics.se page).

We have also (earlier) prepared a Visual Studio project (by Umapathi Tallapragada, new version by Ingemar).

openGL3Example-vs.zip (New version, cleaned up to match the labs and including some installation instructions.)

You need GLEW and MicroGLUT, both included in the lab package.

This example is pretty old by now, but I hope it can be of some help even if you have a newer version of VS. For now (2016) please start with the psychedelic teapot!

There are, of course, many other ways to develop under Microsoft Windows but I hope you understand that we can't support them all.

The general rule for Windows is that you need to use GLEW, the OpenGL Extrension Wrangler. This means including a library, an #include at the right place and a function call in the main program. Not too bad.

One more thing: MinGW. The lab material works with MinGW, after some changes.

[THIS PLACE IS RESERVED FOR A COMPLETE GUIDE ON MINGW FOR THE LABS.]


MacOS X

All labs and all demos were originally developed on Mac OS X so how can you go wrong? Well, one vital detail:

Don't use MicroGlut for Linux on the Mac!

On the Mac, you use the Mac version (MicroGlut.m). If you link with the Linux version (MicroGlut.c) you will get a ton of errors since it can't find X11. MicroGlut for Mac is included in the lab package.

You need to use MacOSX 10.7 or up, with Xcode installed. You should also install "Command line tools"! (Preferences/Downloads in Xcode or separate download or by a command-line command.) But you already had this, right?

One more thing: On the Mac, OpenGL is a framework, not a library. So you don't link OpenGL with -lgl, but with -framework OpenGL. Cocoa also needs to be linked.

GLES

GLES, OpenGL for Embedded Systems, is what you find on your phone. It is a perfectly usable OpenGL, but with some differences. Expect some editing if you want to make the labs here.

WebGL

WebGL is OpenGL for web browsers. This limits you to JavaScript. Also, WebGL is a variant of GLES so the same differences apply.

Other languages

Apart from OpenGL's great portability to different platforms, it is also extremely portable between different programming languages! Just about any remotely useful language comes with an OpenGL interface!

Java: The OpenGL interfaces is called JOGL.

C++: C++ calls into OpenGL just like C does. All lab code has been prepared to be "C++ friendly", it has some #ifs to handle the interface between the languages. VectorUtils3 also includes C++ operator overloading.

Python: The Python OpenGL interfaces are called PyOpenGL.

(I could write about a dozen other languages here.)

You are allowed to use any platform and any language you like, especially for the porjects, but be warned: The farther away you go from what we have experience with, the more you are on your own to solve problems. We will help, but our help can get shallower on platforms that we are not familiar with. But I really love to see students "boldly go where noone has gone before". I just havn't been there myself.

This page is maintained by Ingemar Ragnemalm