I loaded Windows XP x64 Edition and Visual Studio 2005 Beta 2 yesterday and I was interested in seeing if the project I'm working on works compiled for x64 (AMD64), which also meant compiling GLFW for x64.
The good news is it compiles straight away. It generates a few warnings though, mostly to do with 32-bit values being expanded to 64-bit pointer size, but none of these cases are actually pointers so it doesn't matter. The other warnings are to do with the bizzare fact that Microsoft, in their infinite wisdom, went ahead and marked most of the standary C library as deprecated. All these warnings can be eliminated though with a simple patch that I might write once I figure out CVS.
Come runtime, glfwInit() will always fail, the fix is to define _GLFW_NO_DLOAD_GDI32 and _GLFW_NO_DLOAD_WINMM when compiling GLFW, since for some reason LoadLibrary() is failing. Setting these makes the _glfwLibs struct empty which the new compiler balks at, so that has to be removed from platform.h
Lastly, RDTSC timing of course no longer works since the assembly stuff doesn't work on x64. All x64 chips have variable clockspeed anyway so this isn't really an issue, and writing new assembly for x64 is a pain since the x64 compiler doesn't have inline-assembly support and never will.
So good work Marcus on writing some solid code. If anybody else is interested in providing Windows x64 support in their GLFW programs, then I'll put together these fixes into a patch against the current CVS.
Cool. I'd be very interested in that patch :)
"If anybody else is interested in providing Windows x64 support in their GLFW programs, then I'll put together these fixes into a patch against the current CVS."
Well who wouldn't be interested? heh. That would be cool, mate. I'm in the middle of reinstalling OSes. I got Linux running. and am installing Windows 64 for the first time on the other half of my hard drive. So it would be nice if GLFW worked with that. :)
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.