slowdown

BlitzMax Forums/BlitzMax Programming/slowdown

jkrankie(Posted 2008) [#1]
how do i get graphics to display quicker first time they are drawn? in my game it takes about 5 seconds to run through an animation of 32 880*600 images (which should take less than 1) the first time each frame is drawn, after that i'ts smooth as it should be.

is there a way of getting around this problem? i know they are large images, but compatibility with slow computers isn't an issue, plus it all runs fine on my Intel graphics chip.

Cheers
Charlie


smilertoo(Posted 2008) [#2]
use 4 times as many images at 1/4 the size?


fredborg(Posted 2008) [#3]
Draw them off screen first. The graphics card loads the images from system memory the first time they are used, that's why it's slower.


jkrankie(Posted 2008) [#4]
ok, drawing them off screen makes sense. thanks.

Cheers
Charlie


Grey Alien(Posted 2008) [#5]
Or precache them in VRAM like this:

Function ccCreateFrames(image:TImage) 
	'Use this to cache an image or animimage in VRAM for quicker drawing later.
	For Local c=0 Until image.frames.length
		image.Frame(c)
	Next
End Function



But drawing them off-screen will ahve the same effect.