[jitter] lua gencoord
(())_n
kinomatic at gmail.com
Wed Oct 24 12:23:47 MDT 2007
- Previous message: [jitter] lua gencoord
- Next message: [jitter] lua gencoord
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi mark,
this is great. I guess I should be calling it on the draw and check
for frames to see if a movie has been loaded.
thanks
(())_n
On Oct 24, 2007, at 1:20 PM, MarkDavid Hosale wrote:
> I am confused by the play function. Don't you want to do something
> more like this? Also fixes the gworld error:
>
> -- movieplayer.lua
>
> render_context = this.drawto
> autogarbage = 1
> autowatch = 1
> gc = 1
>
> function script_load()
> vmovie = jit.new("jit.qt.movie")
> vmovie.colormode = "uyvy"
> vmovie.adapt = 1
> end
>
> function read(a)
> vmovie:read(a)
> end
>
> -- I get an error: "jit.qt.movie: could not create gworld"
> -- if I call the following but no film has been read
> function draw()
> if (vmovie.framecount > 0) then
> local vframe = jit.matrix(4, "char", 320, 240)
> vmovie:matrixcalc(vframe.name, vframe.name)
> outlet(0, "jit_matrix", vframe.name)
> end
> end
>
>
> here is my patcher:
>
> max v2;
> #N vpatcher 501 427 1101 827;
> #P window setfont "Sans Serif" 9.;
> #P window linecount 1;
> #P message 368 138 80 196617 read dozer.mov;
> #P message 303 140 58 196617 read dozer;
> #P newex 300 164 64 196617 prepend call;
> #P user jit.pwindow 303 216 82 62 0 1 0 0 1 0;
> #P newex 277 289 75 196617 jit.window foo;
> #P newex 147 160 50 196617 t b erase;
> #P toggle 147 106 15 0;
> #P newex 147 135 57 196617 qmetro 33;
> #P newex 147 236 82 196617 jit.gl.render foo;
> #P newex 304 192 166 196617 jit.gl.lua foo @file movieplayer.lua;
> #P connect 3 0 2 0;
> #P connect 2 0 4 0;
> #P connect 4 1 1 0;
> #P connect 4 0 1 0;
> #P connect 9 0 7 0;
> #P connect 8 0 7 0;
> #P connect 7 0 0 0;
> #P connect 0 0 6 0;
> #P pop;
- Previous message: [jitter] lua gencoord
- Next message: [jitter] lua gencoord
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
