Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stetre/moonglut
Lua bindings for FreeGLUT
https://github.com/stetre/moonglut
Last synced: about 2 months ago
JSON representation
Lua bindings for FreeGLUT
- Host: GitHub
- URL: https://github.com/stetre/moonglut
- Owner: stetre
- License: other
- Archived: true
- Created: 2016-02-23T07:33:21.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2021-02-25T10:25:35.000Z (almost 4 years ago)
- Last Synced: 2024-08-02T15:37:42.775Z (5 months ago)
- Language: C
- Size: 114 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## MoonGLUT: Lua bindings for FreeGLUT
_*** This project is discontinued, superseded by
[MoonGLFW](https://github.com/stetre/moonglfw). ***_---
MoonGLUT is a Lua binding library for [FreeGLUT](http://freeglut.sourceforge.net/).It runs on GNU/Linux and on Windows (MSYS2/MinGW) and requires
[Lua](http://www.lua.org/) (>=5.3)
and [FreeGLUT](http://freeglut.sourceforge.net/index.php#download) (>=3.0.0)._Authored by:_ _[Stefano Trettel](https://www.linkedin.com/in/stetre)_
[![Lua logo](./doc/powered-by-lua.gif)](http://www.lua.org/)
#### License
MIT/X11 license (same as Lua). See [LICENSE](./LICENSE).
#### Documentation
See the [Reference Manual](https://stetre.github.io/moonglut/doc/index.html).
#### Getting and installing
Setup the build environment as described [here](https://github.com/stetre/moonlibs), then:
```sh
$ git clone https://github.com/stetre/moonglut
$ cd moonglut
moonglut$ make
moonglut$ make install # or 'sudo make install' (Ubuntu)
```#### Example
```lua
-- Script: hello.luaglut = require("moonglut")
glut.init(arg)
glut.init_context(3, 3, "core")
glut.init_display_mode("rgb", "double", "depth")glut.init_window_size(400, 300)
glut.init_window_position(200, 200)
glut.create_window("Hello world!");glut.display_func(function()
print ("rendering function")
end)glut.main_loop()
```The script can be executed at the shell prompt with the standard Lua interpreter:
```shell
$ lua hello.lua
```Other examples can be found in the **examples/** directory contained in the release package.
#### See also
* [MoonLibs - Graphics and Audio Lua Libraries](https://github.com/stetre/moonlibs).