[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] OpenGL stretch of a pygame.Surface



Berlioz Silver wrote:
You want pixels2d, which gives you a variable which _references_ the data.

Yes, sorry, I got it the wrong way round. You need to start
with a normal surface that you can blit into, and then use
pixels2d to create a numpy view of it that you can pass
directly to OpenGL.

While the reference is still there, the surface is locked (otherwise you could change the data mid-blit, which would be bad). Instead, you should use:

del (variable with pixels2d in it)

right before you pass it off to GL or pygame.

I think you mean *after* passing it to GL, don't you?

--
Greg