X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=README.md;h=7eaeea13c84e394e6cc0d9306319dfd328c8eb5a;hb=7c8e930593b4d1f36a4299f742fba7c26862ea79;hp=5fa2bec4d8fef071eaf89899080eb4397801d66a;hpb=74b32cf95068bf04d84d080dc48dc8e89707562f;p=miniglut diff --git a/README.md b/README.md index 5fa2bec..7eaeea1 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,8 @@ MiniGLUT ======== + +![logo](http://nuclear.mutantstargoat.com/sw/miniglut/img/miniglut_logo_sm.png) + 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. @@ -8,28 +11,73 @@ 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 proper GLUT library like FreeGLUT for -hacking OpenGL experiments and small programs. The purpose of MiniGLUT is to -replace a proper GLUT library when it's time for release, in order to minimize -runtime dependencies of the resulting binary. - -A second reason is for porting UNIX OpenGL programs to Windows, especially when -using the microsoft compiler, where setting up and linking with a proper -3rd-party library like FreeGLUT 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. Since MiniGLUT does not call any C library functions, even if -you decide to link it as a static library, it will not affect your choice of -MSVC runtime library. - -Missing features ----------------- +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.2): + - https://github.com/jtsiomb/miniglut/releases/download/v0.2/miniglut-0.2.tar.gz + - https://github.com/jtsiomb/miniglut/releases/download/v0.2/miniglut-0.2.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: - - Only supported systems are UNIX with X11 (GLX) and Windows (WGL). - - Indexed color contexts. + - The only supported systems are: UNIX with X11 (GLX), and Windows (WGL). - Multiple windows. - Subwindows. - Overlays. @@ -52,25 +100,7 @@ Missing FreeGLUT features: - 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, contact me through -through email at: nuclear@member.fsf.org +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. - -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 free software license, contact me, and we -will figure out a way to enable that. Usually only other copyleft licenses are -incompatible with the GPL. There's no issue with combining GPL code with code -using other non-copyleft free software licenses like MIT/X11, 3-clause BSD, and -so on. -See: https://www.gnu.org/licenses/license-list.en.html#GPLIncompatibleLicenses