Update: You will need to move the various .dll files into your project folder so they are in the path of the application, otherwise you will get missing DLL errors.
I am currently taking the Computer Graphics and Visualisation module at university and it require writing some programs in C using OpenGL / Mesa3D. Unfortunately the guides and tutorials they give on how to do it on Windows are from 1997, so i have decided to update them for 2010.
In this tutorial i am using Mesa3D 7.6.1, Visual Studio 2008. It also works with Visual Studio 2010 Beta 2.
The first step is to either download the Mesa3D Binaries from here or to compile them from source (compiling from source is pretty simple). Then extract the file somewhere sensible.
The second step is to setup a Visual Studio project so we can actually code something.
First create a new ‘Win32 Console Application’:
Then choose your options. I’m picking a Empty project for this, but modify the options to what ever your needs are.
Click finish then we, and we have our newly created project. Now we need to make a few changes, to include the additional libraries, and header files we require.
Open up project properties. Then under ‘Configuration Properties’->‘C/C’++->’General’ you have the ‘Additional Include Directories’ setting, open this up, and add a folder, and navigate to your Mesa3D folder and select the ‘include’ directory.
It has been noted that you need to have at least ONE .c / .cpp / .h file in your project for the C/C++ options to become available.
Then go back to project properties, now under ‘Configuration Properties’->‘Linker’->’General’ you have the ‘Additional Library Directories’ setting, open this up, and add a folder, and navigate to your Mesa3D folder and select the ‘lib’ directory.
Now you can do your coding as you like. Import code straight from your Linux projects (Use ‘Add Existing Items’) and it should compile fine if you have done everything correctly.
Anyway i hope this helps someone, if you have any comments for potential improvements or problems you are having, then please leave a comment and i will try to help out.