[visionegg] Re: Adding a screen/viewport/stimuli to a pygame surface

  • From: Andrew Straw <astraw@xxxxxxxxxxx>
  • To: visionegg@xxxxxxxxxxxxx
  • Date: Thu, 06 Nov 2008 13:35:13 -0800

Hi Louis,

At the moment, there no direct path, but you could get a Numeric array
with screen.get_framebuffer_as_array() and then use
pygame.surfarray.blit_array() to put that data into a pygame surface.
Hmm, looking at that code, I see that I really need to update
get_framebuffer_as_array() to emit a numpy array, but pygame supports
Numeric arrays, so this shouldn't be necessary for you.

On a related tangent, I just spent a little effort cleaning up the
pygame demos, but couldn't quite get flames_visionegg to work.

-Andrew

Louis Tur wrote:
> Hello,
> 
> Ive just begun working with Vision Egg and have seen examples of pygame
> implemented within a VE framework. I was wondering if the reverse were
> possible. Specifically, adding a gabor patch to a pygame Surface object,
> as in gabor.py demo. Im not quite sure how to go about this, and what
> I've tried hasnt worked or has generated different errors, e.g. "cannot
> blit to openGL, openGLBLIT ok."
> 
> Thanks in advance,
> Louis


-- 
Dr. Andrew D. Straw
California Institute of Technology
http://www.its.caltech.edu/~astraw/
======================================
The Vision Egg mailing list
Archives: //www.freelists.org/archives/visionegg
Website: http://www.visionegg.org/mailinglist.html

Other related posts: