Menu

#2 GColor 'alpha' value-no effect,objects are non-transparent

open
nobody
None
5
2011-02-21
2011-02-21
No

a = NetAddr( "localhost", 37291 );
g = Server.new( \scgraph, a );
g.boot;

(
  SynthDef( \SimpleView, {
      GGLRenderer.gr( In.ar( 0 ));
  }).play(g);
)

(
  SynthDef(\Rect, {|x=1,y=1,tx=0,ty=0,tz=0,alpha=0.5|
  Out.gr( 0, GTranslate.gr(GColor.gr(GRectangle.gr( x,y),[1,1,1,alpha]),[tx,ty,tz] ));
  }).send(g);
)

(
Synth.new(\Rect,[\x,3,\y,3,\tx,0,\ty,0,\tz,0],target:g);
Synth.new(\Rect,[\x,3,\y,3,\tx,-1.5,\ty,-1.5,\tz,1],target:g);
)

g.quit;

Discussion

MongoDB Logo MongoDB