Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/gustafla/mehustin

SDL2, stb_vorbis and rocket boilerplate in C and GNU make
https://github.com/gustafla/mehustin

demoscene gnu-rocket makefile sdl2 stb-vorbis

Last synced: 11 days ago
JSON representation

SDL2, stb_vorbis and rocket boilerplate in C and GNU make

Awesome Lists containing this project

README

        

# Deprecated in favor of [gustafla/linux_demo](https://github.com/gustafla/linux_demo)

## Mehustin is a system for building Linux demos using SDL2 and Rocket

This initializes an SDL2 window with OpenGL support, after which it
decodes music for playback using `stb_vorbis`.
Then it loads a libdemo.so -module (debug builds only), calls it's `scene_init`
function and starts calling `scene_render` in a loop. It also checks for
keyboard inputs and swaps the window.

Release builds don't (re)load the module dynamically.

## Dependencies

- GNU make
- pkg-config
- C99 compiler (clang and gcc tested)
- SDL2
- OpenGL (3.3 core by default)

For release builds of any kind:
- sstrip from elfkickers

For monolithic builds:
- xxd from vim
- shader_minifier.exe by Ctrl-Alt-Test

For experimental windows builds in addition to everything above:
- mingw-w64-gcc
- mingw-w64-make
- mingw-w64-pkg-config
- mingw-w64-sdl2
- mingw-w64-glew

## Build instructions

First time setup:
```
git submodule update --init
make libs
```

Debugging and editing:
```
make
```
Run with `MESA_DEBUG=1 ./debug/mehustin` and reload code with R key.

Release (separate files):
```
make DEBUG=0
make DEBUG=0 install
```
A release directory with source code will be built (directory `demo`)

Release (single executable):
```
make DEBUG=0 monolith
```
A release binary will be built (`release/demo`)

Release (Windows 64-bit, experimental):
```
./build_windows.sh
```
A release directory will be built (directory `demo`)