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

[pygame] OpenGL stretch of a pygame.Surface



Hi everyone,	

I try to make a little 2d engines for my needs. I use the gameobject
library which bring me to a really really decent frame rate (between 400
and 2000 FPS depending on the computer). But I wanted to do some
beautiful pixel art so every frame, I pygame.transform.scale my 640 x
480 display into my native resolution. Despite the fact I carefully have
converted my surfaces to match each other, FPS is really slower (can't
have constant 60FPS anymore !). After a few investigation, the
transformation is slow but not as the blitting of an 1920x1080 surface.

So I came up with the idea of an hardware opengl texture stretching
instead of a dumb blit but I don't know how to achieve it. 

Anyone has already done this ?