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

2014-07-30 Thread VertPingouin
Ok I now create my texture once. I'm having some issues with this > You're creating an extra copy of the texture data here. > To avoid that, you could use surfarray to create a surface > backed by a numpy array, do your drawing into that, and > then pass the numpy array directly to glTexImage2D.

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

2014-07-28 Thread vertpingouin
gt; > > > > > > On Mon, Jul 28, 2014 at 7:32 AM, Sam Bull > wrote: > On lun, 2014-07-28 at 06:54 +0200, VertPingouin wrote: > > So I came up with the idea of an hardware opengl texture > stretching > > instead o

[pygame] OpenGL stretch of a pygame.Surface

2014-07-27 Thread VertPingouin
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