Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shaders using GLSL not Cg/HLSL #26

Merged
merged 105 commits into from
Sep 8, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
105 commits
Select commit Hold shift + click to select a range
0732b62
ditching Cg, sort of hooking up GL shaders
revmischa Oct 1, 2017
d7a3960
Merge branch 'master' into glsl
revmischa Oct 1, 2017
f6e12f7
run in fullscreen
revmischa Oct 1, 2017
f6d1caf
renderer xcode project
revmischa Oct 1, 2017
4937b94
merge master
revmischa Mar 11, 2018
78058b9
Merge branch 'master' into glsl
revmischa May 27, 2018
43455b8
files I did not mean to commit
revmischa May 27, 2018
49335d3
remove this
revmischa May 27, 2018
140d133
files I did not mean to commit
revmischa May 27, 2018
f094898
files I did not mean to commit
revmischa May 27, 2018
c41007b
not quite working HLSL->GLSL translation... has some issues
revmischa May 27, 2018
d2cc75b
WIP
revmischa Jun 2, 2018
c30c6f6
start of GL3/GLES modernization
revmischa Jun 2, 2018
3c1306e
(basic) shaders compiling
revmischa Jun 2, 2018
37af98c
cleanup
revmischa Jun 2, 2018
02e29f5
lot more modernization work I have no idea if it's correct lol
revmischa Jun 2, 2018
453b9e9
WIP I don't know what I'm doing lol help
revmischa Jun 3, 2018
8cec20d
Merge branch 'master' into gl-modernize
revmischa Jun 3, 2018
761e93b
render/shader context
revmischa Jun 7, 2018
3511da0
Merging GLES3 changes in
revmischa Jun 10, 2018
5e5a43b
makefile indentation
revmischa Jun 10, 2018
3bdc61a
restoring
revmischa Jun 10, 2018
6cb0123
cleanups
revmischa Jun 10, 2018
dacf758
checkpoint
revmischa Jun 10, 2018
3cad9c3
WIP preset shader loading
revmischa Jun 10, 2018
36babd1
cleanup
revmischa Jun 10, 2018
c4c45b5
cleanup
revmischa Jun 10, 2018
0916ebe
Merge branch 'gl-modernize' into glsl
revmischa Jun 10, 2018
f163579
WIP
revmischa Jun 10, 2018
bbc9bd5
WIP: making preset shader program
revmischa Jun 10, 2018
6055a00
Fix build errors
deltaoscarmike Jun 10, 2018
e9cfc89
Fix build errors (again)
deltaoscarmike Jun 10, 2018
b6f5483
Merge branch 'glsl' of github.com:projectM-visualizer/projectm into glsl
revmischa Jun 10, 2018
42c583b
load warp and comp shaders from preset into programs
revmischa Jun 11, 2018
b0b22ac
sort of progress w/ comp/warp shader programs
revmischa Jun 12, 2018
0c9a8d3
WIP: several fixes
deltaoscarmike Jun 12, 2018
ba4adec
WIP: shader code update (extract from milkdrop sources)
deltaoscarmike Jun 12, 2018
00857ed
Merge branch 'glsl' of github.com:projectM-visualizer/projectm into glsl
revmischa Jun 14, 2018
e4b1bba
removing cg shaders from makefile
revmischa Jun 14, 2018
3b1ef08
load from correct presets dir
revmischa Jun 17, 2018
e4759a5
this doesn't belong in this branch
revmischa Jun 17, 2018
aa9ed34
this doesn't belong in this branch
revmischa Jun 17, 2018
f17e1bd
this doesn't belong in this branch
revmischa Jun 17, 2018
1edac3e
this doesn't belong in this branch
revmischa Jun 17, 2018
ba97dfc
FTGL/Cg flags gone
revmischa Jun 17, 2018
90324a9
this doesn't belong in this branch
revmischa Jun 17, 2018
af2e10b
this doesn't belong in this branch
revmischa Jun 17, 2018
aeb3f45
this doesn't belong in this branch
revmischa Jun 17, 2018
78702be
merge master
revmischa Jun 17, 2018
c925d09
add libprojectM xcode project
revmischa Jun 17, 2018
cc60a7a
WIP: now some presets shaders are compiled
deltaoscarmike Jun 22, 2018
3ed82ca
Disabling PerPixelMath_sse (issue #84)
deltaoscarmike Jul 18, 2018
d9d3ba8
Removing Cg leftovers
deltaoscarmike Jul 18, 2018
56830d8
Add testing switches:
deltaoscarmike Jul 18, 2018
542900a
Texture manager rewrite to add sampler support (used by shaders)
deltaoscarmike Jul 22, 2018
99dccdf
Blur shaders ported to GLSL
deltaoscarmike Jul 23, 2018
b0d11fa
Fix travis building
deltaoscarmike Jul 23, 2018
15cf62b
bleh
revmischa Jul 23, 2018
201a92f
Merge branch 'glsl' of github.com:projectM-visualizer/projectm into glsl
revmischa Jul 23, 2018
92f3fb4
some cleanups. fixed dylib loader path for SDL2 so we can bundle it t…
revmischa Jul 23, 2018
ae242a5
Fix border issue
deltaoscarmike Jul 23, 2018
185aadc
GL_LUMINANCE is deprecated, replacement by GL_RGB
deltaoscarmike Jul 23, 2018
a6484e0
Revert commit ae242a5
deltaoscarmike Jul 25, 2018
990c99d
- Fix for travis
deltaoscarmike Jul 25, 2018
4a44902
Fix for travis
deltaoscarmike Jul 25, 2018
5612dcb
Re-enabling PerPixelMath_sse (issue #84)
deltaoscarmike Jul 25, 2018
5ea4dc4
read FPS from config file for SDL version
revmischa Jul 25, 2018
dbc923b
Merge branch 'glsl' of github.com:projectM-visualizer/projectm into glsl
revmischa Jul 25, 2018
d8682ff
some emscripten support returns
revmischa Jul 27, 2018
3d4fe80
readme
revmischa Jul 28, 2018
23cd9c5
GLES and SSE2 fix stuff
revmischa Jul 28, 2018
f8287d9
Fix borders issue
deltaoscarmike Jul 28, 2018
8717520
Downgrade glsl required version to 3.3 supported by OGL 3.3.
deltaoscarmike Jul 28, 2018
2002f93
Merge branch 'master' into glsl
deltaoscarmike Jul 28, 2018
cc85248
bundle SDL for osx WIP
revmischa Jul 31, 2018
856b72c
fix makefile and add more context to readme
axe312ger Aug 1, 2018
71d5d9e
fixup! fix makefile and add more context to readme
axe312ger Aug 1, 2018
647048f
fixup! fixup! fix makefile and add more context to readme
axe312ger Aug 1, 2018
74dcbfa
Merge pull request #91 from axe312ger/glsl-emscripten
revmischa Aug 1, 2018
06466ac
merge
revmischa Aug 1, 2018
6cdc69c
makefile stuff for emscripten
revmischa Aug 1, 2018
2f516da
readme
revmischa Aug 1, 2018
ebba599
dumb (me)
revmischa Aug 1, 2018
8ab1f87
output installer package and app bundle on osx
revmischa Aug 1, 2018
6941c48
osx packaging w/ xcode
revmischa Aug 1, 2018
f2d5187
some fixes for itunes plugin support. still doesn't really work
revmischa Aug 4, 2018
019f00f
itunes plugin works again
revmischa Aug 4, 2018
35f3335
use bundled presets, skip config file. make self-contained
revmischa Aug 4, 2018
ce836b2
shaders fixes
deltaoscarmike Aug 21, 2018
0c62095
Add a fast preset switching test flag to check for shader compilation…
deltaoscarmike Aug 21, 2018
7a683cf
Remove useless files
deltaoscarmike Aug 21, 2018
4d16f3f
Fix composite rendering glitches
deltaoscarmike Aug 21, 2018
6157c58
Fixing HLSLTranslator:
deltaoscarmike Aug 21, 2018
85bb5f9
Several HLSLTranslator fixes
deltaoscarmike Aug 21, 2018
7d2e16b
Complete HLSLTranslator matrix support
deltaoscarmike Aug 21, 2018
c0ff137
Fix texture management
deltaoscarmike Aug 22, 2018
e6f1464
Small fixes
deltaoscarmike Aug 22, 2018
92ce639
Fix native presets
deltaoscarmike Aug 22, 2018
93059b1
Merge branch 'glsl' of github.com:projectM-visualizer/projectm into glsl
revmischa Aug 22, 2018
00e93e6
fixing itunes stuff a little
revmischa Aug 22, 2018
4b02c8d
Merge branch 'master' into glsl
deltaoscarmike Aug 23, 2018
8785481
Fix unlock FPS flag
deltaoscarmike Aug 25, 2018
46f4bc3
Merge branch 'glsl' of github.com:projectM-visualizer/projectm into glsl
revmischa Aug 26, 2018
bbc88de
How2build
revmischa Sep 2, 2018
aed5350
removing incredibly outdated FAQ
revmischa Sep 2, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ src/libprojectM/config.inp
src/libprojectM/config.inp.b
src/libprojectM/config.inp.in
src/projectM-emscripten/build/presets
src/libprojectM/libprojectM.xcodeproj
src/libprojectM/libprojectM.xcodeproj/xcshareddata
presets/custom
project.xcworkspace
*.o
Expand Down Expand Up @@ -36,3 +36,5 @@ m4/ltoptions.m4
m4/ltsugar.m4
m4/ltversion.m4
m4/lt~obsolete.m4
/t
/src/libprojectM/libprojectM.pc
7 changes: 2 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ script:
- test -e src/projectM-sdl/projectMSDL
- test -e src/libprojectM/libprojectM.la
- test -e dist_install/share/projectM/fonts/Vera.ttf
- test -e dist_install/share/projectM/shaders/blur.cg
- test -d dist_install/share/projectM/presets
- test -e dist_install/lib/libprojectM.la
- test -e dist_install/include/libprojectM/projectM.hpp
Expand All @@ -34,9 +33,8 @@ matrix:
- libsdl2-dev
- libglew-dev
- libftgl-dev
- libsdl2-dev
- libdevil-dev
- libglm-dev
- libc++-dev
env:
- MATRIX_EVAL="CC=clang-5.0 && CXX=clang++-5.0"
# linux/gcc
Expand All @@ -50,9 +48,8 @@ matrix:
- libsdl2-dev
- libglew-dev
- libftgl-dev
- libsdl2-dev
- libdevil-dev
- libglm-dev
- libc++-dev
env:
- MATRIX_EVAL="CC=gcc-7 && CXX=g++-7"

Expand Down
33 changes: 33 additions & 0 deletions BUILDING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# How to build projectM from scratch

There are autoconf and automake files for projectM. It is suggested to read configure.ac and the assorted Makefile.am files.


## libprojectM

libprojectM is the core library. It is made up of three sub-libraries:

#### Renderer
Made up of everything in src/libprojectM/Renderer. It should project libRenderer

#### MilkdropPresetFactory / NativePresetFactory
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.

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).



### Dependencies

* libglm for matrix math is required, just the headers though. We are considering "vendoring" them.
* A modified version of hlslparser is included in Renderer and used to transpile HLSL shaders to GLSL
* OpenGL 3+ or OpenGLES is required
* libftgl was used for drawing text. It is optional and may or may not be dropped
* libglew was used. not sure if it's still used.
* 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.


#### Assets
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.

You will want to install the config file and presets somewhere, and then define that path for the application you're trying to build.
120 changes: 0 additions & 120 deletions FAQ.txt

This file was deleted.

5 changes: 1 addition & 4 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,17 @@ ACLOCAL_AMFLAGS = -I m4
AM_CPPFLAGS=-DDATADIR_PATH='"${pkgdatadir}"'
SUBDIRS=src
PRESETSDIR = presets
EXTRA_DIST=README.md AUTHORS.txt presets fonts src/libprojectM/Renderer/blur.cg src/libprojectM/Renderer/projectM.cg $(PRESETSDIR)
EXTRA_DIST=README.md AUTHORS.txt presets fonts $(PRESETSDIR)
CLEANFILES=

# aka /usr/local/share/projectM
pm_data_dir = $(pkgdatadir)
pm_font_dir = $(pm_data_dir)/fonts
pm_presets_dir = $(pm_data_dir)/presets
pm_shaders_dir = $(pm_data_dir)/shaders

# files to install
pm_data__DATA = src/libprojectM/config.inp
pm_font__DATA = fonts/Vera.ttf fonts/VeraMono.ttf
pm_shaders__DATA = src/libprojectM/Renderer/blur.cg \
src/libprojectM/Renderer/projectM.cg

# find and install all preset files
install-data-local:
Expand Down
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ projectM is an open-source project that reimplements the esteemed [Winamp Milkdr
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.

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

### Project Status
You can read more about how it works and the current state of development [here](https://lwn.net/Articles/750152/).
Expand Down Expand Up @@ -74,19 +75,19 @@ Silverjuke (FOSS Jukebox)
# Using the library
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.

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

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

***

# Todo
* 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).
* [macOS Sierra broke the iTunes plugin somehow](https://github.com/projectM-visualizer/projectm/issues/7) (this is semi-fixed)
* 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)
* Make it build on windows again. There is support, it just needs updating.
* Support for the missing Milkdrop waveforms to get full compatibility with Milkdrop presets.
* Steal cool stuff from the recently-released Milkdrop source.
* Update the [various applications using libprojectM](src).
* Finish emscripten support for building to wasm/webGL for the web.
* Update the [various implementations using libprojectM](src).
* Update downstream projects with new versions.

***

Expand Down
Loading