Just starting out? Need help? Post your questions and find answers here.
cbmeeks
User
Posts: 17 Joined: Tue Dec 23, 2003 5:33 pm
Post
by cbmeeks » Sat Dec 27, 2003 2:35 am
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
cbmeeks
User
Posts: 17 Joined: Tue Dec 23, 2003 5:33 pm
Post
by cbmeeks » Sat Dec 27, 2003 6:45 pm
Come on...anybody?
cb
GPI
PureBasic Expert
Posts: 1394 Joined: Fri Apr 25, 2003 6:41 pm
Post
by GPI » Sat Dec 27, 2003 7:45 pm
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...
Dare2
Moderator
Posts: 3321 Joined: Sat Dec 27, 2003 3:55 am
Location: Great Southern Land
Post
by Dare2 » Sun Dec 28, 2003 12:47 am
lol.
At a guess, start/stop inside a loop would be slower.
Is there a prize for the correct answer?
Fred
Administrator
Posts: 18162 Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:
Post
by Fred » Mon Dec 29, 2003 10:46 am
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.