~/imallett (Ian Mallett)

Return to the Projects' Listing

Project "libportcullis":

Portcullis is an extremely lightweight but still fairly powerful windowing system currently supporting Windows and Linux, writing directly to the Win32 API or the X windowing system. It has no other dependencies.

Portcullis developed out of frustration with various windowing systems available. wxWidgets fails rudimentary static code analysis. Qt is 5GB each for x86 and x86-64, and exists in mutually incompatible versions. SDL supports one window only. GLUT has the same limitations, and it's proprietary. All except SDL usually hijack your program's main loop (SDL hijacks your main's declaration). Most require at least one shared library each—if not by design, then by law (esp., the (L)GPL). Others aren't cross-platform, are poorly supported, bloated, or unintuitive. I apologize for the generalization, but in my years of GUI development, I have yet to find a windowing toolkit that doesn't suck.

I do appreciate the "irony" that Portcullis does not (yet) support MacOS or most widgets. However, it does support multiple windows and shared OpenGL contexts, while not messing with your application's main loop. It aims to be intuitive to use. Additionally, it is small, ought to be easy to understand, ought to be robust, compiles for x86 and x86-64, can be compiled as a static library, and makes use of C++ features for best practices (like namespaces) that many toolkits flagrantly ignore.

Source is 89KB of C++ with \r\n line endings, and should compile for at least x86 and x86-64. Shell files are provided to build on UNIX machines, and a vs2013 file is provided for Windows. For the latter, you will need to manually adjust the include/library directories to get the example to compile. The program makes use of the "override" keyword, which is supported by recent versions of g++ (>=4.7, I think).

The full source for this project is specifically released to the public domain although, as always, I would appreciate hearing where the code ends up!

Version 1.00
Version 1.0.9
Version 1.1.0

    .zip file (88K)
Source Requirements:


Ian Mallett - Contact -
- 2018 - Creative Commons License