[visionegg] Re: Frame Buffer Objects

  • From: Andrew Straw <astraw@xxxxxxxxxxx>
  • To: visionegg@xxxxxxxxxxxxx
  • Date: Tue, 24 Jun 2008 15:20:02 -0700

Hi Eamon,

It's unclear to me why your current code is skipping frames. It's
possible that your video card simply does not have enough video RAM --
is that a possibility? You could disable mipmaps (set the
mipmaps_enabled to False) to attempt to free up some space.

This isn't necessarily too different from what you've already tried, but
one suggestion is using demo/image_sequence_fast.py as a starter, but
use multiple instances of TextureStimulus() and toggle their "on"
parameters so that only you want to display at the moment is on. You can
pre-load the images to the other TextureStimuli using put_sub_image().

I'd be really surprised if using FBOs would give you any speed advantage
over just loading up the video memory via texture data. The purpose of
FBOs is to draw to an (offscreen) buffer using OpenGL commands, but it
doesn't sound like it would solve your issue. That issue sounds like not
having enough video RAM to load your images. Figuring out how to fit
everything needing pre-loading in the video memory seems like the
solution to me. FBOs might be one way to do that, but I can't see why
they'd be better than simple textures.

-Andrew

Eamon Caddigan wrote:
> I'm currently working on an experiment containing stimuli that I haven't
> been able to present without dropping frames, which is unacceptable
> given the timing requirements of this paradigm. Displays consist of
> several TextureStimulus instances containing high-resolution color
> photographs.
> 
> Fortunately, the displays are relatively static; the images stay in
> place for hundreds of milliseconds at a time. As a work-around, I'm
> considering rendering each unique display to a Frame Buffer object
> before the beginning of a trial, and then presenting them as a single
> texture on a rectangle. This sort of emulates Psychtoolbox's offscreen
> windows.
> 
> Does anybody have experience with such an approach? Are there
> other/better ways to display many hi-res images when a graphics card
> just isn't fast enough to handle them all as TextureStimulus instances?
> 
> -Eamon
> 
> ======================================
> The Vision Egg mailing list
> Archives: //www.freelists.org/archives/visionegg
> Website: http://www.visionegg.org/mailinglist.html

======================================
The Vision Egg mailing list
Archives: //www.freelists.org/archives/visionegg
Website: http://www.visionegg.org/mailinglist.html

Other related posts: