64-bit Windows
Hi, I'm new here.
I was looking for a way to do 3D programming in C# and in 64-bit mode, and after finding out that Microsoft's XNA Game studio only runs in 32-bit mode, I wound up looking at Tao.
Of course, I then found that I had to also get the source code to freeglut, and compile it in 64-bit mode just to test out the CgExample program. But I did that and then discovered that the Cl_14_bulge example doesn't work in 64-bit mode. It runs fine in 32-bit mode, but shows only the blue background when run in 64-bits.
I thought somebody here would like to know that I was able to track down the problem and fix it. Please note that I am running on Visual Studio 2008 and Vista 64-bits.
Apparently, 64-bit mode doesn't like how you've defined methods like this one: cgSetParameter3fv(IntPtr param, out float v);
If you try and pass more that one float using the "out float v" syntax, only the first float actually gets passed. I don't know what .NET is doing underneath, but maybe it passes a pointer to a temporary float and not the array itself. However, changing the syntax to the following solves the problem: cgSetParameter3fv(IntPtr param, float[] v);
Of course, the calling syntax also has to be modified from this: Cg.cgSetParameter3fv(myCgVertexParam_lightColor, out myLightColor[0]);
To this: Cg.cgSetParameter3fv(myCgVertexParam_lightColor, myLightColor);
I modified the pertinent methods in Cg.cs and now the example program runs fine.
I hope this helps somebody here. It would be nice if you officially supported 64-bit mode in Windows!

i had a similar problem, try
i had a similar problem, try compiling your project with x86 flag. this works fine for me.