MiniGLUT ======== MiniGLUT is a subset of GLUT (or more precisely a subset of FreeGLUT) implemented in a single C source file, without any non-essential dependencies, not even the C library. You can use MiniGLUT by simply dropping two files: `miniglut.h` and `miniglut.c` into your project source tree, or by building MiniGLUT as a static library and linking with it. MiniGLUT does not intend to replace a full GLUT library, like FreeGLUT, for hacking small to medium OpenGL programs. The purpose of MiniGLUT is to potentially replace a full GLUT library when it's time for release, in order to minimize runtime dependencies of the resulting binary. A second reason to use MiniGLUT is to ease porting of UNIX OpenGL programs to Windows, especially when using the microsoft compiler, where setting up and linking with a proper 3rd-party library is an ordeal in itself. Even more so if you decide to statically link, at which point you need to deal with the whole "MSVC runtime" chaos. Even if you decide to link MiniGLUT as a static library, instead of dropping it in your code, it still won't present any MSVC runtime compatibility issues, since it doesn't call any C library functions whatsoever. Download -------- Latest release (v0.1): - https://github.com/jtsiomb/miniglut/releases/download/v0.1/miniglut-0.1.tar.gz - https://github.com/jtsiomb/miniglut/releases/download/v0.1/miniglut-0.1.zip Both archives are identical, choose whichever is more convenient. Source repository (git): - https://github.com/jtsiomb/miniglut Build ----- Under X11 MiniGLUT depends only on Xlib and OpenGL. Therefore to build a program using MiniGLUT you'll need to link with `-lX11 -lGL`. Under Windows MiniGLUT depends only on OpenGL, GDI and winmm. Therefore to build a program using MiniGLUT you'll need to link with `-lopengl32 -lgdi32 -lwinmm`. When building with MSVC, linking with the correct libraries is taken care by pragmas in the header file. If you wish to avoid the winmm dependency, define `MINIGLUT_NO_WINMM`. To avoid calling C library functions, MiniGLUT uses inline assembly code for system calls and trigonometric operations. This makes the default build incompatible with non-x86 systems, and with MSVC x64 builds. If you don't mind linking with the C library, you can define `MINIGLUT_USE_LIBC` to lift these limitations. License ------- Copyright (C) 2020 John Tsiombikas MiniGLUT is free software. Feel free to use, modify and/or redistribute it, under the terms of the GNU General Public License v3, or at your option any newer version published by the Free Software Foundation. See COPYING for details. The intention is not to dictate a specific free software license (GPL) but to shut the door to proprietary programs. If you want to use MiniGLUT in a free software project with an incompatible license, contact me and we will figure out a way to enable that. To learn more about GPL-incompatible free software licenses where this might be an issue, see: https://www.gnu.org/licenses/license-list.en.html#GPLIncompatibleLicenses Known Issues ------------ MiniGLUT being a subset of GLUT, is missing a number of features. Some of them on purpose to keep it minimal, and some of them because I didn't happen to use them in a program I wanted to link with MiniGLUT yet. Missing GLUT features: - The only supported systems are: UNIX with X11 (GLX), and Windows (WGL). - Multiple windows. - Subwindows. - Overlays. - Game mode (video mode switching). - Menus. - Font rendering. - Some of the primitives. - Buttons and Dials callbacks. - Tablet callbacks. - Spaceball callbacks are only implemented on UNIX/X11. - Timer callback. Missing FreeGLUT features: - Mobile callbacks. - Context version and profile selection and other context flags. - Window close actions. - Multi-touch/multi-pointer callbacks. - User-pointer callbacks. - Joystick callbacks. - More missing primitives. If wish to let me know how much you need one of the missing features, or even better if you are volunteering to implement it yourself, send me an email at: nuclear@member.fsf.org Only plain-text emails, hard-wrapped at 72 columns will be accepted.