GLBasic forum

Main forum => GLBasic - en => Topic started by: Leginus on 2010-Aug-29

Title: Another Iphone question
Post by: Leginus on 2010-Aug-29
I promise this is the last performance question on iphone  :whistle:

Again as I cant yet (but hopefully in near future) test on iphone, is it better at blasting pixels or blitting.  e.g. for a gradient background should i be realtime drawing it, or using a png file with it already done or grabbed.

i realise that this is an easy mod once I can test, but no point reinventing the iWheel  :)

thanks
Leginus
Title: Re: Another Iphone question
Post by: Ian Price on 2010-Aug-29
Funny enough I've been doing gradient tests with a netbook for my BLITZ remake -
(http://www.iprice.remakes.org/my_stuff/bli2x.PNG)

It would appear that it's much faster to draw the gradient to a screen (CREATESCREEN, USESCREEN) prior to the main loop and then draw that sprite than drawing the gradient in real-time. Whether this is true for iDevice I can't say, but if it works on a netbook like this I can only presume that the iDevice will be the same. But don't quote me on that!
Title: Re: Another Iphone question
Post by: ketil on 2010-Aug-29
I am using the color-parameter in the POLYVECTOR command to make one of the layers in my tilescroller gradient. Thats very cool since it then can be a dynamic gradient ( i use it for lighting day/night ).

But if you are using a static image an no scrolling ... why not LOADBMP ? Your image will then be the background in each SHOWSCREEN :)
Title: Re: Another Iphone question
Post by: Leginus on 2010-Aug-29
Thx guys