[sc-dev] ScGraph - Fun with livecoding shaders

View: New views
20 Messages — Rating Filter:   Alert me  
< Prev | 1 - 2 - 3 - 4 | Next >

[sc-dev] ScGraph - Fun with livecoding shaders

by Florian Schmidt :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi list,

the last few days i hacked a little bit on shader support in ScGraph. It's a dirty hack and mainly just for fun. So, if you ever wanted to play around with vertex and fragment shaders, check this out [1] (beware wrong linebreaks)..

See [2] for a download link. Beware: If you want shader support you have to define HAVE_SHADERS=1 in the Makefile.include. If you want shaders and your GPU doesn't support them scgraph might crash..

I'm working on exposing uniforms, too, so that there is a way to pass data to the shader program from control rate units. Stay tuned.. :D

Regards,

Flo

[1]

n = NetAddr("localhost", 37291)

Server.default = s = Server.new("scgraph", n)

// no more initTree(). Group 1 is created automatically now

// create something that renders something and uses shader program 6

// which is not loaded yet..

{GGLRenderer.gr(GShaderProgram.gr(6,1) + GTranslate.gr(GCube.gr, [SinOsc.kr(1.21212121),SinOsc.kr(1,phase:1),0]))}.play

// create something that renders something and uses shader program 5,

// which is also not loaded yet..

{GGLRenderer.gr(GShaderProgram.gr(5,1) + GTranslate.gr(GCube.gr, [SinOsc.kr(1.21212121),SinOsc.kr(1,phase:1),0]))}.play

// clean up

(

n.sendMsg(

"/clearShaderPrograms"

);

)

// format is ["/loadShaderProgram", index, source1, isVertexShader1, source2, isVertexShader2, ...]

// the sources will get compiled and linked together into a

// shader program indexable by index. Shader programs are shared

// between al GLRenderers.

// set shader program 6. here we only define a fragment shader

(

n.sendMsg

(

"/loadShaderProgram",

6,

"

void main()

{

gl_FragColor = vec4(0.5 + 0.5 * sin(float(gl_FragCoord.x)/10.0),0.5 + 0.5 * sin(float(gl_FragCoord.y)/10.0),0.5 + 0.5 * sin(float(gl_FragCoord.y*gl_FragCoord.x)/100000.0),1.0);

}

",

0);

)

// set shader program 5. this one has a vertex and a fragment shader

(

n.sendMsg

(

"/loadShaderProgram",

5,

"

void main()

{

gl_FragColor = vec4(0.1,0.9,0.1,1.0);

}

",

0,

"

void main(void)

{

vec4 a = gl_Vertex;

a.x = a.x * 0.05 + a.y;

a.y = a.y * 1.5 + 0.2 * a.x;

a.z = a.z * 0.3;

gl_Position = gl_ModelViewProjectionMatrix * a;

}

",

1);

)

[2] http://tapas.affenbande.org/scgraph/scgraph-0.8.tgz

--

Palimm Palimm!

http://tapas.affenbande.org


Re: ScGraph - Fun with livecoding shaders

by Josh Parmenter :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Flo,

I was just building on OSX (got QT sorted out)... and have this error at the end:

--- Building object: main.cc => main.o
g++ -c main.cc -pedantic -Wall -Wno-long-long -ansi -Werror  -DPREFIX=\"/usr/local\" -DSC3_INCLUDE_PATH=\"/Users/joshp/src/supercollider//Headers/\" -I/usr/share/qt4/include -DQT_THREAD_SUPPORT -I/Users/joshp/src/supercollider//Headers//plugin_interface  -I/Users/joshp/src/supercollider//Headers//server -I/Users/joshp/src/supercollider//Headers//common `pkg-config sndfile GraphicsMagick++ --cflags`  -DSC3_PLUGIN_PATH=\"/Users/joshp/src/supercollider//build/plugins\" -I/usr/X11R6/include  -I/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/OpenGL.framework/Headers -DSC_DARWIN
cc1plus: warnings being treated as errors
cow_ptr.h:15: warning: ‘struct DeepCopyable’ has virtual functions but non-virtual destructor
face.h:14: warning: ‘struct Face’ has virtual functions but non-virtual destructor
make[1]: *** [main.o] Error 1
make: *** [server] Error 2
Ringo:scgraph-0.8 joshp$ 


any ideas?

Josh

On Jun 22, 2008, at 8:05 AM, Florian Schmidt wrote:


Hi list,


the last few days i hacked a little bit on shader support in ScGraph. It's a dirty hack and mainly just for fun. So, if you ever wanted to play around with vertex and fragment shaders, check this out [1] (beware wrong linebreaks)..


See [2] for a download link. Beware: If you want shader support you have to define HAVE_SHADERS=1 in the Makefile.include. If you want shaders and your GPU doesn't support them scgraph might crash..


I'm working on exposing uniforms, too, so that there is a way to pass data to the shader program from control rate units. Stay tuned.. :D


Regards,

Flo



[1]

n = NetAddr("localhost", 37291)

Server.default = s = Server.new("scgraph", n)


// no more initTree(). Group 1 is created automatically now


// create something that renders something and uses shader program 6

// which is not loaded yet..

{GGLRenderer.gr(GShaderProgram.gr(6,1) + GTranslate.gr(GCube.gr, [SinOsc.kr(1.21212121),SinOsc.kr(1,phase:1),0]))}.play


// create something that renders something and uses shader program 5,

// which is also not loaded yet..

{GGLRenderer.gr(GShaderProgram.gr(5,1) + GTranslate.gr(GCube.gr, [SinOsc.kr(1.21212121),SinOsc.kr(1,phase:1),0]))}.play



// clean up

(

n.sendMsg(

"/clearShaderPrograms"

);

)


// format is ["/loadShaderProgram", index, source1, isVertexShader1, source2, isVertexShader2, ...]

// the sources will get compiled and linked together into a

// shader program indexable by index. Shader programs are shared

// between al GLRenderers.


// set shader program 6. here we only define a fragment shader

(

n.sendMsg

(

"/loadShaderProgram",

6,

"

void main()

{

gl_FragColor = vec4(0.5 + 0.5 * sin(float(gl_FragCoord.x)/10.0),0.5 + 0.5 * sin(float(gl_FragCoord.y)/10.0),0.5 + 0.5 * sin(float(gl_FragCoord.y*gl_FragCoord.x)/100000.0),1.0);

}

",

0);

)



// set shader program 5. this one has a vertex and a fragment shader

(

n.sendMsg

(

"/loadShaderProgram",

5,

"

void main()

{

gl_FragColor = vec4(0.1,0.9,0.1,1.0);

}

",

0,

"

void main(void)

{

vec4 a = gl_Vertex;

a.x = a.x * 0.05 + a.y;

a.y = a.y * 1.5 + 0.2 * a.x;

a.z = a.z * 0.3;

gl_Position = gl_ModelViewProjectionMatrix * a;

}

",

1);

)



[2] http://tapas.affenbande.org/scgraph/scgraph-0.8.tgz



--

Palimm Palimm!

http://tapas.affenbande.org



******************************************

/* Joshua D. Parmenter

http://www.realizedsound.net/josh/


“Every composer – at all times and in all cases – gives his own interpretation of how modern society is structured: whether actively or passively, consciously or unconsciously, he makes choices in this regard. He may be conservative or he may subject himself to continual renewal; or he may strive for a revolutionary, historical or social palingenesis." - Luigi Nono

*/


Re: ScGraph - Fun with livecoding shaders

by krgn :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

hey josh,

try removing the -Werror in the COMPILE_FLAGS line in server/Makefile. Then it should work.


On Sun, Jun 22, 2008 at 10:58 AM, Josh Parmenter <josh@...> wrote:
Hi Flo,

I was just building on OSX (got QT sorted out)... and have this error at the end:

--- Building object: main.cc => main.o
g++ -c main.cc -pedantic -Wall -Wno-long-long -ansi -Werror  -DPREFIX=\"/usr/local\" -DSC3_INCLUDE_PATH=\"/Users/joshp/src/supercollider//Headers/\" -I/usr/share/qt4/include -DQT_THREAD_SUPPORT -I/Users/joshp/src/supercollider//Headers//plugin_interface  -I/Users/joshp/src/supercollider//Headers//server -I/Users/joshp/src/supercollider//Headers//common `pkg-config sndfile GraphicsMagick++ --cflags`  -DSC3_PLUGIN_PATH=\"/Users/joshp/src/supercollider//build/plugins\" -I/usr/X11R6/include  -I/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/OpenGL.framework/Headers -DSC_DARWIN
cc1plus: warnings being treated as errors
cow_ptr.h:15: warning: 'struct DeepCopyable' has virtual functions but non-virtual destructor
face.h:14: warning: 'struct Face' has virtual functions but non-virtual destructor
make[1]: *** [main.o] Error 1
make: *** [server] Error 2
Ringo:scgraph-0.8 joshp$ 


any ideas?

Josh

On Jun 22, 2008, at 8:05 AM, Florian Schmidt wrote:


Hi list,


the last few days i hacked a little bit on shader support in ScGraph. It's a dirty hack and mainly just for fun. So, if you ever wanted to play around with vertex and fragment shaders, check this out [1] (beware wrong linebreaks)..


See [2] for a download link. Beware: If you want shader support you have to define HAVE_SHADERS=1 in the Makefile.include. If you want shaders and your GPU doesn't support them scgraph might crash..


I'm working on exposing uniforms, too, so that there is a way to pass data to the shader program from control rate units. Stay tuned.. :D


Regards,

Flo



[1]

n = NetAddr("localhost", 37291)

Server.default = s = Server.new("scgraph", n)


// no more initTree(). Group 1 is created automatically now


// create something that renders something and uses shader program 6

// which is not loaded yet..

{GGLRenderer.gr(GShaderProgram.gr(6,1) + GTranslate.gr(GCube.gr, [SinOsc.kr(1.21212121),SinOsc.kr(1,phase:1),0]))}.play


// create something that renders something and uses shader program 5,

// which is also not loaded yet..

{GGLRenderer.gr(GShaderProgram.gr(5,1) + GTranslate.gr(GCube.gr, [SinOsc.kr(1.21212121),SinOsc.kr(1,phase:1),0]))}.play



// clean up

(

n.sendMsg(

"/clearShaderPrograms"

);

)


// format is ["/loadShaderProgram", index, source1, isVertexShader1, source2, isVertexShader2, ...]

// the sources will get compiled and linked together into a

// shader program indexable by index. Shader programs are shared

// between al GLRenderers.


// set shader program 6. here we only define a fragment shader

(

n.sendMsg

(

"/loadShaderProgram",

6,

"

void main()

{

gl_FragColor = vec4(0.5 + 0.5 * sin(float(gl_FragCoord.x)/10.0),0.5 + 0.5 * sin(float(gl_FragCoord.y)/10.0),0.5 + 0.5 * sin(float(gl_FragCoord.y*gl_FragCoord.x)/100000.0),1.0);

}

",

0);

)



// set shader program 5. this one has a vertex and a fragment shader

(

n.sendMsg

(

"/loadShaderProgram",

5,

"

void main()

{

gl_FragColor = vec4(0.1,0.9,0.1,1.0);

}

",

0,

"

void main(void)

{

vec4 a = gl_Vertex;

a.x = a.x * 0.05 + a.y;

a.y = a.y * 1.5 + 0.2 * a.x;

a.z = a.z * 0.3;

gl_Position = gl_ModelViewProjectionMatrix * a;

}

",

1);

)



[2] http://tapas.affenbande.org/scgraph/scgraph-0.8.tgz



--

Palimm Palimm!

http://tapas.affenbande.org



******************************************

/* Joshua D. Parmenter

http://www.realizedsound.net/josh/


"Every composer – at all times and in all cases – gives his own interpretation of how modern society is structured: whether actively or passively, consciously or unconsciously, he makes choices in this regard. He may be conservative or he may subject himself to continual renewal; or he may strive for a revolutionary, historical or social palingenesis." - Luigi Nono

*/



Re: ScGraph - Fun with livecoding shaders

by Florian Schmidt :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sunday 22 June 2008, krgn wrote:
> hey josh,
>
> try removing the -Werror in the COMPILE_FLAGS line in server/Makefile. Then
> it should work.

Hi, well that is certainly a way to get rid of these warnings. Of course it's
better to fix the classes. I have added virtual destructors to both of them.
Will be in next tarball. I guess though that normally these should not really
be critical.

Regards,
Flo

Index: server/face.h
===================================================================
--- server/face.h       (revision 564)
+++ server/face.h       (working copy)
@@ -56,6 +56,8 @@
        virtual Face *deepCopy() {
                return new Face(*this);
        }
+
+       virtual ~Face() { }
 };


Index: server/cow_ptr.h
===================================================================
--- server/cow_ptr.h    (revision 564)
+++ server/cow_ptr.h    (working copy)
@@ -14,6 +14,7 @@
 */
 struct DeepCopyable {
        virtual DeepCopyable *deepCopy() = 0;
+       ~DeepCopyable() { }
 };
 
 template<class T>


--
Palimm Palimm!
http://tapas.affenbande.org

_______________________________________________
sc-dev mailing list

sc-dev@...
archive: http://www.listarc.bham.ac.uk/lists/sc-dev/
search: http://www.listarc.bham.ac.uk/lists/sc-dev/search/

Re: ScGraph - Fun with livecoding shaders

by krgn :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

also, on my machine (debian lenny/sid) I had to add string.h to

server/plugin.h
server/plugin_pool.cc
server/jack_client.cc

finally I get this error though:

--- Building target: scgraph
g++ -o scgraph main.o cow_ptr.o transformation_command.o transformation_command_visitor.o graphics_visitor.o obj_loader.o loader_3d.o buffer_pool.o matrix.o node_tree.o synth.o node.o group.o options.o scgraph.o synthdef.o control_loop.o graphic_loop.o synthdef_file.o util.o synthdef_pool.o plugin_pool.o plugin.o unit.o osc_handler.o graphics.o tree.o in_out.o control.o graphics_bus.o material.o face.o color_rgba.o vector_3d.o hvector_3d.o vector_2d.o sc_unit_wrapper.o sc__unit.o texture_pool.o shader_pool.o jack_client.o graphic_loop_moc.o osc_handler_moc.o texture_pool_moc.o shader_pool_moc.o -lpthread  -loscpack -F/usr/share/qt4/lib -framework QtGui -framework QtCore -framework QtOpenGL -lm `pkg-config sndfile GraphicsMagick++ --cflags --libs` -lGLEW `pkg-config jack --libs fftw3f` -DHAVE_JACK -lrt -lm -Wl,--export-dynamic -L/usr//lib -lscsynth -lGLU
g++: QtGui: No such file or directory
g++: QtCore: No such file or directory
g++: QtOpenGL: No such file or directory
make[1]: *** [scgraph] Error 1
make[1]: Leaving directory `/home/karsten/dev/packages/scgraph/scgraph-0.8/server'
make: *** [server] Error 2


On Sun, Jun 22, 2008 at 11:22 AM, Florian Schmidt <mista.tapas@...> wrote:
On Sunday 22 June 2008, krgn wrote:
> hey josh,
>
> try removing the -Werror in the COMPILE_FLAGS line in server/Makefile. Then
> it should work.

Hi, well that is certainly a way to get rid of these warnings. Of course it's
better to fix the classes. I have added virtual destructors to both of them.
Will be in next tarball. I guess though that normally these should not really
be critical.

Regards,
Flo

Index: server/face.h
===================================================================
--- server/face.h       (revision 564)
+++ server/face.h       (working copy)
@@ -56,6 +56,8 @@
       virtual Face *deepCopy() {
               return new Face(*this);
       }
+
+       virtual ~Face() { }
 };


Index: server/cow_ptr.h
===================================================================
--- server/cow_ptr.h    (revision 564)
+++ server/cow_ptr.h    (working copy)
@@ -14,6 +14,7 @@
 */
 struct DeepCopyable {
       virtual DeepCopyable *deepCopy() = 0;
+       ~DeepCopyable() { }
 };

 template<class T>


--
_______________________________________________
sc-dev mailing list

sc-dev@...
archive: http://www.listarc.bham.ac.uk/lists/sc-dev/
search: http://www.listarc.bham.ac.uk/lists/sc-dev/search/


Re: ScGraph - Fun with livecoding shaders

by Florian Schmidt :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sunday 22 June 2008, krgn wrote:
> also, on my machine (debian lenny/sid) I had to add string.h to
>
> server/plugin.h
> server/plugin_pool.cc
> server/jack_client.cc

I guess <cstring> will do, too :) i have applied these changes to my local
tree..

> finally I get this error though:
>
> --- Building target: scgraph
> g++ -o scgraph main.o cow_ptr.o transformation_command.o
> transformation_command_visitor.o graphics_visitor.o obj_loader.o
> loader_3d.o buffer_pool.o matrix.o node_tree.o synth.o node.o group.o
> options.o scgraph.o synthdef.o control_loop.o graphic_loop.o
> synthdef_file.o util.o synthdef_pool.o plugin_pool.o plugin.o unit.o
> osc_handler.o graphics.o tree.o in_out.o control.o graphics_bus.o
> material.o face.o color_rgba.o vector_3d.o hvector_3d.o vector_2d.o
> sc_unit_wrapper.o sc__unit.o
> texture_pool.o shader_pool.o jack_client.o graphic_loop_moc.o
> osc_handler_moc.o texture_pool_moc.o shader_pool_moc.o -lpthread  -loscpack
> -F/usr/share/qt4/lib -framework QtGui -framework QtCore -framework QtOpenGL
> -lm `pkg-config sndfile GraphicsMagick++ --cflags --libs` -lGLEW
> `pkg-config jack --libs fftw3f` -DHAVE_JACK -lrt -lm -Wl,--export-dynamic
> -L/usr//lib -lscsynth -lGLU
> g++: QtGui: No such file or directory
> g++: QtCore: No such file or directory
> g++: QtOpenGL: No such file or directory

Weird. Why do you use -framework though when building on debian? Or if it is
on Mac OS X i guess you built Qt not as framework? Then of course my Makefile
is wrong. Try in server/Makefile: Change

ifeq ($(UNAME),Darwin)
  QT_LINK_FLAGS = -F$(QTDIR)/lib -framework QtGui -framework QtCore -framework
QtOpenGL
endif

To

ifeq ($(UNAME),Darwin)
  QT_LINK_FLAGS = -L$(QTDIR)/lib -lQtGui -lQtCore -lQtOpenGL
endif

I'm really not strong when it comes to Mac OS X though..

Regards,
Flo


--
Palimm Palimm!
http://tapas.affenbande.org

_______________________________________________
sc-dev mailing list

sc-dev@...
archive: http://www.listarc.bham.ac.uk/lists/sc-dev/
search: http://www.listarc.bham.ac.uk/lists/sc-dev/search/

Re: ScGraph - Fun with livecoding shaders

by krgn :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



On Sun, Jun 22, 2008 at 11:46 AM, Florian Schmidt <mista.tapas@...> wrote:
On Sunday 22 June 2008, krgn wrote:
> also, on my machine (debian lenny/sid) I had to add string.h to
>
> server/plugin.h
> server/plugin_pool.cc
> server/jack_client.cc

I guess <cstring> will do, too :) i have applied these changes to my local
tree..

ah ok, didn't know one could do that :)
 

> finally I get this error though:
>
> --- Building target: scgraph
> g++ -o scgraph main.o cow_ptr.o transformation_command.o
> transformation_command_visitor.o graphics_visitor.o obj_loader.o
> loader_3d.o buffer_pool.o matrix.o node_tree.o synth.o node.o group.o
> options.o scgraph.o synthdef.o control_loop.o graphic_loop.o
> synthdef_file.o util.o synthdef_pool.o plugin_pool.o plugin.o unit.o
> osc_handler.o graphics.o tree.o in_out.o control.o graphics_bus.o
> material.o face.o color_rgba.o vector_3d.o hvector_3d.o vector_2d.o
> sc_unit_wrapper.o sc__unit.o
> texture_pool.o shader_pool.o jack_client.o graphic_loop_moc.o
> osc_handler_moc.o texture_pool_moc.o shader_pool_moc.o -lpthread  -loscpack
> -F/usr/share/qt4/lib -framework QtGui -framework QtCore -framework QtOpenGL
> -lm `pkg-config sndfile GraphicsMagick++ --cflags --libs` -lGLEW
> `pkg-config jack --libs fftw3f` -DHAVE_JACK -lrt -lm -Wl,--export-dynamic
> -L/usr//lib -lscsynth -lGLU
> g++: QtGui: No such file or directory
> g++: QtCore: No such file or directory
> g++: QtOpenGL: No such file or directory

Weird. Why do you use -framework though when building on debian? Or if it is
on Mac OS X i guess you built Qt not as framework? Then of course my Makefile
is wrong. Try in server/Makefile: Change

I found it. stupid of me, I had that line in Makefile.include uncommented:

#QT_LINK_FLAGS = -F$(QTDIR)/lib -framework QtGui -framework QtCore -framework QtOpenGL

I wasn't sure whether to enable this one or not, so I did ;) maybe add a comment or two to make it clear :)

thanks though

karsten

Re: ScGraph - Fun with livecoding shaders

by krgn :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

seems to works now. I had to disable shaders though, is that something that the hardware needs to support in for it to work? also, I noticed that the jack client crashes:


ScGraph - (C) 2006, 2007, 2008
[Run scgraph -h for help]
[TexturePool]: Failed to traverse directory. Reason: [TexturePool]: Couldn't read directory
Machine Listening UGens by Nick Collins for SuperCollider 3
Tartini adapted from Phil McLeod's Tartini project
AutoTrack adapted from Matthew Davies' autocorrelation beat tracker
Qitch based on algorithms published by Judith Brown and Miller Puckette
initialising FFTW for common plans
done FFTW initialisation
 [Warning]: fDefineBufGen not supported
[Warning]: fDefinePlugInCmd not supported
[Warning]: fDefineBufGen not supported
[Warning]: fDefineBufGen not supported
[Warning]: fDefineBufGen not supported
[Warning]: fDefineBufGen not supported
[Warning]: fDefineBufGen not supported
[Warning]: fDefineBufGen not supported
[Warning]: fDefineBufGen not supported
[Warning]: fDefineBufGen not supported
jack_client_thread zombified - exiting from JACK
.

and the little icons in the patchbay appear as blue little speakers ;)


On Sun, Jun 22, 2008 at 11:59 AM, krgn <k.gebbert@...> wrote:


On Sun, Jun 22, 2008 at 11:46 AM, Florian Schmidt <mista.tapas@...> wrote:
On Sunday 22 June 2008, krgn wrote:
> also, on my machine (debian lenny/sid) I had to add string.h to
>
> server/plugin.h
> server/plugin_pool.cc
> server/jack_client.cc

I guess <cstring> will do, too :) i have applied these changes to my local
tree..

ah ok, didn't know one could do that :)
 

> finally I get this error though:
>
> --- Building target: scgraph
> g++ -o scgraph main.o cow_ptr.o transformation_command.o
> transformation_command_visitor.o graphics_visitor.o obj_loader.o
> loader_3d.o buffer_pool.o matrix.o node_tree.o synth.o node.o group.o
> options.o scgraph.o synthdef.o control_loop.o graphic_loop.o
> synthdef_file.o util.o synthdef_pool.o plugin_pool.o plugin.o unit.o
> osc_handler.o graphics.o tree.o in_out.o control.o graphics_bus.o
> material.o face.o color_rgba.o vector_3d.o hvector_3d.o vector_2d.o
> sc_unit_wrapper.o sc__unit.o
> texture_pool.o shader_pool.o jack_client.o graphic_loop_moc.o
> osc_handler_moc.o texture_pool_moc.o shader_pool_moc.o -lpthread  -loscpack
> -F/usr/share/qt4/lib -framework QtGui -framework QtCore -framework QtOpenGL
> -lm `pkg-config sndfile GraphicsMagick++ --cflags --libs` -lGLEW
> `pkg-config jack --libs fftw3f` -DHAVE_JACK -lrt -lm -Wl,--export-dynamic
> -L/usr//lib -lscsynth -lGLU
> g++: QtGui: No such file or directory
> g++: QtCore: No such file or directory
> g++: QtOpenGL: No such file or directory

Weird. Why do you use -framework though when building on debian? Or if it is
on Mac OS X i guess you built Qt not as framework? Then of course my Makefile
is wrong. Try in server/Makefile: Change

I found it. stupid of me, I had that line in Makefile.include uncommented:

#QT_LINK_FLAGS = -F$(QTDIR)/lib -framework QtGui -framework QtCore -framework QtOpenGL

I wasn't sure whether to enable this one or not, so I did ;) maybe add a comment or two to make it clear :)

thanks though

karsten


Re: ScGraph - Fun with livecoding shaders

by Florian Schmidt :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sunday 22 June 2008, krgn wrote:
> seems to works now. I had to disable shaders though, is that something that
> the hardware needs to support in for it to work?

Did you get compile time or runtime errors?

> also, I noticed that the
> jack client crashes:

I would suggest disabling the jack stuff for now.. I haven't looked at it in
quite a while.. simply take the HAVE_JACK=1 out of Makefile.include..

Will take a look at it after implementing uniform support for shaders [that
itches me more atm ;)]. Tomorrow or so..

> ScGraph - (C) 2006, 2007, 2008
> [Run scgraph -h for help]
> [TexturePool]: Failed to traverse directory. Reason: [TexturePool]:
> Couldn't read directory
> Machine Listening UGens by Nick Collins for SuperCollider 3
> Tartini adapted from Phil McLeod's Tartini project
> AutoTrack adapted from Matthew Davies' autocorrelation beat tracker
> Qitch based on algorithms published by Judith Brown and Miller Puckette
> initialising FFTW for common plans
> done FFTW initialisation
>  [Warning]: fDefineBufGen not supported
> [Warning]: fDefinePlugInCmd not supported
> [Warning]: fDefineBufGen not supported
> [Warning]: fDefineBufGen not supported
> [Warning]: fDefineBufGen not supported
> [Warning]: fDefineBufGen not supported
> [Warning]: fDefineBufGen not supported
> [Warning]: fDefineBufGen not supported
> [Warning]: fDefineBufGen not supported
> [Warning]: fDefineBufGen not supported
> jack_client_thread zombified - exiting from JACK


Regards,
Flo

--
Palimm Palimm!
http://tapas.affenbande.org

_______________________________________________
sc-dev mailing list

sc-dev@...
archive: http://www.listarc.bham.ac.uk/lists/sc-dev/
search: http://www.listarc.bham.ac.uk/lists/sc-dev/search/

Re: ScGraph - Fun with livecoding shaders

by krgn :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



On Sun, Jun 22, 2008 at 12:26 PM, Florian Schmidt <mista.tapas@...> wrote:
On Sunday 22 June 2008, krgn wrote:
> seems to works now. I had to disable shaders though, is that something that
> the hardware needs to support in for it to work?

Did you get compile time or runtime errors?

hm no, not really. shader_program.so is there too. I attach a log...

 

> also, I noticed that the
> jack client crashes:

I would suggest disabling the jack stuff for now.. I haven't looked at it in
quite a while.. simply take the HAVE_JACK=1 out of Makefile.include..

Will take a look at it after implementing uniform support for shaders [that
itches me more atm ;)]. Tomorrow or so..

cool. cheers :)
 

> ScGraph - (C) 2006, 2007, 2008
> [Run scgraph -h for help]
> [TexturePool]: Failed to traverse directory. Reason: [TexturePool]:
> Couldn't read directory
> Machine Listening UGens by Nick Collins for SuperCollider 3
> Tartini adapted from Phil McLeod's Tartini project
> AutoTrack adapted from Matthew Davies' autocorrelation beat tracker
> Qitch based on algorithms published by Judith Brown and Miller Puckette
> initialising FFTW for common plans
> done FFTW initialisation
>  [Warning]: fDefineBufGen not supported
> [Warning]: fDefinePlugInCmd not supported
> [Warning]: fDefineBufGen not supported
> [Warning]: fDefineBufGen not supported
> [Warning]: fDefineBufGen not supported
> [Warning]: fDefineBufGen not supported
> [Warning]: fDefineBufGen not supported
> [Warning]: fDefineBufGen not supported
> [Warning]: fDefineBufGen not supported
> [Warning]: fDefineBufGen not supported
> jack_client_thread zombified - exiting from JACK


Regards,
Flo

--
_______________________________________________
sc-dev mailing list

sc-dev@...
archive: http://www.listarc.bham.ac.uk/lists/sc-dev/
search: http://www.listarc.bham.ac.uk/lists/sc-dev/search/



compile.log (78K) Download Attachment

Re: ScGraph - Fun with livecoding shaders

by nescivi :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hiho,

On Sunday 22 June 2008 15:26:11 Florian Schmidt wrote:
> On Sunday 22 June 2008, krgn wrote:
> > also, I noticed that the
> > jack client crashes:
>
> I would suggest disabling the jack stuff for now.. I haven't looked at it
> in quite a while.. simply take the HAVE_JACK=1 out of Makefile.include..

I have the same crash...
what I found confusing in your source code is that the buffer you initialize
for the JACK client is a buffer of fftw_complex numbers, and not normal
numbers. Could it be that JACK throws scgraph out because this buffer is
wrong?

sincerely,
Marije

_______________________________________________
sc-dev mailing list

sc-dev@...
archive: http://www.listarc.bham.ac.uk/lists/sc-dev/
search: http://www.listarc.bham.ac.uk/lists/sc-dev/search/

Re: ScGraph - Fun with livecoding shaders

by Florian Schmidt :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Monday 23 June 2008, nescivi wrote:
> Hiho,

Hi,

> On Sunday 22 June 2008 15:26:11 Florian Schmidt wrote:
> > On Sunday 22 June 2008, krgn wrote:
> > > also, I noticed that the
> > > jack client crashes:
> >
> > I would suggest disabling the jack stuff for now.. I haven't looked at it
> > in quite a while.. simply take the HAVE_JACK=1 out of Makefile.include..
>
> I have the same crash...
> what I found confusing in your source code is that the buffer you
> initialize for the JACK client is a buffer of fftw_complex numbers, and not
> normal numbers. Could it be that JACK throws scgraph out because this
> buffer is wrong?

No, the complex buffer is only used for the freq_amp (stupid name) unit to
read from. I have slight problem setting up jackd in the 32 bit chroot which
i setup for SC/SCGraph [simple things like jack_lsp segfaulting].. But for me
scgraph starts up fine when compiled with the HAVE_JACK option and jackd
running..

Regards,
Flo


--
Palimm Palimm!
http://tapas.affenbande.org

_______________________________________________
sc-dev mailing list

sc-dev@...
archive: http://www.listarc.bham.ac.uk/lists/sc-dev/
search: http://www.listarc.bham.ac.uk/lists/sc-dev/search/

Re: ScGraph - Fun with livecoding shaders

by tom tlalim-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Flo,
managed to compile and run on os x tonight!
but still no go with any of the examples...

here are my errors for now:

df-intel:~ diabulousfabulous$ scgraph
ScGraph - (C) 2006, 2007, 2008
[Run scgraph -h for help]
[Warning]: fDefineBufGen not supported
[Warning]: fDefinePlugInCmd not supported
[Warning]: fDefineBufGen not supported
[Warning]: fDefineBufGen not supported
[Warning]: fDefineBufGen not supported
[Warning]: fDefineBufGen not supported
[Warning]: fDefineBufGen not supported
[Warning]: fDefineBufGen not supported
[Warning]: fDefineBufGen not supported
[Warning]: fDefineBufGen not supported
[PluginPool]: Error loading Scgraph plugin: /Users/diabulousfabulous/.scgraph/plugins/.DS_Store.
  Reason: [GPlugin]: Error: dlopen failed!
    Reason: dlopen(/Users/diabulousfabulous/.scgraph/plugins/.DS_Store, 2): no suitable image found.  Did find:
        /Users/diabulousfabulous/.scgraph/plugins/.DS_Store: unknown file type, first eight bytes: 0x00 0x00 0x00 0x01 0x42 0x75 0x64 0x31
[PluginPool]: Error loading Scgraph plugin: /Users/diabulousfabulous/.scgraph/plugins/freq_amp.bundle.
  Reason: [GPlugin]: Error: dlopen failed!
    Reason: dlopen(/Users/diabulousfabulous/.scgraph/plugins/freq_amp.bundle, 2): Symbol not found: __ZN10JackClient13get_frequencyEif
  Referenced from: /Users/diabulousfabulous/.scgraph/plugins/freq_amp.bundle
  Expected in: dynamic lookup

[PluginPool]: Error loading Scgraph plugin: /Users/diabulousfabulous/.scgraph/plugins/gl_renderer.bundle.
  Reason: [GPlugin]: Error: dlopen failed!
    Reason: dlopen(/Users/diabulousfabulous/.scgraph/plugins/gl_renderer.bundle, 2): Symbol not found: _glewInit
  Referenced from: /Users/diabulousfabulous/.scgraph/plugins/gl_renderer.bundle
  Expected in: dynamic lookup


[OscHandler]: Warning: Synth creation failed (SynthDef-name: "Grain"). Reason: [
SynthDefPool]: Error: SynthDef not found!
[OscHandler]: Warning: Synth creation failed (SynthDef-name: "Grain"). Reason: [SynthDefPool]: Error: SynthDef not found!
[OscHandler]: Warning: Synth creation failed (SynthDef-name: "VerySimpleView"). Reason: [PluginPool]: Error: Could not find unit: GGLRenderer


thnx,
tom



On Mon, Jun 23, 2008 at 1:47 AM, Florian Schmidt <mista.tapas@...> wrote:
On Monday 23 June 2008, nescivi wrote:
> Hiho,

Hi,

> On Sunday 22 June 2008 15:26:11 Florian Schmidt wrote:
> > On Sunday 22 June 2008, krgn wrote:
> > > also, I noticed that the
> > > jack client crashes:
> >
> > I would suggest disabling the jack stuff for now.. I haven't looked at it
> > in quite a while.. simply take the HAVE_JACK=1 out of Makefile.include..
>
> I have the same crash...
> what I found confusing in your source code is that the buffer you
> initialize for the JACK client is a buffer of fftw_complex numbers, and not
> normal numbers. Could it be that JACK throws scgraph out because this
> buffer is wrong?

No, the complex buffer is only used for the freq_amp (stupid name) unit to
read from. I have slight problem setting up jackd in the 32 bit chroot which
i setup for SC/SCGraph [simple things like jack_lsp segfaulting].. But for me
scgraph starts up fine when compiled with the HAVE_JACK option and jackd
running..

Regards,
Flo


--
Palimm Palimm!
http://tapas.affenbande.org

_______________________________________________


Re: ScGraph - Fun with livecoding shaders

by Josh Parmenter :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Flo and Tom,

I think I am getting close... Tom - did you see this error about GLEW?

--- Building target: scgraph
g++ -o scgraph main.o cow_ptr.o transformation_command.o transformation_command_visitor.o graphics_visitor.o obj_loader.o loader_3d.o buffer_pool.o matrix.o node_tree.o synth.o node.o group.o o