All Projects β†’ stetre β†’ Moonlibs

stetre / Moonlibs

Lua libraries for graphics and audio programming

Programming Languages

lua
6591 projects

Projects that are alternatives of or similar to Moonlibs

Mosaic
Mosaic, an openFrameworks based Visual Patching Creative-Coding Platform
Stars: ✭ 250 (+90.84%)
Mutual labels:  graphics, audio
Awesome Python Applications
πŸ’Ώ Free software that works great, and also happens to be open-source Python.
Stars: ✭ 13,275 (+10033.59%)
Mutual labels:  graphics, audio
Csfml
Official binding of SFML for C
Stars: ✭ 211 (+61.07%)
Mutual labels:  graphics, audio
Sfml.net
Official binding of SFML for .Net languages
Stars: ✭ 354 (+170.23%)
Mutual labels:  graphics, audio
Sfml
Simple and Fast Multimedia Library
Stars: ✭ 7,316 (+5484.73%)
Mutual labels:  graphics, audio
Rust Game Development Frameworks
List of curated frameworks by the **Game Development in Rust** community.
Stars: ✭ 81 (-38.17%)
Mutual labels:  graphics, audio
Openframeworks
openFrameworks is a community-developed cross platform toolkit for creative coding in C++.
Stars: ✭ 8,652 (+6504.58%)
Mutual labels:  graphics, audio
Ocamlverse.github.io
Documentation of everything relevant in the OCaml world
Stars: ✭ 117 (-10.69%)
Mutual labels:  graphics, audio
Bsf
Modern C++14 library for the development of real-time graphical applications
Stars: ✭ 1,640 (+1151.91%)
Mutual labels:  graphics
Audio
Generic Go package designed to define a common interface to analyze and/or process audio data
Stars: ✭ 129 (-1.53%)
Mutual labels:  audio
Gcanvas
A lightweight cross-platform graphics rendering engine. (θΆ…θ½»ι‡ηš„θ·¨εΉ³ε°ε›Ύε½’εΌ•ζ“Ž) https://alibaba.github.io/GCanvas
Stars: ✭ 1,705 (+1201.53%)
Mutual labels:  graphics
Chicago Brick
Software that displays content on a multi-node video wall.
Stars: ✭ 127 (-3.05%)
Mutual labels:  graphics
Libmali
The Mali GPU library used in Rockchip Platform
Stars: ✭ 128 (-2.29%)
Mutual labels:  graphics
Ragg
Graphic Devices Based on AGG
Stars: ✭ 127 (-3.05%)
Mutual labels:  graphics
Skip Silence
πŸ”‡ Chrome extension to skip silent parts in videos and audio files on any webpage
Stars: ✭ 130 (-0.76%)
Mutual labels:  audio
Eneida
Experimental demoscene project using C99 and Direct3D 12. Fully standalone with custom windows, and d3d12 headers. No Windows SDK, libc or Visual Studio dependency. C and HLSL compilers included.
Stars: ✭ 125 (-4.58%)
Mutual labels:  graphics
Bitmap
C++ Bitmap Library
Stars: ✭ 125 (-4.58%)
Mutual labels:  graphics
Gadfly.jl
Crafty statistical graphics for Julia.
Stars: ✭ 1,724 (+1216.03%)
Mutual labels:  graphics
Neural Style Audio Torch
Torch implementation for audio neural style.
Stars: ✭ 130 (-0.76%)
Mutual labels:  audio
Cosin
Android loading view library πŸ“ŠπŸ­
Stars: ✭ 129 (-1.53%)
Mutual labels:  graphics

MoonLibs - Graphics and Audio Lua Libraries

A collection of libraries for graphics, audio, and heterogeneous programming in Lua (>= 5.3), mostly bindings to popular C/C++ libraries.

They currently run on GNU/Linux and (most of them) on Windows with MSYS2/MinGW-w64. A few of them also run on MacOS, thanks to contributions from other developers.

The libraries do not depend on each other, so they can be selectively installed (they must, actually, since this repository is only a collector of links to the repos of the individual libraries).

For bug reports, suggestions, etc., please open an issue in the repo of the relevant library.

For general discussions on Lua and related topics you can join the Lua Forum, a newly created forum intended as a welcoming place for beginners (I'm not the owner, but I'm active there with the username stetre).

Author: Stefano Trettel

Lua logo



Installation instructions

TLDR - Provided you have already installed the toolchain (GNU/Linux, Windows, MacOS) and the needed dependencies, to install a library of the collection all you have to do is clone it, enter its base directory, compile and install. E.g. for MoonFLTK:

$ git clone https://github.com/stetre/moonfltk
$ cd moonfltk
moonfltk$ make
moonfltk$ make install # or: $ sudo make install

To uninstall it:

moonfltk$ make uninstall # or: $ sudo make uninstall

Installing on GNU/Linux

The following instructions show how to install the libraries on Ubuntu. To install on a GNU/Linux distribution other than Ubuntu, replace apt with the package manager used by the distribution (the names of the packages may also differ).

Install the toolchain and Lua

Install the following packages (if you don't have them already):

$ sudo apt install make
$ sudo apt install binutils
$ sudo apt install gcc
$ sudo apt install git

Install the latest version of Lua:

$ sudo apt install libreadline-dev
$ wget https://www.lua.org/ftp/lua-5.3.4.tar.gz
$ tar -zxpvf lua-5.3.4.tar.gz
$ cd lua-5.3.4
lua-5.3.4$ make linux
lua-5.3.4$ sudo make install
Install a library

The following instructions show how to install MoonFLTK, but the same procedure applies to any other any other library of the collection.

First, install any dependencies needed by the library. MoonFLTK needs FLTK, which you can install by typing:

$ sudo apt install libfltk1.3-dev

Then clone the library (or, if you prefer, download the latest release tarball and decompress, it), enter its base directory, compile, and install:

$ git clone https://github.com/stetre/moonfltk
$ cd moonfltk
moonfltk$ make
moonfltk$ sudo make install

To uninstall the library:

moonfltk$ sudo make uninstall

Installing on Windows

The following instructions show how to install the libraries on Windows with MSYS2/MinGW-w64.

Install MSYS2/MinGW-w64

Download the MSYS2 installer and follow the instructions from the download page.

Install the toolchain and Lua

In the following, we'll assume that you installed MSYS2 in the default location C:\msys32. If not, change the paths below accordingly to your chosen location.

Open a MinGW shell (using the shell launcher C:\msys32\mingw32.exe or mingw64.exe, depending on your architecture), and install the following packages:

$ pacman -S make
$ pacman -S tar
$ pacman -S git
$ pacman -S ${MINGW_PACKAGE_PREFIX}-gcc
$ pacman -S ${MINGW_PACKAGE_PREFIX}-lua

Append one of the following two paths, depending on your architecture, to the PATH environment variable:

  • C:\msys32\mingw32\bin (corresponding to /mingw32/bin under MSYS2, for 32-bit), or
  • C:\msys32\mingw64\bin (corresponding to /mingw64/bin under MSYS2, for 64-bit).

(To do so, right click Computer->Properties->Advanced System Settings->Environment variables, then search for the PATH or Path system variable, edit it, and append a semicolon (;) followed by the path).

Now your environment is ready and you should be able to execute the Lua interpreter from the Windows command prompt, by just typing lua in it (to exit from the interpreter, type os.exit() or Ctrl-C in it).

Install a library

The following instructions show how to install MoonFLTK, but the same procedure applies to any other any other library of the collection, provided it is supported on Windows.

First, open a MinGW shell and from there install any dependencies needed by the library. MoonFLTK needs FLTK, which you can install by typing:

$ pacman -S ${MINGW_PACKAGE_PREFIX}-fltk

Then clone the library (or, if you prefer, download the latest release tarball and decompress, it), enter its base directory, compile, and install:

$ git clone https://github.com/stetre/moonfltk
$ cd moonfltk
moonfltk$ make
moonfltk$ make install

To uninstall the library:

moonfltk$ make uninstall

Installing on MacOS

The following instructions show how to install the libraries on MacOS.

Install Homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Install Lua
$ brew install [email protected]
$ brew install luarocks
Install a library

The following instructions show how to install MoonFLTK, but the same procedure applies to any other any other library of the collection, provided it is supported on MacOS.

First, install any dependencies needed by the library. MoonFLTK needs FLTK, which you can install by typing:

$ brew install fltk

Then clone the library (or, if you prefer, download the latest release tarball and decompress, it), enter its base directory, compile, and install:

$ git clone https://github.com/stetre/moonfltk
$ cd moonfltk
moonfltk$ make
moonfltk$ sudo make install

(If MacOS says that The Git command requires the command line developer tools, click Install and Agree to the License Agrement.)

To uninstall the library:

moonfltk$ sudo make uninstall

Dependencies

The same procedures shown above for MoonFLTK apply to any other library of the collection, and differ only in the dependencies (if any, other than Lua and the C standard libraries) that need to be installed.

The dependencies needed by the different libraries are listed below.

GNU/Linux (Ubuntu):

$ sudo apt install libfltk1.3-dev     # needed only by MoonFLTK
$ sudo apt install libglfw3-dev       # needed only by MoonGLFW
$ sudo apt install freeglut3-dev      # needed only by MoonGLUT
$ sudo apt install libglew-dev        # needed only by MoonGL
$ sudo apt install libassimp-dev      # needed only by MoonAssimp
$ sudo apt install libfreetype6-dev   # needed only by MoonFreeType
$ sudo apt install libsndfile1-dev    # needed only by MoonSndFile
$ sudo apt install libopenal-dev      # needed only by MoonAL
$ sudo apt install libjack-jackd2-dev # needed only by LuaJack

Windows (MSYS2/MinGW-w64):

$ pacman -S ${MINGW_PACKAGE_PREFIX}-fltk        # needed only by MoonFLTK
$ pacman -S ${MINGW_PACKAGE_PREFIX}-glfw        # needed only by MoonGLFW
$ pacman -S ${MINGW_PACKAGE_PREFIX}-freeglut    # needed only by MoonGLUT
$ pacman -S ${MINGW_PACKAGE_PREFIX}-glew        # needed only by MoonGL
$ pacman -S ${MINGW_PACKAGE_PREFIX}-assimp      # needed only by MoonAssimp
$ pacman -S ${MINGW_PACKAGE_PREFIX}-freetype    # needed only by MoonFreeType
$ pacman -S ${MINGW_PACKAGE_PREFIX}-libsndfile  # needed only by MoonSndFile
$ pacman -S ${MINGW_PACKAGE_PREFIX}-openal      # needed only by MoonAL

MacOS:

$ brew install fltk        # needed only by MoonFLTK
$ brew install glfw        # needed only by MoonGLFW
$ brew install glew        # needed only by MoonGL

Examples

Each library comes with a few examples, which are located in the examples/ directory of the source package.

Other examples, typically using more than one library, can be found in the examples/ directory of this repository.

The examples are Lua scripts that can be executed with the standard Lua interpreter.

Running the examples

On GNU/Linux, the examples can be executed from the command line. To run, say, the fltk/valuators.lua example, assuming the MoonFLTK source package is located in /home/ste/moonfltk:

$ cd /home/ste/moonfltk/examples/fltk
fltk$ lua valuators.lua

On Windows, the examples can be executed either in a MinGW shell or from a Windows command prompt.

Let's assume the MoonFLTK source package is located in /home/ste/moonfltk under MSYS2, which corresponds to the C:\msys32\home\ste\moonfltk folder under Windows.

To run, say, the fltk/valuators.lua example in a MinGW shell:

$ cd /home/ste/moonfltk/examples/fltk
fltk$ lua valuators.lua

To run the same example from a Windows command prompt:

C:\> cd \msys32\home\ste\moonfltk\examples\fltk
C:\msys32\home\ste\moonfltk\examples\fltk> lua valuators.lua

Tweaks

Lua version

All libraries currently assume Lua 5.3. It is possible to compile/install/uninstall for a different Lua version using the LUAVER variable. For example, to compile and install for Lua 5.4:

moonfltk$ make LUAVER=5.4
moonfltk$ make LUAVER=5.4 install # or: $ sudo make LUAVER=5.4 install

Install location

By default, the libraries are installed under the /usr/local/ directory hierarchy. This is a fairly standard install directory and it is recommended since the Lua interpreter usually has no problem in locating modules when installed here.

It is possible to install the libraries in a different location by overriding the PREFIX variable (whose default value is /usr/local) and letting Lua know at run time where to find them, by adding the path $PREFIX/share/lua/$LUAVER/?.lua to LUA_PATH and the path $PREFIX/lib/lua/$LUAVER/?.so to LUA_CPATH.

For example, to install MoonFLTK under /tmp/myloc:

moonfltk$ make
moonfltk$ make PREFIX=/tmp/myloc install

(Note that this will create the directory tree structure, if not already existing.)

Then set the Lua paths accordingly before running the applications, e.g.:

moonfltk$ LUA_PATH=/tmp/myloc/share/lua/5.3/?.lua
moonfltk$ LUA_CPATH=/tmp/myloc/lib/lua/5.3/?.so
moonfltk$ cd examples/fltk
fltk$ lua valuators.lua

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].