[Kde-games-devel] Ideas for QML support in libkdegames

Albert Astals Cid aacid at kde.org
Thu Mar 7 10:54:17 UTC 2013


El Dijous, 7 de març de 2013, a les 12:09:19, Viranch Mehta va escriure:
> On Monday 04 Mar 2013 7:56:04 PM Albert Astals Cid wrote:
> > El Dilluns, 4 de març de 2013, a les 18:40:46, Viranch Mehta va escriure:
> > > Cons:
> > > 1. When game window is resized, sprites of new size have to be naturally
> > > retrieved from the SVGs, but QDeclarativeImageProvider is not triggering
> > > a
> > > new request, its resizing the pixmap from cache. we could overcome this
> > > by
> > > adding dimensions to source string, change in which would trigger a new
> > > pixmap request, but that seems over-usage of source parameter IMO.
> > 
> > Not really, you are asking for
> > image://myimageprovider/EgyptianTheme/Background/1920x1080
> > that is the image that i want to use at 1920x1080, at a different
> > resulution might even be a different image, not just a rescaled one, i
> > don't think it's over-usage to be honest.
> 
> Fair enough, I implemented the same and now resizing is very glitchy as is
> the case with KGameRenderer (because each resize requests for a new
> pixmap).

What do you mean by glitchy? Do you have the code somewhere so we can try and 
see it?

> Simple resize of window from landscape to portrait mode takes 50%
> CPU for 1-1.5 seconds.

Maybe this is because the images are being generated for all the sizes in 
between the original and the final size? 

Cheers,
  Albert

> Is this normal with other c++ games? How do they
> handle resizing without apparent glitches?
> 
> Viranch
> 
> _______________________________________________
> kde-games-devel mailing list
> kde-games-devel at kde.org
> https://mail.kde.org/mailman/listinfo/kde-games-devel


More information about the kde-games-devel mailing list