[Gambas-user] gb3: recent changes to PaintImage and DrawImage

Benoît Minisini gambas at ...1...
Sun May 1 05:07:13 CEST 2011


> On 04/30/2011 10:31 PM, Benoît Minisini wrote:
> > I'm not talking about making a 3D game engine. I'm just talking about
> > using a few OpenGL commands to:
> > 
> > - blend images on the screen.
> > - rotate the game screen as you want.
> > 
> > As far as I understood, while the player moves, you have to build the
> > part of the world he will see.
> > 
> > If you succeed in doing that with OpenGL, all the images will go to the
> > graphic card, and so blending and rotating will be fast (and I think they
> > are now supported by all free drivers).
> > 
> > Otherwise you will never go faster than 18 FPS.
> 
> Does SDL even have a rotate function? I did some quick research and
> found mixed results. Looks like there's something called SDL_gfx that
> might do it (rotozoomer). If SDL flat-out isn't designed to do it, then
> I perfectly understand the encouragement to implement OpenGL functions.
> Seems strange though that SDL can't rotate a 2D bitmap efficiently in
> hardware. Even the SNES could do that.

AFAIK, SDL does not use hardware on Linux (but Laurent may tell I am wrong). 
All image processing are done in software.

gb.sdl draw things by using OpenGL, so it is hardware accelerated when using 
the Draw.Image() method.

But it does not override any method of the Image class, and so does not 
accelerate rotation. But it could.

-- 
Benoît Minisini




More information about the User mailing list