Hi,

Depending on your sampling rate, it may be best to just copy all the data
back, and then select only those samples you want.  These operations are
easily vectorized, and the Python overhead, combined with the requests to
and from the GPU might not be worth individually getting pixels.

Once again, the pixels live on the GPU, so no analogous surfarray exists.
You'll have to do some copying, or else do all the work entirely on the GPU
or on the CPU.

If you're processing video, you're sending the video data to the GPU and
then reading it back one sample at a time.  Probably a better approach is
to, when loading the video, simply pick out the appropriate frame as
required.

Ian

Reply via email to