jitter movie but as a "texture"

In the previous simple jit.movie example, we were displaying the movie file as a matrix. This lives in our computer's RAM. A faster way to display the file would be as a texture, in a "GL context". Basically we are using our GPU to do some work and you just have to accept it is faster this way.

You still load your files in to the jit.movie object (though here I am using a "read" message to let me select a file). And you plug the output into a jit.pwindow still too. However notice we are specifying jit.movie OUTPUTS A TEXTURE... The message box coming out of the jit.movie also identifies it as a jit_gl_texture. If you did not specify the output_texture, it would show up as a matrix.

the jit_world object is required to make the movie actually show up in the jit.pwindow. It also does the metro-bang for you, apparently it matches the native FPS of your display. Your movie might not actually match that FPS though....so you might be displaying unnecessary frames! This is where the @unique 1 and @sync 0 come in. They allow you to display the movie at it's native FPS. You can see I have an fps counter which is averaging at around 24fps, whereas my screen's refresh rate is about 60hz/60 fps.

Comments

Popular posts from this blog

load texture using path

jit.gl.camera basics