[Gambas-devel] gb3: Image.Draw method is missing when using gb.sdl

Laurent Carlier lordheavym at ...176...
Fri Jan 7 23:16:30 CET 2011


Le mercredi 5 janvier 2011 15:34:53, Kevin Fishburne a écrit :
> I'm in the process of converting my app from gb.image only to gb.image +
> gb.sdl to improve rendering performance. To my horror I noticed that the
> Draw method is no longer available. I'm using the following components:
> 

Draw.Image is no more available in gambas3, instead you must use Draw.Begin() 
/ Draw.End() on Image objects.

> gb
> gb.image
> gb.image.effect
> gb.image.io
> gb.net
> gb.sdl
> gb.sdl.sound
> 
> There is a Copy method, though it doesn't have parameters to specify the
> destination coordinates or width/height for scaling. It's like the Draw
> method with only the first four parameters. Interestingly good old
> DrawAlpha seems to still be there (yay!).

Draw.Copy() method is only to copy the image or only a part of it, no some 
sort of Image.Draw() replacement/workaround, see 
http://gambasdoc.org/help/comp/gb.image/image/copy?v3

> 
> Should there be a Draw method, or is there a different way to achieve
> the same functionality? It looks like using "Draw.Image(...)" will work,
> so I may have to integrate my rendering directly into the SDL backbuffer
> (Screen_Draw[]), though that would require a rewrite of the rendering
> pipeline. Final question, if there was an Image.Draw method, would that
> bypass SDL and use software rendering? If so it may be best for me to
> rewrite the rendering pipeline so it's pure SDL.

In a normal world, Draw.Begin() with an Image object, should work, but in a 
world with myself as the maintainer/developper of the sdl component, it's not!
Why ? Because i'm really a lazy guy. It should be done from a long time, but 
as everybody, i'm a bit busy, with projects/familly/job/...

Drawing on Images is planned to be implemented through openGL, so (i hope!) it 
should be possible to use the power of the graphic card to to some 
rotation/stretching/zoom dynamicly, and perhaps some other things.

Sorry for the lack of features of the sdl component, sincerely.

++







More information about the Devel mailing list