[jitter] Alpha channel in gl.sketch
yair reshef
yair99 at gmail.com
Mon May 26 06:45:02 MDT 2008
- Previous message: [jitter] Alpha channel in gl.sketch
- Next message: [jitter] Alpha channel in gl.sketch
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
f.e, don't be so judgmental, it can work both ways. passing it into the cmd list is more flexible, depends on your needs. On Mon, May 26, 2008 at 11:07 AM, f.e <personalcomputermusic at gmail.com> wrote: > Jasch, thanks a lot for this very clear example. Now it's working good. > > The right messages to send to jit.gl.sketch are blend_enable 1 and > depth_enable 0, not glenable blend. Thanks for that. > > cheers > > f.e > > f.e chanfrault | aka | personal computer music > >>>>>>> http://www.personal-computer-music.com > >>>>>>> | film soundtracks, sound art, music | > > > jasch a écrit : > > the glcolor's alpha-value has to be set to something else than 1., too. >> >> see patch below >> >> hth >> >> /*j >> >> I'm sending "reset, glclearcolor 1. 1. 1. 1., glclear, glenable blend, >>> moveto 0. 0., glcolor 0.5 0.7 0.8 1., circle 0.1" to jit.gl.sketch but still >>> no alpha channel... >>> >> >> #P window setfont "Sans Serif" 9.; >> #P user jit.fpsgui 105 198 60 196617 0; >> #P window linecount 1; >> #P newex 650 400 69 196617 route symbol; >> #N coll start_list 1; >> #T flags 1 0; >> #T 0 reset; >> #T 1 moveto 0. 0. 0.; >> #T 2 glcolor 0. 0. 1. 0.5; >> #T 3 shapeslice 40 40; >> #T 4 circle 0.1; >> #T 5 moveto 0. 0. 0.; >> #T 6 glcolor 1. 0.5 0 0.5; >> #T 7 shapeslice 40 40; >> #T 8 circle 0.1; >> #T 9 moveto 0. 0. 0.; >> #T 10 glcolor 0. 0. 0. 0.25; >> #T 11 plane 0.01 1.; >> #P newobj 650 379 82 196617 coll start_list 1; >> #P newex 588 437 310 196617 jit.gl.sketch test @blend_enable 1 >> @depth_enable 0 @displaylist 1; >> #P comment 585 219 68 196617 plane 1 alpha; >> #P comment 420 219 71 196617 circle 2 alpha; >> #P comment 258 219 71 196617 circle 1 alpha; >> #P flonum 585 238 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; >> #P objectname plane[0].alpha; >> #P message 585 256 161 196617 cmd_replace 9 glcolor 0. 0. 0. \$1; >> #P flonum 420 238 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; >> #P objectname circle[1].alpha; >> #P message 420 256 164 196617 cmd_replace 5 glcolor 1. 0.5 0 \$1; >> #P flonum 258 238 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; >> #P objectname circle[0].alpha; >> #P message 258 256 161 196617 cmd_replace 1 glcolor 0. 0. 1. \$1; >> #P newex 258 281 51 196617 s cmdlist; >> #P comment 1016 37 85 196617 jasch 20080526; >> #P comment 965 96 63 196617 plane 1 size; >> #P flonum 965 113 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; >> #P objectname plane[1]; >> #P flonum 1002 113 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; >> #P objectname plane[2]; >> #P newex 965 135 49 196617 pak 0. 0.; >> #P message 965 160 138 196617 cmd_replace 10 plane \$1 \$2; >> #P comment 843 96 66 196617 circle 2 size; >> #P flonum 844 113 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; >> #P objectname circle[1]; >> #P message 844 160 120 196617 cmd_replace 7 circle \$1; >> #P comment 722 96 66 196617 circle 1 size; >> #P flonum 723 113 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; >> #P objectname circle[0].size; >> #P message 723 160 120 196617 cmd_replace 3 circle \$1; >> #P newex 1052 113 53 196617 autopattr; >> #X prestore circle[0].alpha 1 0 0.49; >> #X prestore circle[0].size 1 0 0.5; >> #X prestore circle[0].x 1 0 0.49; >> #X prestore circle[0].y 1 0 0.; >> #X prestore circle[1] 1 0 0.75; >> #X prestore circle[1].alpha 1 0 0.3; >> #X prestore circle[1].x 1 0 -0.16; >> #X prestore circle[1].y 1 0 0.; >> #X prestore plane[0].alpha 1 0 0.18; >> #X prestore plane[0].x 1 0 0.29; >> #X prestore plane[0].y 1 0 -0.98; >> #X prestore plane[1] 1 0 0.3; >> #X prestore plane[2] 1 0 1.; >> #X prestore render.toggle 1 0 1; >> #X prestore window.fsaa 1 0 1; >> #P objectname u532000098; >> #P toggle 48 298 15 0; >> #P objectname window.fsaa; >> #P message 48 315 44 196617 fsaa \$1; >> #P newex 588 358 51 196617 r cmdlist; >> #P newex 420 465 75 196617 grab 2 cmdlist; >> #P newex 650 358 77 196617 loadmess dump; >> #P comment 568 96 45 196617 plane 1; >> #P comment 412 96 45 196617 circle 2; >> #P button 404 357 15 0; >> #P message 404 412 30 196617 open; >> #P newex 404 380 55 196617 b 4; >> #P flonum 258 113 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; >> #P objectname circle[0].x; >> #P flonum 295 113 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; >> #P objectname circle[0].y; >> #P newex 258 135 49 196617 pak 0. 0.; >> #P message 258 160 154 196617 cmd_replace 0 moveto \$1 \$2 0.; >> #P flonum 568 113 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; >> #P objectname plane[0].x; >> #P flonum 605 113 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; >> #P objectname plane[0].y; >> #P newex 568 135 49 196617 pak 0. 0.; >> #P message 568 160 154 196617 cmd_replace 8 moveto \$1 \$2 0.; >> #P flonum 413 113 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; >> #P objectname circle[1].x; >> #P flonum 450 113 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; >> #P objectname circle[1].y; >> #P newex 413 135 49 196617 pak 0. 0.; >> #P message 413 160 154 196617 cmd_replace 4 moveto \$1 \$2 0.; >> #P message 434 412 71 196617 wclose \, clear; >> #P message 420 440 57 196617 getcmdlist; >> #N coll cmd_list 1; >> #P newobj 404 515 77 196617 coll cmd_list 1; >> #N vpatcher 698 108 1298 508; >> #P window setfont "Sans Serif" 9.; >> #P newex 50 77 60 196617 route clear; >> #P newex 155 123 20 196617 t b; >> #P newex 123 190 60 196617 prepend set; >> #P newex 123 123 20 196617 t b; >> #P newex 100 231 52 196617 prepend 0; >> #N counter; >> #X flags 0 0; >> #P newobj 123 156 77 196617 counter; >> #P inlet 155 30 15 0; >> #P inlet 50 30 15 0; >> #P outlet 100 285 15 0; >> #P connect 1 0 8 0; >> #P connect 8 1 4 0; >> #P connect 6 0 4 0; >> #P connect 4 0 0 0; >> #P connect 8 1 5 0; >> #P connect 5 0 3 0; >> #P connect 3 0 6 0; >> #P connect 2 0 7 0; >> #P connect 8 0 7 0; >> #P connect 7 0 3 2; >> #P pop; >> #P newobj 420 491 39 196617 p idx; >> #P newex 258 190 51 196617 s cmdlist; >> #P toggle 44 118 15 0; >> #P objectname render.toggle; >> #P newex 44 170 50 196617 t b erase; >> #P newex 44 146 90 196617 qmetro 16.66666; >> #P window linecount 2; >> #P newex 44 233 163 196617 jit.gl.render test @depth_enable 1 @erase_color >> 1. 1. 1. 1.; >> #P window linecount 1; >> #P comment 257 96 45 196617 circle 1; >> #P comment 426 359 87 196617 see command list; >> #P user jit.pwindow 47 346 279 213 1 1 1 0 1 0; >> #X name test; >> #P user panel 43 343 287 219; >> #X brgb 191 191 191; >> #X frgb 0 0 0; >> #X border 1; >> #X rounded 0; >> #X shadow 0; >> #X done; >> #P window setfont "Sans Serif" 18.; >> #P comment 23 30 635 196626 blending in OpenGL with jit.gl.sketch \, >> glcommands and the command list; >> #P connect 8 0 6 0; >> #P connect 6 0 7 0; >> #P connect 7 0 5 0; >> #P fasten 7 1 5 0 89 197 49 197; >> #P connect 35 0 34 0; >> #P connect 34 0 2 0; >> #P connect 7 0 62 0; >> #P connect 25 0 23 0; >> #P connect 23 0 22 0; >> #P fasten 43 0 9 0 970 182 263 182; >> #P fasten 40 0 9 0 849 182 263 182; >> #P fasten 37 0 9 0 728 182 263 182; >> #P fasten 22 0 9 0 263 182 263 182; >> #P fasten 18 0 9 0 573 182 263 182; >> #P fasten 14 0 9 0 418 182 263 182; >> #P connect 51 0 50 0; >> #P fasten 54 0 49 0 590 276 263 276; >> #P fasten 52 0 49 0 425 276 263 276; >> #P connect 50 0 49 0; >> #P connect 24 0 23 1; >> #P connect 28 0 26 0; >> #P connect 26 0 27 0; >> #P connect 10 0 11 0; >> #P connect 27 0 11 0; >> #P fasten 13 0 11 0 439 432 409 432; >> #P connect 17 0 15 0; >> #P connect 15 0 14 0; >> #P connect 53 0 52 0; >> #P connect 26 1 12 0; >> #P connect 12 0 32 0; >> #P connect 32 1 10 0; >> #P connect 26 2 13 0; >> #P connect 26 3 10 1; >> #P connect 16 0 15 1; >> #P connect 21 0 19 0; >> #P connect 19 0 18 0; >> #P connect 55 0 54 0; >> #P connect 33 0 59 0; >> #P connect 61 0 59 0; >> #P connect 61 1 59 0; >> #P connect 20 0 19 1; >> #P connect 31 0 60 0; >> #P connect 60 0 61 0; >> #P connect 38 0 37 0; >> #P connect 41 0 40 0; >> #P connect 46 0 44 0; >> #P connect 44 0 43 0; >> #P connect 45 0 44 1; >> #P window clipboard copycount 63; >> >> >> _______________________________________________ > jitter mailing list > jitter at cycling74.com > http://www.cycling74.com/mailman/listinfo/jitter > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.cycling74.com/pipermail/jitter/attachments/20080526/162fda76/attachment.htm
- Previous message: [jitter] Alpha channel in gl.sketch
- Next message: [jitter] Alpha channel in gl.sketch
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
