Tag Archives: OpenGL

Graphics Driver Headaches

Nothing like computer problems when you’re trying to wrap up your dissertation to really make your day…

Quick tl;dr version: I’ve had a lot of problems with NVIDIA Linux drivers 337.x and even more with 340.24, at least on dual Quadro K600 cards driving four displays using basemosaic. No such problems under 331, but Debian didn’t package the 331 update that supports the current xorg-server ABI. I took their 331.79 package and updated it with the upstream 331.89 version, which fixes a few bugs, adds two PCI IDs, and adds support for the newer xorg-server ABI. Here are the source package, as well as the build results from my i386 and amd64 jessie cowbuilders. Use at your own risk, but they work great for me so far. You’ll have to pin the versions otherwise it’ll try to upgrade after you install them.

The standard disclaimers (no warranty, not responsible for problems, crashes, nasal demons, etc) apply: use at your own risk.

After the jump: deb packages, source packages, source debdiff, problem description, process, and lessons learned.

Continue reading

Screencast: Building OpenGL Assignments on Mac in X-Code

I recorded a brief screencast for the benefit of my classmates who would like to work in the X-Code environment on the Mac (for editing, building, and debugging) for their ME/CprE 557 assignments.

You can go to the video directly by clicking: X-Code and OpenGL Tutorial Screencast.

Note: The replacement include statements I list in the screencast are actually a bit more than necessary – you can use these shorter ones instead (be careful: those are two underscores on each side of the word APPLE):

Where you see:
#include <GL/glut.h>

replace with:
#ifdef __APPLE__
#include <GLUT/glut.h>
#else
#include <GL/glut.h>
#endif

and where you see this (in later assignments only):
#include <GL/glui.h>
replace with:
#ifdef __APPLE__
#include <GLUI/glui.h>
#else
#include <GL/glui.h>
#endif

Why? GLUT (glut.h) includes gl.h, and GLUI (glui.h) includes glut.h, thus you only need the “highest level” of abstraction and utility around the core OpenGL explicitly included.

If you get an error regarding tchar.h when compiling the sample apps, that’s just because TCHAR is a Windows-only macro that turns into the correct kind of char for a particular build.  You’ll just want to use regular “char” and “int main” when making your own app, but to avoid modifying the sample apps too much, you can just download this tchar.h file and add it to the X-Code project.  (It just makes the substitution for you at compile time.)

Remember: The professor will still be using the Makefile (example provided in 557_Support_Files.zip) to re-compile your application, so make sure you update the Makefile and test it before submitting.  You’ll want to submit your cpp and h files, your Makefile, and a binary – best to include the one made by the Makefile, but if you want to find your X-Code one (for testing or another purpose) it’s in the build directory inside your project directory, in the Debug or Release folder (depending on your build configuration chosen in the main X-Code project view).

Feel free to click on this post title (to view it on its own) and bookmark that page for your own use.