- load rudimentary level file
[cyberay] / libs / miniglut / README.md
1 MiniGLUT
2 ========
3
4 ![logo](http://nuclear.mutantstargoat.com/sw/miniglut/img/miniglut_logo_sm_alpha.png)
5
6 MiniGLUT is a subset of GLUT (or more precisely a subset of FreeGLUT)
7 implemented in a single C source file, without any non-essential dependencies,
8 not even the C library.
9
10 You can use MiniGLUT by simply dropping two files: `miniglut.h` and `miniglut.c`
11 into your project source tree, or by building MiniGLUT as a static library and
12 linking with it.
13
14 MiniGLUT does not intend to replace a full GLUT library, like FreeGLUT, for
15 hacking small to medium OpenGL programs. The purpose of MiniGLUT is to
16 potentially replace a full GLUT library when it's time for release, in order to
17 minimize runtime dependencies of the resulting binary.
18
19 A second reason to use MiniGLUT is to ease porting of UNIX OpenGL programs to
20 Windows, especially when using the microsoft compiler, where setting up and
21 linking with a proper 3rd-party library is an ordeal in itself.  Even more so if
22 you decide to statically link, at which point you need to deal with the whole
23 "MSVC runtime" chaos. Even if you decide to link MiniGLUT as a static library,
24 instead of dropping it in your code, it still won't present any MSVC runtime
25 compatibility issues, since it doesn't call any C library functions whatsoever.
26
27 Download
28 --------
29 Latest release (v0.3):
30   - https://github.com/jtsiomb/miniglut/releases/download/v0.3/miniglut-0.3.tar.gz
31   - https://github.com/jtsiomb/miniglut/releases/download/v0.3/miniglut-0.3.zip
32
33 Both archives are identical, choose whichever is more convenient.
34
35 Source repository (git):
36   - https://github.com/jtsiomb/miniglut
37
38 Build
39 -----
40 Under X11 MiniGLUT depends only on Xlib and OpenGL. Therefore to build a program
41 using MiniGLUT you'll need to link with `-lX11 -lGL`.
42
43 Under Windows MiniGLUT depends only on OpenGL, GDI and winmm. Therefore to build
44 a program using MiniGLUT you'll need to link with `-lopengl32 -lgdi32 -lwinmm`.
45 When building with MSVC, linking with the correct libraries is taken care by
46 pragmas in the header file. If you wish to avoid the winmm dependency, define
47 `MINIGLUT_NO_WINMM`.
48
49 To avoid calling C library functions, MiniGLUT uses inline assembly code for
50 system calls and trigonometric operations. This makes the default build
51 incompatible with non-x86 systems, and with MSVC x64 builds. If you don't mind
52 linking with the C library, you can define `MINIGLUT_USE_LIBC` to lift these
53 limitations.
54
55 License
56 -------
57 Copyright (C) 2020 John Tsiombikas <nuclear@member.fsf.org>
58
59 MiniGLUT is free software. Feel free to use, modify and/or redistribute it,
60 under the terms of the GNU General Public License v3, or at your option any
61 newer version published by the Free Software Foundation. See COPYING for
62 details.
63
64 The intention is not to dictate a specific free software license (GPL) but to
65 shut the door to proprietary programs. If you want to use MiniGLUT in a free
66 software project with an incompatible license, contact me and we will figure out
67 a way to enable that.
68
69 To learn more about GPL-incompatible free software licenses where this might
70 be an issue, see:
71 https://www.gnu.org/licenses/license-list.en.html#GPLIncompatibleLicenses
72
73 Known Issues
74 ------------
75 MiniGLUT being a subset of GLUT, is missing a number of features. Some of them
76 on purpose to keep it minimal, and some of them because I didn't happen to use
77 them in a program I wanted to link with MiniGLUT yet.
78
79 Missing GLUT features:
80  - The only supported systems are: UNIX with X11 (GLX), and Windows (WGL).
81  - Multiple windows.
82  - Subwindows.
83  - Overlays.
84  - Game mode (video mode switching).
85  - Menus.
86  - Font rendering.
87  - Some of the primitives.
88  - Buttons and Dials callbacks.
89  - Tablet callbacks.
90  - Spaceball callbacks are only implemented on UNIX/X11.
91  - Timer callback.
92
93 Missing FreeGLUT features:
94  - Mobile callbacks.
95  - Context version and profile selection and other context flags.
96  - Window close actions.
97  - Multi-touch/multi-pointer callbacks.
98  - User-pointer callbacks.
99  - Joystick callbacks.
100  - More missing primitives.
101
102 If wish to let me know how much you need one of the missing features, or even
103 better if you are volunteering to implement it yourself, send me an email at:
104 nuclear@member.fsf.org
105
106 Only plain-text emails, hard-wrapped at 72 columns will be accepted.