Coder Social home page Coder Social logo

shaderview's Introduction

screenshot 2015-07-28 18 41 49

Shaderview is an app for creating visuals using OpenGl Shaders and it uses OSC messages to communicate changes in state. For example when live coding music you could send an OSC message when the drum sample played and in turn your shader could do something with that signal, like flashing of white.

# We could do this in any language with osc support.
require 'osc-ruby'
@client ||= OSC::Client.new('localhost', 9177)

@client.send(OSC::Message.new("/shader-string", "
uniform float iKick;
void main(void){
  gl_FragColor = vec4(iKick,0.0,0.0, 1.0);
}"))

sample :drum_heavy_kick
@client.send(OSC::Message.new("/decaying-uniform", "iKick", 1.0, 0.01))

Since Shaderview does everything through OSC, there is no tie to a specific client language.

Shaderview has been already been used in performances with live coding languages like Sonic Pi and Overtone.

Install / Download

OS X latest snapshot https://github.com/josephwilk/shaderview/releases/download/v0.0.2/shaderview.zip

Download and Launch Shaderview.

### First simple Example

Shaderview launches with a default opengl shader.

uniform float iR;
uniform float iG;
uniform float iB;
void main(void){
  gl_FragColor = vec4(iR,iG,iB, 1.0);
}

For more about the shader language: https://www.opengl.org/documentation/glsl/: And for examples see: https://www.shadertoy.com/

From Ruby we change the colors of the visuals. We have a number of ways we can change uniforms, each one tries to make it easy for the client to control their light show.

require 'osc-ruby'
@client = OSC::Client.new('localhost', 9177)
@client.send(OSC::Message.new("/uniform" , "iR", 0.5))
@client.send(OSC::Message.new("/decaying-uniform" , "iG", 0.1))
@client.send(OSC::Message.new("/smoothed-uniform" , "iB", 0.0))

Shaderview Supported Messages

Shaderview opens an Osc Server listening on port 9177. The endpoints provided:

Message  <Argument> [Optional Argument]


* "/uniform" <UniformName> <FloatValue>
Set uniform to a float value


* "/smoothed-uniform" <UniformName> <FloatValue>
Move a uniform towards a float value (Fixed rate for now).
Execute multiple times to eventually get to FloatValue.


* "/decaying-uniform" <UniformName> <FloatValue> [FloatValue:decay-rate]
Like /uniform but the value will automatically decay to 0.
Decay rate defaults to 0.01 if not specified.

* "/growing-uniform" <UniformName> <FloatValue> [FloatValue:growth-rate]
Like /smoothed-uniform but the value will automatically grow from 0 to target
without having to call the endpoint again.
Growth rate defaults to 0.01 if not specified.

* "/curve-uniform" <UniformName> <FloatValue> [FloatValue:growth-rate] [FloatValue:decay-rate]
Will automatically grow to target value and then once reached will auto decay to 0.
Like growing-uniform & decaying-uniform combined.
Growth+decay rate defaults to 0.01 if not specified.
No fancy curves yet like Sin... todo

* "/shader" <StringValue:full-filename-path>
Load a file which contains an OpenGL shader. Once loaded the
file will be watched for changes and auto-reloaded


* "/shader-string" <StringValue:opengl-frag-shader>
Load a string as a OpenGL shader

* "/vertex <StringValue:full-filename-path> <StringValue:vertex-type> <IntValue:vertex-count>"
Experimental support for just working with vertex part of shaders.


* "/vertex-settings" <StringValue:type> <IntValue:count>
Supports changing parameters of the vertex phase without a pause for reloading.


* "/texture" <StringValue> <IntValue:ichannel-no>
Load an image file as a texture in your shader.
Texture is defined as iChannel1/2/3 based on IntValue.
Add `uniform sampler2D iChannel1` to your shader.
Comes packaged with some useful noise textures, just give the filename:
"tex10.png, tex11.png, tex15.png, tex16.png"
https://github.com/josephwilk/shaderview/tree/master/bin/data/textures/tex10.png
https://github.com/josephwilk/shaderview/tree/master/bin/data/textures/tex11.png
https://github.com/josephwilk/shaderview/tree/master/bin/data/textures/tex15.png
https://github.com/josephwilk/shaderview/tree/master/bin/data/textures/tex16.png

* "/volume" <FloatValue>
Sets iVolume in shader. Useful for say sending the
volume from something like Sonic Pi

The uniforms are updated and sent to running shader.

Ruby Client Example:
require 'osc-ruby'
@client = OSC::Client.new('localhost', 9177)
@client.send(OSC::Message.new("/shader" , "/Users/josephwilk/shaders/wave.glsl"))
Clojure Client example:
(use 'overtone.osc)
(def client (osc-client "localhost" 9177))

(osc-send client "/uniform" "iExample" (float 100.0))
(osc-send client "/shader" "/usr/josephwilk/repl_electric.glsl")

Shortcut keys

<cmd>+e     Show error log
<cmd>+a     Show active shader code
<cmd>+f     Full Screen
<ESC>       Quit
<tab>       With editor showing, change buffer
<cmd>+s     With editor showing, save buffer

OpenFramework Plugins

Dev Build instructions

Os X

Xcode.

Ubuntu (Extremely experimental)

Some notes from @mattrei on the process to get an install on Ubuntu:

  • ofxEditor: would not compile because in the src/ClipBoard.cpp the ClipBoard.h is spelled wrongly. Did a pull request already there. for now we have to fix it manually.

  • ofxOsc: dont use the addon which ships with oF 8.0.x; use that one which is suggested in the README.md of shaderview

  • ofxPostProcessing: the current master is not working with the latest oF 8.0.4: in src/PostProcessing.h in line 52 and 53 remove the 'const' so it machte oF function signatures

  • ofxFft: you need this library 'sudo apt-get install libfftw3-dev '; and then in shaderviews 'config.make' add 'USER_LDFLAGS = -lfftw3f'

Credits

Inspired by Roger Allen's Shadertone: https://github.com/overtone/shadertone

License

Copyright © 2015-present Joseph Wilk

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

For full license information, see the LICENSE file.

shaderview's People

Contributors

josephwilk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

digideskio

shaderview's Issues

Compilation error under debian jessie

Hi,

I'm having a go at compiling under debian jessie (crunchbang++), but get a rand of compiler errors. The first error relates to ofxPostProcessing, I tried removing the const from lines 52 and 53 as it says in the README, but that didn't fix it. here's the full output (after a make clean):

alex@olga:~/src/shaderview$ make
checking pkg-config libraries:   cairo zlib gstreamer-app-1.0 gstreamer-1.0 gstreamer-video-1.0 gstreamer-base-1.0 libudev freetype2 fontconfig sndfile openal openssl libpulse-simple alsa gl glu glew gtk+-3.0 
Compiling OF library for Release
make[1]: Entering directory '/home/alex/src/of/libs/openFrameworksCompiled/project'
checking pkg-config libraries:   cairo zlib gstreamer-app-1.0 gstreamer-1.0 gstreamer-video-1.0 gstreamer-base-1.0 libudev freetype2 fontconfig sndfile openal openssl libpulse-simple alsa gl glu glew gtk+-3.0 
checking pkg-config libraries:   cairo zlib gstreamer-app-1.0 gstreamer-1.0 gstreamer-video-1.0 gstreamer-base-1.0 libudev freetype2 fontconfig sndfile openal openssl libpulse-simple alsa gl glu glew gtk+-3.0 
make[2]: Nothing to be done for 'ReleaseABI'.
checking pkg-config libraries:   cairo zlib gstreamer-app-1.0 gstreamer-1.0 gstreamer-video-1.0 gstreamer-base-1.0 libudev freetype2 fontconfig sndfile openal openssl libpulse-simple alsa gl glu glew gtk+-3.0 
Done!
make[1]: Leaving directory '/home/alex/src/of/libs/openFrameworksCompiled/project'


Compiling shaderview for Release
make[1]: Entering directory '/home/alex/src/shaderview'
checking pkg-config libraries:   cairo zlib gstreamer-app-1.0 gstreamer-1.0 gstreamer-video-1.0 gstreamer-base-1.0 libudev freetype2 fontconfig sndfile openal openssl libpulse-simple alsa gl glu glew gtk+-3.0 
/home/alex/src/of/libs/openFrameworksCompiled/project/makefileCommon/config.project.mk:179: The following unknown addons will be ignored:
/home/alex/src/of/libs/openFrameworksCompiled/project/makefileCommon/config.project.mk:180: ofxBeat
Compiling src/ofApp.cpp
g++ -c -O3 -Wall -march=native -mtune=native -DOF_USING_GTK -I./src -I./shaderview.xcodeproj/xcuserdata -I./shaderview.xcodeproj/xcuserdata/josephwilk.xcuserdatad -I./shaderview.xcodeproj/xcuserdata/josephwilk.xcuserdatad/xcschemes -I./shaderview.xcodeproj/xcuserdata/josephwilk.xcuserdatad/xcdebugger -I./shaderview.xcodeproj/project.xcworkspace -I./shaderview.xcodeproj/project.xcworkspace/xcuserdata -I./shaderview.xcodeproj/project.xcworkspace/xcuserdata/josephwilk.xcuserdatad -I./shaderview.xcodeproj/project.xcworkspace/xcshareddata -I./shaderview.xcodeproj/xcshareddata -I./shaderview.xcodeproj/xcshareddata/xcschemes -I/home/alex/src/of/addons/ofxNetwork/src -I/home/alex/src/of/addons/ofxOsc/src -I/home/alex/src/of/addons/ofxOsc/libs -I/home/alex/src/of/addons/ofxOsc/libs/oscpack -I/home/alex/src/of/addons/ofxOsc/libs/oscpack/src -I/home/alex/src/of/addons/ofxOsc/libs/oscpack/src/ip -I/home/alex/src/of/addons/ofxOsc/libs/oscpack/src/ip/posix -I/home/alex/src/of/addons/ofxOsc/libs/oscpack/src/ip/win32 -I/home/alex/src/of/addons/ofxOsc/libs/oscpack/src/osc -I/home/alex/src/of/addons/ofxEditor/src -I/home/alex/src/of/addons/ofxIO/src -I/home/alex/src/of/addons/ofxIO/libs -I/home/alex/src/of/addons/ofxIO/libs/ofxIO -I/home/alex/src/of/addons/ofxIO/libs/ofxIO/src -I/home/alex/src/of/addons/ofxIO/libs/ofxIO/include -I/home/alex/src/of/addons/ofxIO/libs/ofxIO/include/ofx -I/home/alex/src/of/addons/ofxIO/libs/ofxIO/include/ofx/IO -I/home/alex/src/of/addons/ofxIO/libs/snappy -I/home/alex/src/of/addons/ofxIO/libs/snappy/src -I/home/alex/src/of/addons/ofxIO/libs/alphanum -I/home/alex/src/of/addons/ofxIO/libs/alphanum/include -I/home/alex/src/of/addons/ofxIO/libs/lz4 -I/home/alex/src/of/addons/ofxIO/libs/lz4/src -I/home/alex/src/of/addons/ofxIO/libs/alphanum/include -I/home/alex/src/of/addons/ofxIO/libs/ofxIO/include -I/home/alex/src/of/addons/ofxIO/libs/ofxIO/include/ofx -I/home/alex/src/of/addons/ofxIO/libs/ofxIO/include/ofx/IO -I/home/alex/src/of/addons/ofxPostProcessing/src -I/home/alex/src/of/addons/ofxGui/src -I/home/alex/src/of/addons/ofxFft/src -I/home/alex/src/of/addons/ofxFft/libs -I/home/alex/src/of/addons/ofxFft/libs/fftw -I/home/alex/src/of/addons/ofxFft/libs/fftw/include -I/home/alex/src/of/addons/ofxFft/libs/fftw/lib -I/home/alex/src/of/addons/ofxFft/libs/kiss -I/home/alex/src/of/addons/ofxFft/libs/fftw/include -D_REENTRANT -pthread -I/usr/include/gstreamer-1.0 -I/usr/include/AL -I/usr/include/alsa -I/usr/include/GL -I/usr/include/libdrm -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng12 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/home/alex/src/of/libs/fmodex/include -I/home/alex/src/of/libs/glfw/include -I/home/alex/src/of/libs/glfw/include/GLFW -I/home/alex/src/of/libs/kiss/include -I/home/alex/src/of/libs/openssl/include -I/home/alex/src/of/libs/openssl/include/openssl -I/home/alex/src/of/libs/poco/include -I/home/alex/src/of/libs/rtAudio/include -I/home/alex/src/of/libs/tess2/include -I/home/alex/src/of/libs/openFrameworks -I/home/alex/src/of/libs/openFrameworks/graphics -I/home/alex/src/of/libs/openFrameworks/sound -I/home/alex/src/of/libs/openFrameworks/app -I/home/alex/src/of/libs/openFrameworks/events -I/home/alex/src/of/libs/openFrameworks/types -I/home/alex/src/of/libs/openFrameworks/math -I/home/alex/src/of/libs/openFrameworks/communication -I/home/alex/src/of/libs/openFrameworks/video -I/home/alex/src/of/libs/openFrameworks/3d -I/home/alex/src/of/libs/openFrameworks/gl -I/home/alex/src/of/libs/openFrameworks/utils  -MMD -MP -MF obj/linux64/Release/src/ofApp.d -MT obj/linux64/Release/src/ofApp.o -o obj/linux64/Release/src/ofApp.o -c src/ofApp.cpp
In file included from src/ofApp.cpp:1:0:
src/ofApp.h:27:23: error: cannot declare field ‘ofApp::post’ to be of abstract type ‘itg::PostProcessing’
     ofxPostProcessing post;
                       ^
In file included from /home/alex/src/of/addons/ofxPostProcessing/src/ofxPostProcessing.h:43:0,
                 from src/ofApp.h:9,
                 from src/ofApp.cpp:1:
/home/alex/src/of/addons/ofxPostProcessing/src/PostProcessing.h:39:11: note:   because the following virtual functions are pure within ‘itg::PostProcessing’:
     class PostProcessing : public ofBaseDraws
           ^
In file included from /home/alex/src/of/libs/openFrameworks/ofMain.h:15:0,
                 from src/ofApp.h:3,
                 from src/ofApp.cpp:1:
/home/alex/src/of/libs/openFrameworks/types/ofBaseTypes.h:47:15: note:  virtual void ofBaseDraws::draw(float, float)
  virtual void draw(float x, float y)=0;
               ^
/home/alex/src/of/libs/openFrameworks/types/ofBaseTypes.h:48:15: note:  virtual void ofBaseDraws::draw(float, float, float, float)
  virtual void draw(float x, float y, float w, float h)=0;
               ^
src/ofApp.cpp: In member function ‘virtual void ofApp::update()’:
src/ofApp.cpp:88:9: warning: ‘auto’ changes meaning in C++11; please remove it [-Wc++0x-compat]
     for(auto const &it1 : uniforms) {
         ^
src/ofApp.cpp:88:21: error: ISO C++ forbids declaration of ‘it1’ with no type [-fpermissive]
     for(auto const &it1 : uniforms) {
                     ^
src/ofApp.cpp:88:27: error: range-based ‘for’ loops are not allowed in C++98 mode
     for(auto const &it1 : uniforms) {
                           ^
src/ofApp.cpp:89:68: error: request for member ‘first’ in ‘it1’, which is of non-class type ‘const int’
         map<string,float>::iterator it  = growingUniforms.find(it1.first);
                                                                    ^
src/ofApp.cpp:90:68: error: request for member ‘first’ in ‘it1’, which is of non-class type ‘const int’
         map<string,float>::iterator itD = tickingUniforms.find(it1.first);
                                                                    ^
src/ofApp.cpp:93:38: error: request for member ‘first’ in ‘it1’, which is of non-class type ‘const int’
                 if(fabs(uniforms[it1.first]) < growingUniforms[it1.first]){
                                      ^
src/ofApp.cpp:93:68: error: request for member ‘first’ in ‘it1’, which is of non-class type ‘const int’
                 if(fabs(uniforms[it1.first]) < growingUniforms[it1.first]){
                                                                    ^
src/ofApp.cpp:94:34: error: request for member ‘first’ in ‘it1’, which is of non-class type ‘const int’
                     uniforms[it1.first] += growthRate[it1.first];
                                  ^
src/ofApp.cpp:94:59: error: request for member ‘first’ in ‘it1’, which is of non-class type ‘const int’
                     uniforms[it1.first] += growthRate[it1.first];
                                                           ^
src/ofApp.cpp:97:41: error: request for member ‘first’ in ‘it1’, which is of non-class type ‘const int’
                     tickingUniforms[it1.first] = uniforms[it1.first];
                                         ^
src/ofApp.cpp:97:63: error: request for member ‘first’ in ‘it1’, which is of non-class type ‘const int’
                     tickingUniforms[it1.first] = uniforms[it1.first];
                                                               ^
src/ofApp.cpp:98:47: error: request for member ‘first’ in ‘it1’, which is of non-class type ‘const int’
                     growingUniforms.erase(it1.first);
                                               ^
src/ofApp.cpp:99:42: error: request for member ‘first’ in ‘it1’, which is of non-class type ‘const int’
                     growthRate.erase(it1.first);
                                          ^
src/ofApp.cpp:105:9: warning: ‘auto’ changes meaning in C++11; please remove it [-Wc++0x-compat]
     for(auto const &it1 : uniforms) {
         ^
src/ofApp.cpp:105:21: error: ISO C++ forbids declaration of ‘it1’ with no type [-fpermissive]
     for(auto const &it1 : uniforms) {
                     ^
src/ofApp.cpp:105:27: error: range-based ‘for’ loops are not allowed in C++98 mode
     for(auto const &it1 : uniforms) {
                           ^
src/ofApp.cpp:106:67: error: request for member ‘first’ in ‘it1’, which is of non-class type ‘const int’
         map<string,float>::iterator it = tickingUniforms.find(it1.first);
                                                                   ^
src/ofApp.cpp:107:69: error: request for member ‘first’ in ‘it1’, which is of non-class type ‘const int’
         map<string,float>::iterator itD  = growingUniforms.find(it1.first);
                                                                     ^
src/ofApp.cpp:110:38: error: request for member ‘first’ in ‘it1’, which is of non-class type ‘const int’
                 if(fabs(uniforms[it1.first]) > 0.001){
                                      ^
src/ofApp.cpp:111:34: error: request for member ‘first’ in ‘it1’, which is of non-class type ‘const int’
                     uniforms[it1.first] -= decayRate[it1.first];
                                  ^
src/ofApp.cpp:111:58: error: request for member ‘first’ in ‘it1’, which is of non-class type ‘const int’
                     uniforms[it1.first] -= decayRate[it1.first];
                                                          ^
src/ofApp.cpp:114:47: error: request for member ‘first’ in ‘it1’, which is of non-class type ‘const int’
                     tickingUniforms.erase(it1.first);
                                               ^
src/ofApp.cpp:115:41: error: request for member ‘first’ in ‘it1’, which is of non-class type ‘const int’
                     decayRate.erase(it1.first);
                                         ^
src/ofApp.cpp: In member function ‘virtual void ofApp::draw()’:
src/ofApp.cpp:169:9: warning: ‘auto’ changes meaning in C++11; please remove it [-Wc++0x-compat]
     for(auto const &it1 : uniforms) {
         ^
src/ofApp.cpp:169:21: error: ISO C++ forbids declaration of ‘it1’ with no type [-fpermissive]
     for(auto const &it1 : uniforms) {
                     ^
src/ofApp.cpp:169:27: error: range-based ‘for’ loops are not allowed in C++98 mode
     for(auto const &it1 : uniforms) {
                           ^
src/ofApp.cpp:170:33: error: request for member ‘first’ in ‘it1’, which is of non-class type ‘const int’
         shader.setUniform1f(it1.first, uniforms[it1.first]);
                                 ^
src/ofApp.cpp:170:53: error: request for member ‘first’ in ‘it1’, which is of non-class type ‘const int’
         shader.setUniform1f(it1.first, uniforms[it1.first]);
                                                     ^
src/ofApp.cpp: In member function ‘void ofApp::onMessageReceived(ofxOscMessage&)’:
src/ofApp.cpp:281:14: warning: unused variable ‘r’ [-Wunused-variable]
         bool r = shader.setupShaderFromSource(GL_FRAGMENT_SHADER, prepareShader(shaderString));
              ^
src/ofApp.cpp: In member function ‘std::string ofApp::loadFileShader(std::string)’:
src/ofApp.cpp:354:16: warning: converting ‘false’ to pointer type for argument 1 of ‘std::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT*, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’ [-Wconversion-null]
         return false;
                ^
src/ofApp.cpp: In member function ‘virtual void ofApp::keyPressed(int)’:
src/ofApp.cpp:397:10: warning: unused variable ‘alt’ [-Wunused-variable]
     bool alt   = (bool) (ofGetKeyPressed(OF_KEY_ALT));
          ^
src/ofApp.cpp:398:10: warning: unused variable ‘shift’ [-Wunused-variable]
     bool shift = (bool) (ofGetKeyPressed(OF_KEY_SHIFT));
          ^
src/ofApp.cpp:400:10: warning: unused variable ‘ctrl’ [-Wunused-variable]
     bool ctrl  = (bool) (ofGetKeyPressed(OF_KEY_CONTROL));
          ^
/home/alex/src/of/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk:191: recipe for target 'obj/linux64/Release/src/ofApp.o' failed
make[1]: *** [obj/linux64/Release/src/ofApp.o] Error 1
make[1]: Leaving directory '/home/alex/src/shaderview'
/home/alex/src/of/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk:126: recipe for target 'Release' failed
make: *** [Release] Error 2
alex@olga:~/src/shaderview$ 

Installation instructions (Linux)

Hi Joseph,

I tried to get shaderview running on my Ubuntu 14.04 machine. It was not easy though.
Here are the caveats I ran into (mostly its because of errors in the oF addons):

  • ofxEditor: would not compile because in the src/ClipBoard.cpp the ClipBoard.h is spelled wrongly. Did a pull request already there. for now we have to fix it manually.
  • ofxOsc: dont use the addon which ships with oF 8.0.x; use that one which is suggested in the README.md of shaderview
  • ofxPostProcessing: the current master is not working with the latest oF 8.0.4: in src/PostProcessing.h in line 52 and 53 remove the 'const' so it machte oF function signatures
  • ofxFft: you need this library 'sudo apt-get install libfftw3-dev '; and then in shaderviews 'config.make' add 'USER_LDFLAGS = -lfftw3f'

Compilation errors due to C++11

Hi Joseph,

I get the following compilation error below. Using g++ version 4.9. Tried to activate c++11 features however then the other addons won't compile.

Can you give some instructions with what flags you compile this plugin?

Thanks,
Matthias

src/ofApp.cpp:129:21: error: ISO C++ forbids declaration of ‘it1’ with no type [-fpermissive]
     for(auto const &it1 : uniforms) {
                     ^
src/ofApp.cpp:129:27: error: range-based ‘for’ loops are not allowed in C++98 mode
     for(auto const &it1 : uniforms) {
                           ^
src/ofApp.cpp:130:33: error: request for member ‘first’ in ‘it1’, which is of non-class typeconst int’
         shader.setUniform1f(it1.first, uniforms[it1.first]);
                                 ^
src/ofApp.cpp:130:53: error: request for member ‘first’ in ‘it1’, which is of non-class typeconst int’
         shader.setUniform1f(it1.first, uniforms[it1.first]);
                                                     ^

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.