{"id":17870720,"url":"https://github.com/jtsiomb/miniglut","last_synced_at":"2025-04-13T10:56:47.917Z","repository":{"id":37357676,"uuid":"266807257","full_name":"jtsiomb/miniglut","owner":"jtsiomb","description":"minimal single-file GLUT implementation without unnecessary dependencies","archived":false,"fork":false,"pushed_at":"2024-12-13T13:29:46.000Z","size":136,"stargazers_count":66,"open_issues_count":0,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-27T02:11:23.341Z","etag":null,"topics":["glut","opengl","opengl-context","win32","x11"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jtsiomb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-05-25T14:56:25.000Z","updated_at":"2025-03-12T16:09:20.000Z","dependencies_parsed_at":"2024-10-28T10:41:42.312Z","dependency_job_id":"a39bcbac-283c-4077-96b9-dad39088b287","html_url":"https://github.com/jtsiomb/miniglut","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jtsiomb%2Fminiglut","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jtsiomb%2Fminiglut/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jtsiomb%2Fminiglut/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jtsiomb%2Fminiglut/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jtsiomb","download_url":"https://codeload.github.com/jtsiomb/miniglut/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248703195,"owners_count":21148117,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["glut","opengl","opengl-context","win32","x11"],"created_at":"2024-10-28T10:18:42.265Z","updated_at":"2025-04-13T10:56:47.894Z","avatar_url":"https://github.com/jtsiomb.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"MiniGLUT\n========\n\n![logo](http://nuclear.mutantstargoat.com/sw/miniglut/img/miniglut_logo_sm_alpha.png)\n\n![GNU/Linux build status](https://github.com/jtsiomb/miniglut/actions/workflows/build_gnulinux.yml/badge.svg)\n![Windows MinGW build status](https://github.com/jtsiomb/miniglut/actions/workflows/build_win_mingw.yml/badge.svg)\n![Windows MSVC6 build status](https://github.com/jtsiomb/miniglut/actions/workflows/build_win_msvc6.yml/badge.svg)\n\nMiniGLUT is a subset of GLUT (or more precisely a subset of FreeGLUT)\nimplemented in a single C source file, without any non-essential dependencies,\nnot even the C library.\n\nYou can use MiniGLUT by simply dropping two files: `miniglut.h` and `miniglut.c`\ninto your project source tree, or by building MiniGLUT as a static library and\nlinking with it.\n\nMiniGLUT does not intend to replace a full GLUT library, like FreeGLUT, for\nhacking small to medium OpenGL programs. The purpose of MiniGLUT is to\npotentially replace a full GLUT library when it's time for release, in order to\nminimize runtime dependencies of the resulting binary.\n\nA second reason to use MiniGLUT is to ease porting of UNIX OpenGL programs to\nWindows, especially when using the microsoft compiler, where setting up and\nlinking with a proper 3rd-party library is an ordeal in itself.  Even more so if\nyou decide to statically link, at which point you need to deal with the whole\n\"MSVC runtime\" chaos.\n\nOn GNU/Linux x86/x86-64 and 32bit Windows, MiniGLUT can be compiled to never\ncall any C library functions whatsoever (which is the default if you use the\nincluded makefile/msvc project to build a static library). This is useful to\navoid dependencies on any specific libc or msvc runtime.\n\nDownload\n--------\nLatest release (v0.5):\n  - https://github.com/jtsiomb/miniglut/releases/download/v0.5/miniglut-0.5.tar.gz\n  - https://github.com/jtsiomb/miniglut/releases/download/v0.5/miniglut-0.5.zip\n\nBoth archives are identical, choose whichever is more convenient.\n\nSource repository (git):\n  - https://github.com/jtsiomb/miniglut\n\nBuild\n-----\nUnder X11 MiniGLUT depends only on Xlib and OpenGL. Therefore to build a program\nusing MiniGLUT you'll need to link with `-lX11 -lGL`.\n\nUnder Windows MiniGLUT depends only on OpenGL, GDI and winmm. Therefore to build\na program using MiniGLUT you'll need to link with `-lopengl32 -lgdi32 -lwinmm`.\nWhen building with MSVC, linking with the correct libraries is taken care by\npragmas in the header file. If you wish to avoid the winmm dependency, define\n`MINIGLUT_NO_WINMM`.\n\nTo disable calling any C library functions, make sure to have `MINIGLUT_NO_LIBC`\ndefined when building `miniglut.c`. Either add that to your build system, or\njust modify `miniglut.c` and define it at the top.\n\n\u003e Note: in previous versions (including v0.5), building without libc was the\n\u003e default, and you had to define `MINIGLUT_USE_LIBC` to make it use libc. But\n\u003e it turns out usually when you're building miniglut as part of your project,\n\u003e there's no real downside to using libc in most use cases, so I decided to\n\u003e change the default, and have the extra define go to the static library build\n\u003e files instead of *every* project which drops `miniglut.h`/`miniglut.c` in the\n\u003e source tree.\n\nTo avoid calling C library functions, MiniGLUT uses inline assembly code for\nsystem calls and trigonometric operations. This is currently implemented only\non x86 (32 and 64bit), and only on 32bit when building with MSVC (which doesn't\nsupport inline assembly on x86-64). For all other systems you need to link with\nlibc.\n\nLicense\n-------\nCopyright (C) 2020-2024 John Tsiombikas \u003cnuclear@member.fsf.org\u003e\n\nMiniGLUT is free software. Feel free to use, modify and/or redistribute it,\nunder the terms of the GNU General Public License v3, or at your option any\nnewer version published by the Free Software Foundation. See COPYING for\ndetails.\n\nThe intention is not to dictate a specific free software license (GPL) but to\nshut the door to proprietary programs. If you want to use MiniGLUT in a free\nsoftware project with an incompatible license, contact me and we will figure out\na way to enable that.\n\nTo learn more about GPL-incompatible free software licenses where this might\nbe an issue, see:\nhttps://www.gnu.org/licenses/license-list.en.html#GPLIncompatibleLicenses\n\nImplementation Notes\n--------------------\nOn UNIX systems, spaceball callbacks are supported by talking to a 6dof device\ndriver through the *Magellan X11 ClientMessage protocol*. This works with\neither the free software *spacenavd* driver, or the proprietary *3dxsrv*.\nSpacenavd supports all 6dof devices from the first serial ones to current\nmodels.\n\nOn Windows, spaceball support relies on the 3Dconnexion driver and its old\nsiapp API. This should work on any version of the driver from very old ones\nrunning on windows 9x and supporting serial devices, to the latest current\ndriver for USB and bluetooth spacemice.\n\nKnown Issues\n------------\nMiniGLUT being a subset of GLUT, is missing a number of features. Some of them\non purpose to keep it minimal, and some of them because I didn't happen to use\nthem in a program I wanted to link with MiniGLUT yet.\n\nMissing GLUT features:\n - The only supported systems are: UNIX with X11 (GLX), and Windows (WGL).\n - Multiple windows.\n - Subwindows.\n - Overlays.\n - Game mode (video mode switching).\n - Menus.\n - Font rendering.\n - Some of the primitives.\n - Buttons and Dials callbacks.\n - Tablet callbacks.\n - Timer callback.\n\nMissing FreeGLUT features:\n - Mobile callbacks.\n - Context version and profile selection and other context flags.\n - Window close actions.\n - Multi-touch/multi-pointer callbacks.\n - User-pointer callbacks.\n - Joystick callbacks.\n - More missing primitives.\n\nIf wish to let me know how much you need one of the missing features, or even\nbetter if you are volunteering to implement it yourself, send me an email at:\nnuclear@member.fsf.org\n\nOnly plain-text emails, hard-wrapped at 72 columns will be accepted.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjtsiomb%2Fminiglut","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjtsiomb%2Fminiglut","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjtsiomb%2Fminiglut/lists"}