GLFW for Object Pascal
Posted by Johannes Stein on Aug 1, 2009 in Development, Libraries, Linux, Mac OS X, Windows | 0 comments
This post is also available in: German
GLFW is a platform-independant framework for OpenGL applications written in C and quite similar to SDL. Back in 2007, the latest version (2.6) of GLFW has been released containing a (deprecated) header file for Delphi. Unfortunately, it hasn’t had FreePascal support and only worked with Windows.
A few days back the question has been raised in the Pascal Game Development forum if it is possible to use PhoenixLib or Andorra2D on Mac OS X, both engines can be used with GLFW as a backend. I took the time to add FreePascal support to glfw.pas and ensured crossplatform-compability. I also replaced the old OpenGL header with the latest header from dglOpenGL and modified slightly it to work with GLFW. While I was at it, I updated the glfw.pas header version from API 2.5 to 2.6. It took a bit longer than expected, but after all it was not that much work.
Download here (2,4 MB; contains examples Triangle + Mipmaps with binaries and source)
Patch files here (7 kB; if you already have glfw.pas and dglOpenGL.pas installed on your system and you just want to apply the changes)
I contacted the maintainer(s) of GLFW, I haven’t received an answer yet, but I think if they find it useful it could be part of the next release. I certainly hope so.
Update: As of now, I am the offical maintainer of the Pascal bindings.


