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

Re: [pygame] Cannot blit to an OpenGL surface



On May 26, 2004, at 7:32 AM, Pete Shinners wrote:

Andrew P. Lentvorski, Jr. wrote:
I am getting the following message:
"Cannot blit to OPENGL Surfaces (OPENGLBLIT is ok)"
SDL has a special display mode OPENGLBLIT you can use when you set the display mode. It maps SDL blit calls into glWritePixels.

Now that you know, the general consensus is to never use this. glWritePixels is not accelerated on most graphics cards, so it's not really a win. Textured quads are the 'recommended' way to do this, but you are correct with the powers of 2 setup.

A few months ago I remember people had near-pygame interfaces for a 2d opengl library. Have to hit the archives for more, I can't remember more than that at the time.

If you can find this reference, I'd appreciate it.

I'll take a look and see if glWritePixels is fast enough for now. I'll use the command explicitly rather than relying on SDL to do the mapping. OpenGL can be mystifying enough without adding invisible translation calls into the mix.

I'll almost certainly have to come back and strip out the calls later, but it might be good enough until I put a heavy-duty blitting solution into place.

Thanks for the quick response,
-a