Which OpenGL to use with CUDA on XP? MS OpenGL seems to be problematic.

Hi there,

I’m trying to compile use CUDA with OpenGL so that I can make my code run both on XP and Linux. But, I’ve been having a hard time finding the OpenGL libraries and headers (OpenGL 2.0).

Nvidia’s website isn’t very helpful in pointing out a source to use.
Anyone know where to find the proper files?

Thanks

Shane

The NVIDIA Linux driver installs the dev headers, in WinXP you need to do all function bindings explicitly because there is no runtime loader to resolve dependencies from shared objects.

I would suggest anyway not to use the OpenGL headers directly. Use an abstraction like GLEW instead. It is available for several platforms and also gives you easy access to all OpenGL extensions. On WinXP for example it does the necessary function pointer bindings for you. I use it in conjunction with glut (for simple tests) and QT4 (for real apps) which gives you highly portable code for Linux, XP, Solaris, MacOS.

Peter

Sorry forgot to give the link: GLEW on SourceForge

Peter

Thanks Peter. I’ll give it a try.

Cheers

Shane

The CUDA SDK includes all the OpenGL headers you should need (look in “NVIDIA CUDA SDK\common\inc\GL”).

At the moment we’re using glh for extension loading in Windows, but we’re switching to GLEW in the next release.

The CUDA SDK 0.8.1 (posted last week) uses GLEW.

Mark