Page 1 of 1

Which is faster/better?

Posted: Sat Dec 27, 2003 2:35 am
by cbmeeks
And why?

Code: Select all

;VERSION 1

Start3D()

Repeat
....
;2D Sprites
DisplaySprite
DisplaySprite
DisplaySprite
.....
;3D Sprites
TransformSprite3D
TransformSprite3D
TransformSprite3D
DisplaySprite3D
DisplaySprite3D
DisplaySprite3D
.....
Until EndOfGame

Stop3D()

OR

Code: Select all

;VERSION 2

Repeat
....
;2D Sprites
DisplaySprite
DisplaySprite
DisplaySprite
.....
;3D Sprites
Start3D()
TransformSprite3D
TransformSprite3D
TransformSprite3D
DisplaySprite3D
DisplaySprite3D
DisplaySprite3D

Stop3D()
.....
Until EndOfGame

Doesn't the Start3D take overhead? I have done both ways and they both seem to work??

Thanks!

cb

Posted: Sat Dec 27, 2003 6:45 pm
by cbmeeks
Come on...anybody?

cb

Posted: Sat Dec 27, 2003 7:45 pm
by GPI
I would say, use Start/Stop3D(). It stand in the manual, that you must use it, so use it.

Maybe on your PC all work, but it could happen, that this will not work on other PC. And then you search eternally...

Posted: Sun Dec 28, 2003 12:47 am
by Dare2
lol.

At a guess, start/stop inside a loop would be slower.

Is there a prize for the correct answer?

:)

Posted: Mon Dec 29, 2003 10:46 am
by Fred
I suggest to use Start3D/Stop3D inside the main loop as it has been designed to work this way. It's may be a bit slower, but will give correct result on maximum of configurations.