Skip to content

Commit 6240b9d

Browse files
authored
Merge pull request #26 from projectM-visualizer/glsl
Re-enable shaders on modern platforms by transpiling HLSL to GLSL on the fly. Better GLES support. Running successfully on embedded systems with GLES and shaders. Compiles and almost runs with emscripten now (#92). Mega props 👏 => @deltaoscarmike <= 👏
2 parents 8f442c5 + aed5350 commit 6240b9d

File tree

101 files changed

+6836
-9414
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+6836
-9414
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ src/libprojectM/config.inp
44
src/libprojectM/config.inp.b
55
src/libprojectM/config.inp.in
66
src/projectM-emscripten/build/presets
7-
src/libprojectM/libprojectM.xcodeproj
7+
src/libprojectM/libprojectM.xcodeproj/xcshareddata
88
presets/custom
99
project.xcworkspace
1010
*.o
@@ -36,3 +36,5 @@ m4/ltoptions.m4
3636
m4/ltsugar.m4
3737
m4/ltversion.m4
3838
m4/lt~obsolete.m4
39+
/t
40+
/src/libprojectM/libprojectM.pc

.travis.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ script:
1313
- test -e src/projectM-sdl/projectMSDL
1414
- test -e src/libprojectM/libprojectM.la
1515
- test -e dist_install/share/projectM/fonts/Vera.ttf
16-
- test -e dist_install/share/projectM/shaders/blur.cg
1716
- test -d dist_install/share/projectM/presets
1817
- test -e dist_install/lib/libprojectM.la
1918
- test -e dist_install/include/libprojectM/projectM.hpp
@@ -34,9 +33,8 @@ matrix:
3433
- libsdl2-dev
3534
- libglew-dev
3635
- libftgl-dev
37-
- libsdl2-dev
38-
- libdevil-dev
3936
- libglm-dev
37+
- libc++-dev
4038
env:
4139
- MATRIX_EVAL="CC=clang-5.0 && CXX=clang++-5.0"
4240
# linux/gcc
@@ -50,9 +48,8 @@ matrix:
5048
- libsdl2-dev
5149
- libglew-dev
5250
- libftgl-dev
53-
- libsdl2-dev
54-
- libdevil-dev
5551
- libglm-dev
52+
- libc++-dev
5653
env:
5754
- MATRIX_EVAL="CC=gcc-7 && CXX=g++-7"
5855

BUILDING.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# How to build projectM from scratch
2+
3+
There are autoconf and automake files for projectM. It is suggested to read configure.ac and the assorted Makefile.am files.
4+
5+
6+
## libprojectM
7+
8+
libprojectM is the core library. It is made up of three sub-libraries:
9+
10+
#### Renderer
11+
Made up of everything in src/libprojectM/Renderer. It should project libRenderer
12+
13+
#### MilkdropPresetFactory / NativePresetFactory
14+
From their respective folders. Native presets are visualizations that are implemented in C++ instead of .milk preset files. They are completely optional. Milkdrop presets are technically optional but the whole thing is basically useless without them.
15+
16+
If you don't want native presets, and you probably don't, don't bother with them. Ideally there should be a configure option to disable them, probably on by default (at this time this is needed for autoconf: https://github.com/projectM-visualizer/projectm/issues/99).
17+
18+
19+
20+
### Dependencies
21+
22+
* libglm for matrix math is required, just the headers though. We are considering "vendoring" them.
23+
* A modified version of hlslparser is included in Renderer and used to transpile HLSL shaders to GLSL
24+
* OpenGL 3+ or OpenGLES is required
25+
* libftgl was used for drawing text. It is optional and may or may not be dropped
26+
* libglew was used. not sure if it's still used.
27+
* libsdl >= 2.0.5 is required for the SDL and emscripten apps. src/projectM-sdl is the current reference application implementation. maybe try getting that to build and run as your testbench.
28+
29+
30+
#### Assets
31+
libprojectM can either have a configuration hard-coded or load from a configuration file. It's up to each application to decide how to load the config file. The config file can have paths defined specifying where to load fonts and presets from.
32+
33+
You will want to install the config file and presets somewhere, and then define that path for the application you're trying to build.

FAQ.txt

Lines changed: 0 additions & 120 deletions
This file was deleted.

Makefile.am

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,17 @@ ACLOCAL_AMFLAGS = -I m4
22
AM_CPPFLAGS=-DDATADIR_PATH='"${pkgdatadir}"'
33
SUBDIRS=src
44
PRESETSDIR = presets
5-
EXTRA_DIST=README.md AUTHORS.txt presets fonts src/libprojectM/Renderer/blur.cg src/libprojectM/Renderer/projectM.cg $(PRESETSDIR)
5+
EXTRA_DIST=README.md AUTHORS.txt presets fonts $(PRESETSDIR)
66
CLEANFILES=
77

88
# aka /usr/local/share/projectM
99
pm_data_dir = $(pkgdatadir)
1010
pm_font_dir = $(pm_data_dir)/fonts
1111
pm_presets_dir = $(pm_data_dir)/presets
12-
pm_shaders_dir = $(pm_data_dir)/shaders
1312

1413
# files to install
1514
pm_data__DATA = src/libprojectM/config.inp
1615
pm_font__DATA = fonts/Vera.ttf fonts/VeraMono.ttf
17-
pm_shaders__DATA = src/libprojectM/Renderer/blur.cg \
18-
src/libprojectM/Renderer/projectM.cg
1916

2017
# find and install all preset files
2118
install-data-local:

README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,13 @@ projectM is an open-source project that reimplements the esteemed [Winamp Milkdr
88
Its purpose in life is to read in audio input and produce mesmerizing visuals, detecting tempo, and rendering advanced equations into a limitless array of user-contributed visualizations.
99

1010
### Available For
11-
* [Mac OS X, Linux (binary)](https://github.com/projectM-visualizer/projectm/releases/tag/v0.9.2-beta)
12-
* [Mac OS X iTunes (plugin)](https://github.com/projectM-visualizer/projectm/releases/tag/v0.9.1-beta)
11+
* [macOS, Linux (binary)](https://github.com/projectM-visualizer/projectm/releases/tag/v0.9.2-beta)
1312
* [Android](https://play.google.com/store/apps/details?id=com.psperl.projectM)
1413
* [iOS](https://itunes.apple.com/us/app/projectm-music-visualizer/id530922227?mt=8&ign-mpt=uo%3D4)
1514
* Qt5 + Pulseaudio
1615
* [ALSA, xmms, winamp, jack](https://sourceforge.net/projects/projectm/files/) (source, unmaintained)
16+
* [iTunes plugin (macOS)](https://github.com/projectM-visualizer/projectm/releases/tag/v0.9.1-beta)
17+
* Windows (in progress)
1718

1819
### Project Status
1920
You can read more about how it works and the current state of development [here](https://lwn.net/Articles/750152/).
@@ -74,19 +75,19 @@ Silverjuke (FOSS Jukebox)
7475
# Using the library
7576
At its core projectM is a library, [libprojectM](src/libprojectM). This library is responsible for parsing presets, analyzing audio PCM data with beat detection and FFT, applying the preset to the audio feature data and rendering the resulting output with openGL. It can render to an openGL context or a texture.
7677

77-
For an example of a very simple example use of the library see the [libSDL2 sample code](src/projectM-sdl/projectM_SDL_main.cpp).
78+
For an example of a simple example use of the library see the [libSDL2 sample code](src/projectM-sdl/projectM_SDL_main.cpp).
7879

7980
There are many other applications that make use of libprojectM that can be found in the [src](src/) directory.
8081

8182
***
8283

8384
# Todo
84-
* Top priority has for a long time been to [port the calls from OpenGL immediate-mode (old-school) to be compatible with OpenGL ES](https://github.com/projectM-visualizer/projectm/issues/11), using [vertex buffer objects](http://duriansoftware.com/joe/An-intro-to-modern-OpenGL.-Chapter-2.1:-Buffers-and-Textures.html). There's a [todo list of function calls to replace](https://github.com/projectM-visualizer/projectm/blob/gles/glES-porting.txt).
85-
* [macOS Sierra broke the iTunes plugin somehow](https://github.com/projectM-visualizer/projectm/issues/7) (this is semi-fixed)
86-
* Currently shader support is done via nVidia's Cg shader toolkit. This is ancient and no longer supported and very lame. [Use standard OpenGL facilities for compiling and executing the shader-based presets.](https://github.com/projectM-visualizer/projectm/pull/26)
85+
* Make it build on windows again. There is support, it just needs updating.
8786
* Support for the missing Milkdrop waveforms to get full compatibility with Milkdrop presets.
8887
* Steal cool stuff from the recently-released Milkdrop source.
89-
* Update the [various applications using libprojectM](src).
88+
* Finish emscripten support for building to wasm/webGL for the web.
89+
* Update the [various implementations using libprojectM](src).
90+
* Update downstream projects with new versions.
9091

9192
***
9293

0 commit comments

Comments
 (0)