Drawing dots in psychtoolbox

I'm trying to write a coherent motion stimuli where one of the
variables is dot density on the screen. As I want the upper dot
densities to be quite high, I am would like to be able to draw
thousands of dots for each of at least 8 frames, which are
generated off screen, saved and played as a movie.

While the speed is acceptable for numbers of dots not
exceeding 500, past this the trial latency is too high. I am
currently using the SCREEN 'fillOval' function to draw each dot at
a given coordinate. Making my way through past posts I came
across someones suggestion of writing a mex file - is this also a
solution that would speed up my program?

If anyone knows a method to speed up the drawing of a large
number of dots to an off screen window, please let me know,

Thanks in advance,

Craig Chapman