OpenGL / Mesa3D programming in Visual Studio

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.


Its been a white since I’ve blogged due to various reasons. Most of these reasons are due to various hosting providers misbehaving.

I have still been doing other things.

RedKite v 0.1 was released and although it still needs some UI adjustments, but v 0.2 is well on its way.

RedKite v 0.1

I got my phone upgraded to a HTC Hero, which is a truly awesome device, even though i do miss Windows Mobile, Android is actually pretty good, although it does suffer from some rather lame parts of Google Apps, like Calendar which is just absolutely crap.

Windows 7 has been released to manufacturing, and i have been running it on my machines since it was given to MSDN, its brilliant and faster than ever.

I’m currently working on a post about what i would like to see in Windows 8, which should be coming up soon.

So im making a twitter client

Over the last few weeks i have been learning WPF, and have been creating a Twitter Client

While i am still learning, this is what i have produced so far, although now i have learnt more i am planning on a slight redesign

[edit: there was a picture here, but due to a server crash it disappeared (i now have better backups)]

What do you think?

I did have to stop using Visual Studio 2010 as its editor was playing up and begin really slow, although this is a beta, and i expect this to be corrected

VS2010 Beta 1, and the annoying bug it has created

I have had VS2010 Beta 1 since Tuesday, and its brilliant, it seriously good, and i have been working on my twitter client in it. 

But all this good has been destroyed by one little annoying bug (my Microsoft Connect bug report). 

Basically when i access a menu item in any of the following applications (List Growing) Live Writer, Explorer, IE8, Live Mesh. The Menu Item will not disappear, but it will persist. Now here’s the weird bit, to clean the menu item i just need to close Media Center or Media Player. 

Its very weird and very annoying when its in the middle of the screen. 

I know its beta and i should expect bugs but MS please patch this ASAP!!!