Using Matlab 7 and PTB 3.
I would like to create and play a movie. The easiest way I see to do
this is to use Screen('MakeTexture' ...) to generate each frame.
However, MakeTexture seems to presuppose some sort of image map, and I
would like to use the drawing commands ('DrawLine', 'FillOval', etc.)
to draw each frame.
According to the FAQ, textures and offscreen windows are more or less
the same, except that you can draw to offscreen windows, but not to
textures. It states that 'MakeTexture' is faster than 'PutImage'.
(which I already know from the tutorial) However, it goes on to state
that "The advantage is also that the Screen('DrawTexture') command
allows [one] to scale, zoom, filter and rotate textures while drawing,
that texture drawing is extremely fast as it uses specialized hardware
on your graphics card, and much more..." This suggests that there is
a fundamental difference between using textures and offscreen windows,
but I don't know what that is.
I've tried using offscreen windows for each frame, but for 300 frames,
it slows down a lot after about frame 30. I assume this is some sort
of memory issue.
I guess in the end, what I want to know is, how do I draw to an image
map so that I can make textures optimized for movie playback. I guess
an alternate solution would be to copy an offscreen window into a
texture without the "slow" 'GetImage' command, so that I don't have to
have a bunch of offscreen windows floating around.
I especially like how MovieDemo.m states "We don't need offscreen
windows as in OS 9. FillOval is now fast enough to draw ovals during
the animation." Umm, what happens when we have enough drawing that
the animation can't keep up? What if we want to draw the frames
beforehand anyway? What an utterly useless demo.
I would like to create and play a movie. The easiest way I see to do
this is to use Screen('MakeTexture' ...) to generate each frame.
However, MakeTexture seems to presuppose some sort of image map, and I
would like to use the drawing commands ('DrawLine', 'FillOval', etc.)
to draw each frame.
According to the FAQ, textures and offscreen windows are more or less
the same, except that you can draw to offscreen windows, but not to
textures. It states that 'MakeTexture' is faster than 'PutImage'.
(which I already know from the tutorial) However, it goes on to state
that "The advantage is also that the Screen('DrawTexture') command
allows [one] to scale, zoom, filter and rotate textures while drawing,
that texture drawing is extremely fast as it uses specialized hardware
on your graphics card, and much more..." This suggests that there is
a fundamental difference between using textures and offscreen windows,
but I don't know what that is.
I've tried using offscreen windows for each frame, but for 300 frames,
it slows down a lot after about frame 30. I assume this is some sort
of memory issue.
I guess in the end, what I want to know is, how do I draw to an image
map so that I can make textures optimized for movie playback. I guess
an alternate solution would be to copy an offscreen window into a
texture without the "slow" 'GetImage' command, so that I don't have to
have a bunch of offscreen windows floating around.
I especially like how MovieDemo.m states "We don't need offscreen
windows as in OS 9. FillOval is now fast enough to draw ovals during
the animation." Umm, what happens when we have enough drawing that
the animation can't keep up? What if we want to draw the frames
beforehand anyway? What an utterly useless demo.