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

Viranch Mehta viranch.mehta at gmail.com
Thu Mar 7 06:39:19 UTC 2013


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). 
Simple resize of window from landscape to portrait mode takes 50% CPU for 
1-1.5 seconds. Is this normal with other c++ games? How do they handle 
resizing without apparent glitches?

Viranch



More information about the kde-games-devel mailing list